Real time resource tracking use case
I am trying to prototype a system for tracking resources. A resource can be anything (car, person, place etc…) I am trying to prototype two use cases.
- Cab tracking scenario;
- Vehicles publishes it's location to server
- Server stores the current location in a database for history & other info
- Pass the vehicle location coordinates to subscribers fleet owners to visually see their vehicles on a map
- Traveler can request a cab to his current location
- Traveler can see the location of his cab if it's confirmed (only the assigned cab can be seen by the traveler since vehicles are always publishing it's locations)
- Location based queries
- There are certain data stored in DB with coordinates related to the stored resources (ex:- restaurants)
- A user set a rule (ex:- Alert me if there are vegetarian restaurants within 1km of my current location)
- As user navigates; current location is passed to server which performs a geo query in database existing data and return data if any matches the rules.
After finding Lightstreamer I feel it's a better fit for this. I am trying to figure out how the data adapters be used for these two user cases. For example;
For fleet tracking; should I create a data adapter per fleet(ex:- cab service 1 & 2)?
How should be the data adapter operate for the 2nd use case?
What is the optimal subscription mode for this kind of use cases (DISTINCT?)