TobiPeterG / OSMTraffic

Overview
GNU General Public License v3.0
8 stars 2 forks source link

Traffic Data Backend for OpenStreetMap: Project Overview

Project Summary

This project aims to build a traffic data aggregation server for Organic Maps (OM) that can collect, cache, and serve traffic information to enhance real-time routing and navigation for users. The solution leverages multiple traffic data sources, primarily from Datex2 and other national traffic APIs, and aims to be scalable, efficient, and open for use by Organic Maps and potentially other OpenStreetMap-based applications.

The system will periodically collect traffic data, cache it efficiently using Redis, and serve it to users via a RESTful API. This solution will be scalable and efficient to handle thousands of requests per second (RPS), with the potential to expand to millions of users over time.

Current Considerations

Data Sources

Tech Stack

Server Architecture

Key Challenges

Key Functionalities

Traffic Data Collection

The server will fetch traffic data every 5-10 minutes from Datex2 and other sources via API or scraping. Cache the fetched data in Redis for a specified duration to reduce unnecessary API requests and adhere to quota limits.

API Endpoints

Redis Caching

Caching will reduce external requests, store data in memory, and serve quick responses to clients. Redis will also allow us to run multiple instances of the backend with replication to ensure availability.

Client-Server Interaction

A service/app will send a request for traffic data when generating a route. The server will return real-time traffic data relevant to the route in response. The service/app can then display this data and adjust routes based on current conditions.

Expansion

The server can be adapted to support other OpenStreetMap-based apps like Organic Maps or OsmAnd, which can use the traffic data for better routing decisions.

Planned Architecture

Backend Components

Project Phases

Phase 1: Prototyping

Phase 2: Client Integration

Phase 3: Optimization and Scaling

Phase 4: Expansion

Development and Collaboration

Current progress

Resources and References

Collaborators

Open to contributions from the community, especially those familiar with Datex2 and traffic data systems. This README will be updated as the project progresses. Stay tuned for more updates and feel free to contribute or suggest improvements! :)