SDLE First Assignment of group T04G11.
Group members:
- Bruno Rosendo (up201906334@fe.up.pt)
- Henrique Nunes (up201906852@fe.up.pt)
- João Mesquita (up201906682@fe.up.pt)
- Rui Alves (up201905853@fe.up.pt)
Since the project is implemented on top of ZeroMQ Library, the user must install the required libraries libzqm and zqmpp to use it, as explained in https://zeromq.org/download/.
First of all, you must build the project by simply running make
under the src/
folder.
To run the broker you simple need to run "broker_exec"
To run the client, you must specify the operation, client id, topic id and an optional message, according to the operation:
- client_exec <operation> <clientId> <topicId> [message]
- client_exec get 1 topic1
- client_exec put 1 topic1 "this is a nice message"
The data stored in the client is contained in folders whose names are the client IDs. Those folders have files whose name is composed by the operation and the topic's ID. Its information is the current message ID of the missing message on that topic.
numberTopics
for each topic:
topicName
numberMessages
for each message:
messageId
message
numberSubscribers
for each subscriber:
clientId
lastMessageId
lastReadMsgIndex
numberTopics
for each topic:
topicName
numberTopicMessages
for each message:
messageId
numberTopics
for each topic:
topicName
lastMessagesTopicSize
for each client:
clientId
lastSubMsgId
lastUnsubMsgId
File name Explanation:
- The Client folder contains a folder for each clientID (named after its id).
- Inside a Client’s folder, they can have the following files:
- get_<topic_name>.txt
- put_<topic_name>.txt
- sub_<topic_name>.txt
- unsub_<topic_name>.txt
- Each file contains a
MessageID