This project uses Apache Kafka to create a distributed pipeline that processes images
A master node splits an image into tiles and publishes them as tasks.
Multiple worker nodes consume these tasks, process the image tiles (e.g., grayscale), and publish the results.
Finally, the master node reconstructs the final image.
- Node 1: Master/Client
- Node 2: Kafka Broker
- Node 3: Worker 1
- Node 4: Worker 2
git clone https://github.com/kshirinshetty/100_Project3_BD.git
cd 100_Project3_BD
- Start ZooKeeper.
bin/zookeeper-server-start.sh config/zookeeper.properties - Start the Kafka serer.
bin/kafka-server-start.sh config/server.properties - Create the topics:
tasks,results,heartbeats. - Share BROKER_IP with everyone.
- Update the
broker_ipinmaster.pyorworker.py. - Create and activate a Python virtual environment.
- Install dependencies:
pip install -r requirements.txt
- NODE 2: (Kafka is running)
- NODE 3:
python worker.py worker-1 - NODE 4:
python worker.py worker-2 - NODE 1:
python master.py - NODE 1 Open http://127.0.0.1:5000 in a browser to use the application.