A real-time maritime tracking system that simulates AIS (Automatic Identification System) data, validates it, and processes it using Kafka, PostgreSQL (PostGIS), and Docker.
AIS is an automatic tracking system used by ships to broadcast:
- Position (latitude/longitude)
- Speed & course
- Heading & destination
- MMSI (unique ship ID)
AIS data is received by terrestrial stations & satellites and used for real-time vessel tracking.
Source: NATO Shipping Centre
This system simulates real-time AIS data, streams it using Kafka, processes it with Python services, and stores it in PostGIS for further analytics.
| Component | Tech Stack | Purpose |
|---|---|---|
| Messaging | Kafka, Zookeeper | Stream AIS data |
| Storage | PostgreSQL + PostGIS | Store ship positions |
| Processing | Python, Kafka Consumers | Validate & enrich AIS data |
| Containerization | Docker, Docker Compose | Run the system in containers |
| Visualization | Elasticsearch (Future) | Real-time dashboards |
| Topic Name | Purpose |
|---|---|
ais.raw.data |
Raw AIS messages from ships |
ais.valid.data |
Valid AIS messages |
ais.bad.data |
Faulty or missing AIS data |
| Service | Function |
|---|---|
ais-producer.py |
Generates & streams AIS data to Kafka |
ais-validator.py |
Filters invalid AIS data |
ais-db-consumer.py |
Stores valid AIS data in PostgreSQL |
git clone https://github.com/labibmnsr/ais-tracking.git
cd ais-tracking- Fork the repo
- Create a new branch (git checkout -b feature-xyz)
- Commit your changes (git commit -m "Added xyz feature")
- Push to the branch (git push origin feature-xyz)
- Open a pull request!