The aim of this project is to create a distributed message queue.
- The system will be accessed through a REST API.
- State will be kept consistent between the nodes with the Raft consensus algorithm.
The Raft REST Message Queue (RRMQ) will allow users to add (PUT) and consume (GET) messages from a specific topic.
- PUT(topic, message) the message will be appended to the end of the topic’s message queue
- GET(topic) will pop the first message from the topic’s queue and return the message
- GET(topics) will return the list of topics
- PUT(topic) will create a new topic
Message queues will follow a first-in-first-out (FIFO) mode. Messages will be consumed (GET) only once by only one consumer. This implies that the nodes have to work together to ensure that not only is the queue kept consistent when messages are added (PUT), but also when messages are consumed (GET). RRMQ combines distribution, consistency, replication, fault tolerance, consensus, and messaging.
python src\node.py config\server_config.json 0
python src\message_client.py
coverage run --source src -m pytest
coverage html