nammayatri / nammayatri

A Direct-to-Driver open mobility platform powering the next-generation of mobility applications in India.
https://nammayatri.in
GNU Affero General Public License v3.0
1.6k stars 177 forks source link

Save the Customer Location Array in Clickhouse and Expose it using an API #463

Open sidsethujuspay opened 1 year ago

sidsethujuspay commented 1 year ago

Send the location updates from the customers device (if enabled by the customer) to Backend, and store it in Clickhouse via Kakfa. Expose the data using an API that fetches points from Clickhouse using ride id.

Magizhan commented 1 year ago

@sidsethujuspay Do we have any API with CKH as datastore now? How reliable is it? Can we not use Redis instead?

Magizhan commented 1 year ago

@sidsethujuspay Can you also explain the rationale behind this feature request?

sidsethujuspay commented 1 year ago

Yes @Magizhan , we do have an API that returns the ride Route by fetching the Driver's location updates. It is fairly reliable based on current testing. Using Redis would make sense for a shorter time frame storage requirement. We would ultimately want to dump it in a less expensive datastore.

The rationale is to setup the ability to use customer's location information for multiple purposes which we can arrive at later (e;g: Tracking for safety, reinforcement for fare recomputation etc.).