Building streaming event pipeline around Apache Kafka and its ecosystem (REST Proxy, Kafka Connect), that allows to simulate and display the status of train lines in real time.
You are constructing a streaming event pipeline around Apache Kafka and its ecosystem. Using public data from the Chicago Transit Authority you will construct an event pipeline around Kafka that allows us to simulate and display the status of train lines in real time. When the project is completed, you will be able to monitor a website to watch trains move from station to station.
- Install Docker, make sure Docker Compose is installed too
- If you are on Windows machine, install: Windows Subsystem for Linux (WSL) version 2 link
- Install Ubuntu 20.04
- If you are on Windows machine, also install
librdkafkalibrary link, make sure to install what is needed from this link too - Inside Ubuntu, in a terminal instance run
docker-compose up- You can check status of the environment by running
docker-compose psin a new terminal instance
- You can check status of the environment by running
There are 2 pieces of the simulation, producer and consumer, each of them can be run separately. To run end-to-end simulation, run all the pieces together(in different terminal windows):
-
To run the
producer:cd producersvirtualenv venv. venv/bin/activatepip install -r requirements.txtpython simulation.pyHitCtrl+Cat any time to exit.
-
To run the Faust Stream Processing Application:
cd consumersvirtualenv venv. venv/bin/activatepip install -r requirements.txtfaust -A faust_stream worker -l info
-
To run the KSQL Creation Script:
cd consumersvirtualenv venv. venv/bin/activatepip install -r requirements.txtpython ksql.py
-
To run the
consumer:cd consumersvirtualenv venv. venv/bin/activatepip install -r requirements.txtcpython server.pyHitCtrl+Cat any time to exit.
- To stop Docker run
docker-compose stopin a terminal instance - To clean up the containers to reclaim disk space, run
docker-compose rm -v

