Sunday, 7 February 2016

How does Uber publish realtime geolocated data ?

This use case is very interesting. The only way I already know is with Meteor, it's as simple as://Server side Meteor.publish('geolocatedData', function (location, distance) { return GeolocatedDataCollection.find( {$near: [ location.x, location.y ], $maxDistance:distance}); }); //Client side Meteor.subscribe('geolocatedData', myLocation, distance); The other easy way is to do long polling on the same Mongo query for example (or any other DB with geo queries).Apart from that, I really can't see how is it doable (with for example Socket.io or a service like pubnub or pusher).Can someone guide me ?Thanks.

Submitted February 08, 2016 at 12:12AM by skini26

No comments:

Post a Comment