Skip to content

florin414/meridian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Meridian πŸŒπŸ“

Rust Algorithm Throughput License

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.

πŸ—οΈ Architecture: The Spatial Index

1. In-Memory Quadtree

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.

2. Write-Heavy Optimization

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.

πŸ› οΈ Tech Stack

  • Language: Rust
  • Spatial Index: Custom Quadtree / Geohash
  • Event Log: Apache Kafka
  • History Store: Apache Cassandra (ScyllaDB compatible)
  • API: gRPC

πŸš€ Usage

// 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);
});

About

A geospatial event processing engine built in Rust. Features a custom in-memory Quadtree implementation for zero-latency geofencing and high-write throughput tracking for global logistics fleets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors