- Put the input files into the
./input
directory, and name themsource.txt
andsink.txt
. Ensure that the./output
directory exists. - Start the server by running
server.py
- Run the workers by running the script
worker.py
with
Our server will have two threads:
This thread receives messages and puts them into the queue.
This thread gets a message from the queue and sends it out to all clients
Each client will also have 2 threads
The reader thread will read threads from a file and send them to the server.
The writer will receive messages from the server and write them to a file.