Skip to content

Commit

Permalink
📖
Browse files Browse the repository at this point in the history
  • Loading branch information
kristiyanto authored Oct 6, 2016
1 parent 4ff3c83 commit cc4c203
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ The matching is heuristic, and driver-centric:
## Dashboard and Queries
The dashboard put the drivers and passengers on the map in realtime fashion within 1 hour window. Since the data is simulated, some passengers and drivers may appear on unlikely places (e.g. river/lake).


![alt tag](media/screenshot.png)

Green dots represent passengers, Blue represents drivers. Green inside blue represents passenger(s) on a trip.
The stats:
- Total cabs: total active drivers (including idle, on trip, and dispatched drivers)
Expand All @@ -36,6 +39,9 @@ The stats:
- Passenger waiting: total passengers not assigned to any drivers
- Average waiting time: in seconds, average time between waiting passengers to the time passengers hop on into the car.

Other queries that performed internally:
- Check nearby passangers

## Architecture
__Ingestion layer__
Data streams for passengers and drivers generated separately in python (kafka producers), and ingested in Kafka as different topics. Kafka is set with 4 hours retention policy.
Expand All @@ -46,7 +52,7 @@ __Stream processing__
Stream processing is performed in Spark Streaming with window 3 seconds, consuming data streams from both drivers and passangers. Every incoming messages are subject of sanity check: e.g. driver's reported status is matched with previous status, etc. to anticipate latency.

__Sink__
Elasticsearch is used as the buffer/transactional interface for the resulted messages
Elasticsearch is used as the buffer/transactional interface for the resulted messages. Elasticsearch is also called by Spark to enable assigments. Elasticsearch geo location and boolean queries are leveraged.

__Output__
Output is served as API by using Flask. Bootstrap2, jquery and leaflet is used to prettify the output.
Expand Down

0 comments on commit cc4c203

Please sign in to comment.