Skip to content

ezrasingh/geoprox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoProx

A Geo-Proximity detection service for efficient real-time geo-aware contract pairing.

This is a service that allows you to determine which users are nearby a contract and can be applied to applications like Uber, Lyft, Grubhub.

Discussed @ Rust Indy.rs meetup

Goals

  • Keep track of approximate location of riders

  • When order is placed should return set of drivers nearby the pickup location

Getting Started

# with cargo
cargo run -- --help

# or if you have just
just run

API Endpoints

Method Endpoint Payload Description
POST /rider/ { uid: number, position: [number, number] } Place rider
DELETE /rider/ { uid: number } Remove rider
POST /search/ { distance: number, position: [number, number] } Search nearby riders

Todos

  • Improve testing coverage

    • Examine potential edge cases (i.e geohash region boundary)
  • Determine horizontal scaling strategy

    • Distributed in-memory cache could work
    • Another idea is distribute state via a consensus algorithm like Raft
    • Long term persistence may be achieved with a NoSQL solution
  • Add gRPC support and OpenAPI spec schema (w/ codegen)

  • Rename semantics to generalize the API conventions

    • "order" to "contract"
    • "rider" to "user"
  • Possibly handle internal queue state for riders (when active and not active)

  • Possibly leverage SSE for place_order in case a rider is not found at first.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published