Glasgow Bus Tracker

?

About Bus Routes Map

×

This service provides a open source real-time bus route visualization platform, allowing glasgow residents to search routes by service number or destination and display the full route, complete with stops, on an interactive map.

Infrastructure and Architectural Overview

The primary objective of this project is to demonstrate a secure, scalable, and highly efficient infrastructure setup capable of maintaining high-volume client throughput.

  • Core Messaging: The backend uses NATS for secure, high-speed, and efficient messaging between components.
  • Security: To mitigate credential compromise, client and bus publisher access credentials are JWTs that are rotated automatically every two hours.
  • Frontend Deployment: The visualization layer is deployed globally on Cloudflare Pages
  • Backend Stack: The core simulation and data aggregation (using data from a Public Transport API and OpenStreetMap) runs on a dedicated Hetzner VPS located in in Nuremberg Germany, using the minimal, immutable TalosOS, running Kubernetes.
  • Cost Efficiency: This architecture's minimal setup is designed to handle message volumes equivalent to Greater Glasgow area traffic data feeds and can easily be scaled to handle more. It operates at an extremely low monthly cost (approximately €6/month max, including all charges, assuming 24/7 operation), requiring no human intervention, with changes being easy to make through an authenticated kubectl client. Review the benchmark for this system's underlying messaging performance here.

Repository: https://github.com/Stanisaur/bus-infra/tree/main