OxiGDAL-WS: WebSocket Streaming for Real-time Geospatial Data
WebSocket streaming support for OxiGDAL, enabling real-time delivery of geospatial data to web and mobile applications.
Features
- WebSocket Server: High-performance Axum-based server with connection management
- WebSocket Client: Async client with automatic reconnection support
- Multiple Protocols: JSON, MessagePack, and Binary formats with Zstandard compression
- Tile Streaming: Real-time map tile delivery with delta encoding
- Feature Streaming: GeoJSON feature updates with change detection
- Event Streaming: System events, progress updates, and notifications
- Subscription Management: Spatial, temporal, and attribute-based filtering
- Backpressure Control: Automatic throttling and flow control
Installation
Add this to your Cargo.toml:
[]
= "0.1"
Usage
Server
use *;
async
Client (Rust)
use *;
async
Client (JavaScript)
const ws = ;
// Subscribe to viewport
ws.;
// Receive tiles
ws ;
Features Streaming
// Subscribe to feature updates
let sub_id = client.subscribe_features.await?;
// Get feature stream
let mut features = client.feature_stream;
while let Some = features.next_feature.await
Event Streaming
// Subscribe to events
let sub_id = client.subscribe_events.await?;
// Get event stream
let mut events = client.event_stream;
while let Some = events.next_event.await
Protocol Formats
JSON (Human-readable)
MessagePack (Efficient, default)
Compact binary format, typically 30-50% smaller than JSON.
Binary with Zstandard Compression
Maximum efficiency for large data transfers, typically 60-80% size reduction.
Use Cases
- Real-time satellite imagery delivery: Stream newly acquired imagery as it becomes available
- Live tracking applications: Update vehicle/asset positions in real-time
- Collaborative editing: Synchronize edits across multiple users
- Change monitoring: Detect and stream environmental changes as they occur
- Streaming analytics: Deliver analysis results progressively
- Live sensor data: Stream real-time IoT sensor readings
Architecture
┌─────────────┐ WebSocket ┌─────────────┐
│ Clients │ ◄────────────────► │ Server │
│ │ │ │
│ Browser │ Subscribe Tiles │ Tile Handler│
│ Mobile App │ Subscribe Features│Feature Hdlr │
│ Desktop │ Subscribe Events │Event Handler│
└─────────────┘ └─────────────┘
│
│
┌──────▼──────┐
│ OxiGDAL Core│
│ Dataset │
│ Processing │
└─────────────┘
Performance
- Connections: Supports 10,000+ concurrent WebSocket connections
- Throughput: Up to 1 GB/s tile streaming (with delta encoding)
- Latency: <10ms message round-trip time (localhost)
- Compression: 60-80% size reduction with Zstandard
- Delta Encoding: 70-90% bandwidth savings for tile updates
Pure Rust
OxiGDAL-WS is 100% Pure Rust with no C/C++ dependencies, ensuring memory safety and cross-platform compatibility.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Contributing
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Authors
Copyright © 2026 COOLJAPAN OU (Team Kitasan)