Technology Requirements - COS301-SE-2025/Swift-Signals GitHub Wiki
๐ ๏ธ Swift Signals Technology Requirements
This document outlines the required technologies, tools, and environments used in the development and deployment of the Swift Signals traffic optimization system.
๐งฉ System Overview
Swift Signals is a web-based traffic simulation and optimization platform that helps traffic planners configure and optimize intersection parameters using simulations and AI. The system is designed using a microservices architecture with modern technologies to ensure scalability, maintainability, and performance.
โ๏ธ Technology Stack
๐ฅ๏ธ Frontend
- Framework: React
- Build Tool: Vite
- Language: TypeScript
- Styling: Tailwind CSS
๐ API Gateway
- Language: Go
- Function: Request routing, load balancing, authentication validation, and service aggregation
- Communication: HTTP/gRPC
๐ค User Authentication Service
- Language: Go
- Authentication: JWT-based login and signup
- Database: MongoDB
๐ฆ Simulation Service
- Language: Go + Python (via SUMO integration)
- Simulation Engine: SUMO (Simulation of Urban MObility)
- Function: Run traffic scenarios with configurable intersection parameters
โฑ๏ธ Optimization Service
- Language: Go
- Techniques: Swarm Optimisation Algorithms
- Function: Optimise signal timing based on traffic flow, intersection type, etc.
๐ Metrics Service
- Language: Go
- Function: Collect statistics (simulation duration, optimization success rate, resource usage)
- Database: Prometheus + local time-series DB
๐ง Controller Service
- Language: Go
- Function: Orchestrates flow between simulation and AI services
๐ Communication
- Protocol: gRPC for inter-service communication
- Gateway Interface: REST (user-facing) with JSON
- API Documentation: Protobuf definitions (.proto) for all services, linked in the Service Contracts
๐งช Development & Deployment
๐ฅ๏ธ Local Development
- Platform: Minikube
- Containerization: Docker
- Orchestration: Kubernetes
- Dev Tools: Tilt, Skaffold (optional for hot-reload / sync)
โ๏ธ Target Deployment Environments
- Option 1: On-premises server at client location
- Option 2: Cloud-hosted (e.g., GCP, AWS, DigitalOcean)
- Must support:
- Kubernetes
- Docker Registry
- Load balancing and ingress controllers
๐ Observability
๐ Logging
- In-Service Logging: Zap (Go), Logrus (Go), or Python logging
- Log Aggregation: Grafana Loki
- Log Collection: Promtail or Fluent Bit
๐ Monitoring & Dashboards
- Monitoring: Prometheus
- Dashboards: Grafana
- Metrics Exporters: prometheus/client_golang for Go services
๐งฑ Design Principles
- Open Source Compliance: All core components are based on open-source libraries (e.g., SUMO, Prometheus, Grafana)
- Portability: Easily deployable on any compliant Kubernetes cluster
- Extensibility: Easily add support for new intersection types, AI models, or metrics
- Security: JWT authentication, RBAC support, secure gRPC with optional TLS