This repository provides a high-level public overview of a high-performance multimodal routing platform built in Go.
At its core, the system includes an in-memory graph database optimized for multimodal route search, capable of computing realistic itineraries across flights, trains, suburban trains, buses, ferries, and in-city transfers.
The platform exposes this capability as a white-label B2B/B2C solution for travel companies.
This document describes the architecture and engineering approach only — it contains no production code, datasets, or client-specific logic.
Building a practical multimodal routing engine at scale requires:
- combining multiple transport modes (air/rail/bus/ferry/local transfers)
- handling schedules for millions of flights, trains, and buses updated in near real time
- respecting transfer rules and minimum connection windows
- supporting millions of combinations of business preferences to prioritize or suppress directions, nodes, and routes
- delivering low-latency responses suitable for B2B/B2C user-facing applications
While several research algorithms exist (e.g., RAPTOR, CSA and related approaches), none of them solve real-world multimodal routing "as is". Practical deployments require substantial adaptation, hybrid strategies, and domain-specific optimizations to handle time-dependent schedules, multiple transport modes, transfers, and business constraints at global scale.
The routing engine:
- stores the full routing graph in memory
- represents segments for flights, trains, buses, ferries, and local transfers
- runs best-K path search with RAM- and CPU-optimized algorithms
- supports flexible business rules for ranking and filtering routes
Key implementation techniques:
- stateful services with pre-loaded dictionaries, configuration, and the entire graph
- sharded graph representation to split the workload
- bitmasks and direct references instead of hashmaps where possible
- reusable structures via memory pools on top of arrays
- multi-level caching: RAM, local (sidecar) Redis, remote Redis
- immutable dictionaries for repeating parts of replies
- compact request/response packets over bidirectional streams to reduce network overhead
These techniques were combined to maintain low latency and reasonable memory usage over a very large dataset.
Around the routing core, the system exposes a full-featured white-label platform enabling:
- airlines, railway operators, bus companies, and travel agencies to offer multimodal connectivity
- configuration of business preferences to promote or suppress specific routes, nodes, or directions
- detailed and aggregated statistics for each request and result
- ML-based components used to estimate optimal cache TTLs for ticket availability and pricing data
Core services and APIs:
- Go for all backend services
- Protobuf + gRPC for internal communications
- Streaming REST API for front-end and integration clients
Data, storage, and messaging:
- Postgres
- Mongo (after an initial phase with Cassandra)
- Redis
- ClickHouse (analytics and ML data)
- RabbitMQ initially, later migrated to Kafka
DevOps and operations:
- CI/CD automation
- Full suite of load tests, unit tests, and custom-DSL-based integration tests
- Docker and Kubernetes (cloud and bare metal), supporting multiple fully isolated environments
- Ruby on Rails for the admin panel (later migrated to ReactJS)
- Prometheus + Grafana for metrics, ELK stack for structured logs
- Python with TensorFlow and SciKit-Learn for ML pipelines
For collaboration or technical inquiries:
- Email: konstantin@disciplinedware.com
- Maintainer: Konstantin Trunin — https://www.linkedin.com/in/ktrunin