Coder Social home page Coder Social logo

feup-sdle-proj1's Introduction

SDLE First Assignment

SDLE First Assignment of group T04G11.

Group members:

  1. Bruno Rosendo ([email protected])
  2. Henrique Nunes ([email protected])
  3. João Mesquita ([email protected])
  4. Rui Alves ([email protected])

Required Libraries

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/.

How to run

First of all, you must build the project by simply running make under the src/ folder.

Broker

To run the broker you simple need to run "broker_exec"

Client

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"

Data

Client data

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.

Broker’s topic_manager.txt file structure:

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

Clients’ saved files structure:

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

feup-sdle-proj1's People

Contributors

brunorosendo avatar monkin77 avatar pfs-fe-up-pt-github avatar rikenunes8 avatar ruialves35 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.