How rampump/ntripcaster works
2RTK NTRIP Caster is a Python service for receiving and distributing RTCM streams, with browser-based administration and optional multi-process sharding and external-caster relay. The main user workflow is: an administrator configures users and mount points in the web UI; NTRIP sources upload data and authenticated clients subscribe to it; the caster forwards the stream and exposes live connection and mount information. RTCM parsing supports STR correction and opt-in live visualization. Relationships are limited to README statements and the supplied source excerpts/index; unsampled implementation links are omitted where evidence is insufficient.
Main entry points: ntrip_reactor.py Epoll reactor · web.py Admin API and UI · shard_supervisor.py Shard supervisor · forwarder.py RTCM fan-out
Components 22
Web administration
- Admin API and UI
src/web.py - SQLite records
src/database.py - Browser interface
static/app.js
NTRIP data plane
- Epoll reactor
src/ntrip_reactor.py - Thread caster
src/ntrip.py - Handshake protocol
src/ntrip_protocol.py - Client authentication
src/ntrip_auth.py - Mount registration
src/ntrip_registrar.py - Connection state
src/connection.py - RTCM fan-out
src/forwarder.py - Protocol responses
src/ntrip_response.py
Sharding and state
- Shard supervisor
src/shard_supervisor.py - Process message bus
src/ntrip_bus.py - Cluster state
src/cluster_state.py - Aggregated web view
src/cluster_view.py
RTCM insights
- RTCM decoder
src/rtcm2.py - Parser manager
src/rtcm2_manager.py - Web parse subscriptions
src/web_parser_registry.py
External relay
- External caster relay
src/external_caster.py
Other components
- Administrator
- NTRIP clients
- Upstream caster
Connections 27
- Administrator → Admin API and UI: administers
README.md - NTRIP clients → Epoll reactor: connects to
README.md - NTRIP clients → Thread caster: connects to
README.md - Admin API and UI → SQLite records: manages records
README.md - Browser interface → Admin API and UI: uses API
- Epoll reactor → Handshake protocol: parses handshakes
src/ntrip_reactor.py - Epoll reactor → Client authentication: authenticates sources
src/ntrip_reactor.py - Epoll reactor → Mount registration: registers sources
src/ntrip_reactor.py - Epoll reactor → Connection state: tracks sessions
src/ntrip_reactor.py - Epoll reactor → RTCM fan-out: forwards streams
src/ntrip_reactor.py - Epoll reactor → Protocol responses: sends responses
src/ntrip_reactor.py - Thread caster → Client authentication: verifies clients
src/ntrip.py - Thread caster → RTCM fan-out: forwards streams
src/ntrip.py - RTCM fan-out → Connection state: updates connection stats
src/forwarder.py - Shard supervisor → Epoll reactor: starts shards
README.md - Shard supervisor → Process message bus: coordinates shards
README.md - Process message bus → Epoll reactor: transfers source frames
README.md - Shard supervisor → Aggregated web view: aggregates shard reports
src/shard_supervisor.py - Shard supervisor → Cluster state: uses shared state
src/shard_supervisor.py - Admin API and UI → Aggregated web view: reads cluster details
src/web.py - RTCM fan-out → RTCM decoder: provides stream data
src/rtcm2.py - Parser manager → RTCM decoder: manages parsers
src/rtcm2_manager.py - Admin API and UI → Web parse subscriptions: serves parse subscriptions
src/web.py - Web parse subscriptions → Parser manager: manages parse threads
- Epoll reactor → Process message bus: handles tap requests
src/ntrip_reactor.py - Epoll reactor → External caster relay: relays external mounts
src/ntrip_reactor.py - External caster relay → Upstream caster: fetches and relays
README.md