{"type":"excalidraw","version":2,"source":"https://AwesomeSystemDesign.dev","elements":[{"angle":0,"strokeColor":"#6577aa","backgroundColor":"#eef1fc","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-1"],"frameId":null,"roundness":null,"boundElements":[{"type":"text","id":"shape-1"}],"updated":0,"link":null,"locked":false,"id":"shape-0","type":"rectangle","seed":41,"x":36,"y":32,"width":390,"height":504,"customData":{"revealStep":1}},{"angle":0,"strokeColor":"#394557","backgroundColor":"transparent","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-1"],"frameId":null,"roundness":null,"boundElements":null,"updated":0,"link":null,"locked":false,"id":"shape-1","type":"text","seed":114,"x":56,"y":50,"width":350,"height":468,"fontSize":18,"fontFamily":1,"text":"REAL-TIME LAYER\n\n• Location Ingestion Pipeline\nDriver App → WebSocket/gRPC →\nLocation Gateway → Kafka\n(location-updates topic) → Location\nIndex Updater → Geospatial Store\n(Redis + H3) → Trip Tracker (if\ndriver in active trip → update\nbreadcrumbs)\n\n• Push / Streaming Layer\n• WebSocket connections to rider +\ndriver apps\n• Server-Sent Events (SSE) as\nfallback\n• Firebase Cloud Messaging (FCM) /\nAPNs for push\n• 1.5M concurrent connections (riders\n+ drivers)","originalText":"REAL-TIME LAYER\n\n• Location Ingestion Pipeline\nDriver App → WebSocket/gRPC →\nLocation Gateway → Kafka\n(location-updates topic) → Location\nIndex Updater → Geospatial Store\n(Redis + H3) → Trip Tracker (if\ndriver in active trip → update\nbreadcrumbs)\n\n• Push / Streaming Layer\n• WebSocket connections to rider +\ndriver apps\n• Server-Sent Events (SSE) as\nfallback\n• Firebase Cloud Messaging (FCM) /\nAPNs for push\n• 1.5M concurrent connections (riders\n+ drivers)","textAlign":"center","verticalAlign":"middle","containerId":"shape-0","lineHeight":1.3,"autoResize":false,"customData":{"revealStep":1}},{"angle":0,"strokeColor":"#628572","backgroundColor":"#edf5ee","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-2"],"frameId":null,"roundness":null,"boundElements":[{"type":"text","id":"shape-3"}],"updated":0,"link":null,"locked":false,"id":"shape-2","type":"rectangle","seed":187,"x":466,"y":32,"width":390,"height":550.8000000000001,"customData":{"revealStep":2}},{"angle":0,"strokeColor":"#394557","backgroundColor":"transparent","fillStyle":"solid","strokeWidth":1.5,"strokeStyle":"solid","roughness":0.7,"opacity":100,"version":1,"versionNonce":1,"isDeleted":false,"groupIds":["step-2"],"frameId":null,"roundness":null,"boundElements":null,"updated":0,"link":null,"locked":false,"id":"shape-3","type":"text","seed":260,"x":486,"y":50,"width":350,"height":514.8000000000001,"fontSize":18,"fontFamily":1,"text":"GEOSPATIAL INDEX\n\n• Driver Location Store\nIndex: H3 hexagonal grid (resolution\n7, ~5.16 km² per cell)\nRedis Geospatial: GEOADD\ndrivers:available:uberx <lng> <lat>\ndriver_id GEORADIUS\ndrivers:available:uberx <lng> <lat> 5\nkm → Returns nearest available\ndrivers within 5 km\nWhy H3 hexagons:\n• Uniform area (unlike geohash\nrectangles at poles)\n• Clean neighbor traversal (6\nneighbors, all equal size)\n• Uber open-sourced H3 specifically\nfor this use case\n• Resolution 7: ~5.16 km² cells —\ngood for city-level ops\n• Resolution 9: ~0.11 km² cells —\ngood for block-level","originalText":"GEOSPATIAL INDEX\n\n• Driver Location Store\nIndex: H3 hexagonal grid (resolution\n7, ~5.16 km² per cell)\nRedis Geospatial: GEOADD\ndrivers:available:uberx <lng> <lat>\ndriver_id GEORADIUS\ndrivers:available:uberx <lng> <lat> 5\nkm → Returns nearest available\ndrivers within 5 km\nWhy H3 hexagons:\n• Uniform area (unlike geohash\nrectangles at poles)\n• Clean neighbor traversal (6\nneighbors, all equal size)\n• Uber open-sourced H3 specifically\nfor this use case\n• Resolution 7: ~5.16 km² cells —\ngood for city-level ops\n• Resolution 9: ~0.11 km² cells —\ngood for block-level","textAlign":"center","verticalAlign":"middle","containerId":"shape-2","lineHeight":1.3,"autoResize":false,"customData":{"revealStep":2}}],"appState":{"viewBackgroundColor":"#fbfbf8","gridSize":null},"files":{}}