{"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":16,"y":16,"width":288,"height":894,"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":36,"y":34,"width":248,"height":858,"fontSize":22,"fontFamily":1,"text":"REAL-TIME LAYER\n\n• Location Ingestion\nPipeline\nDriver App →\nWebSocket/gRPC →\nLocation Gateway →\nKafka\n(location-updates\ntopic) → Location\nIndex Updater →\nGeospatial Store\n(Redis + H3) → Trip\nTracker (if driver in\nactive trip → update\nbreadcrumbs)\n\n• Push / Streaming\nLayer\n• WebSocket\nconnections to rider\n+ driver apps\n• Server-Sent Events\n(SSE) as fallback\n• Firebase Cloud\nMessaging (FCM) /\nAPNs for push\n• 1.5M concurrent\nconnections (riders +\ndrivers)","originalText":"REAL-TIME LAYER\n\n• Location Ingestion\nPipeline\nDriver App →\nWebSocket/gRPC →\nLocation Gateway →\nKafka\n(location-updates\ntopic) → Location\nIndex Updater →\nGeospatial Store\n(Redis + H3) → Trip\nTracker (if driver in\nactive trip → update\nbreadcrumbs)\n\n• Push / Streaming\nLayer\n• WebSocket\nconnections to rider\n+ driver apps\n• Server-Sent Events\n(SSE) as fallback\n• Firebase Cloud\nMessaging (FCM) /\nAPNs for push\n• 1.5M concurrent\nconnections (riders +\ndrivers)","textAlign":"left","verticalAlign":"middle","containerId":"shape-0","lineHeight":1.3,"autoResize":false,"customData":{"revealStep":1}},{"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-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":16,"y":954,"width":288,"height":1037,"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":36,"y":972,"width":248,"height":1001,"fontSize":22,"fontFamily":1,"text":"GEOSPATIAL INDEX\n\n• Driver Location\nStore\nIndex: H3 hexagonal\ngrid (resolution 7,\n~5.16 km² per cell)\nRedis Geospatial:\nGEOADD\ndrivers:available:uber\nx <lng> <lat>\ndriver_id\nGEORADIUS\ndrivers:available:uber\nx <lng> <lat> 5 km →\nReturns nearest\navailable drivers\nwithin 5 km\nWhy H3 hexagons:\n• Uniform area (unlike\ngeohash rectangles\nat poles)\n• Clean neighbor\ntraversal (6\nneighbors, all equal\nsize)\n• Uber open-sourced\nH3 specifically for\nthis use case\n• Resolution 7: ~5.16\nkm² cells — good for\ncity-level ops\n• Resolution 9: ~0.11\nkm² cells — good for\nblock-level","originalText":"GEOSPATIAL INDEX\n\n• Driver Location\nStore\nIndex: H3 hexagonal\ngrid (resolution 7,\n~5.16 km² per cell)\nRedis Geospatial:\nGEOADD\ndrivers:available:uber\nx <lng> <lat>\ndriver_id\nGEORADIUS\ndrivers:available:uber\nx <lng> <lat> 5 km →\nReturns nearest\navailable drivers\nwithin 5 km\nWhy H3 hexagons:\n• Uniform area (unlike\ngeohash rectangles\nat poles)\n• Clean neighbor\ntraversal (6\nneighbors, all equal\nsize)\n• Uber open-sourced\nH3 specifically for\nthis use case\n• Resolution 7: ~5.16\nkm² cells — good for\ncity-level ops\n• Resolution 9: ~0.11\nkm² cells — good for\nblock-level","textAlign":"left","verticalAlign":"middle","containerId":"shape-2","lineHeight":1.3,"autoResize":false,"customData":{"revealStep":2}}],"appState":{"viewBackgroundColor":"#fbfbf8","gridSize":null},"files":{}}