jasmine
In-memory nearest-point finder built on a K-D tree, with gRPC and REST APIs, TTL, GeoJSON export, and OSRM integration.
- Year
- 2024
- Built with
- Go, gRPC, REST, OSRM
- Links
Finding the point nearest to a location is a building block for routing and dispatch. jasmine keeps points in memory and answers nearest-neighbor queries with a K-D tree: a binary tree that splits space along alternating axes, so each lookup only visits a small part of the data.
Features
- In-memory store with backup and restore to file
- gRPC and REST APIs
- TTL for expiring points
- Export to GeoJSON
- OSRM integration
Benchmarks
Go benchmarks on an Intel Core i5-1135G7:
| Operation | Time per op |
|---|---|
| Store a point | 132.5 ns |
| Get data | 280.1 ns |
| Get data as GeoJSON | 407.7 ns |
| Nearby query | 918.5 ns |