A scalable approach to real-time taxi ridesharing