Skip to content

basant-rai/tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ฐ๏ธ 10-Minute GPS Ping โ€” End to End Design

This diagram illustrates the high-concurrency pipeline from the Flutter driver app through the Go Gateway to the NestJS business engine.

sequenceDiagram
    autonumber
    participant App as CLient
    participant Go as โšก Go Gateway
    participant Redis as ๐Ÿ”ด Redis Stream
    participant Nest as ๐Ÿ”บ NestJS
    participant PG as ๐Ÿ˜ Postgres

    Note over App, Go: 1. Connection (WS + JWT)
    App->>Go: Upgrade to WebSocket + JWT
    Go->>Redis: EXISTS trip_active
    Redis-->>Go: true

    Note over App, Go: 2. GPS Ping (Every 10m)
    App->>Go: { lat, lng, speed, heading }
    Go->>Go: Validate & Rate Limit

    Note over Go, Redis: 3. Persistence
    Go->>Redis: XADD location_pings
    Go-->>App: ACK { type: "ack" }

    Note over Go, App: 4. Real-time Broadcast
    Go-->>App: Broadcast to Dashboard

    Note over Redis, PG: 5. Async Processing
    Nest->>Redis: XREADGROUP (nestjs-ingestion)
    Note right of Nest: Schema Switch & ETA Calc
    Nest->>PG: INSERT INTO tenant_schema
    Nest->>Redis: XACK (Confirm)
Loading

About

High-concurrency pipeline from the client app through the Go Gateway to the NestJS business engine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages