Meridian is a specialized ingestion engine for moving assets. It solves the "Range Query" problem at scale: checking if thousands of moving trucks have entered arbitrary polygons (Geofences) in real-time.
Standard databases (PostGIS) are excellent for storage but struggle to trigger events for millions of updates per second. Meridian moves the spatial indexing logic into the application memory using Rust.
Meridian maintains a lock-free, concurrent Quadtree structure in RAM.
-
Ingestion: When a GPS coordinate arrives, it is mapped to a leaf node in
$O(\log N)$ . - Evaluation: Point-in-Polygon checks are performed using SIMD-optimized ray casting algorithms against active geofences.
To handle the massive write load of fleet telemetry:
- Journaling: Updates are first appended to an immutable commit log (Kafka).
- Batching: A Rust consumer batches updates and flushes them to Cassandra (for location history) and Redis (for last-known location) to minimize IOPS.
- Language: Rust
- Spatial Index: Custom Quadtree / Geohash
- Event Log: Apache Kafka
- History Store: Apache Cassandra (ScyllaDB compatible)
- API: gRPC
// Defining a Geofence via the Rust SDK
let warehouse_zone = Polygon::new(vec![
Point::new(44.42, 26.10),
Point::new(44.43, 26.11),
// ...
]);
engine.register_fence("zone_101", warehouse_zone, |event| {
println!("Truck {} entered Warehouse!", event.asset_id);
});