Giter VIP home page Giter VIP logo

reliable-pub-sub-service's Introduction

SDLE First Assignment

A Reliable publish-subscribe service that guarantees "exactly-once" delivery of the messages on top of ZeroMQ. Essentially, the system is composed of subscribers and publishers. The publishers can publish a message on a topic and the subscribers of a determined topic receive the messages posted on that topic. Developed in the course of Large Scale Distributed Systems by group T01G14.

Group members:

  1. Emanuel Trigo ([email protected])
  2. Fábio Huang ([email protected])
  3. Sara Pereira ([email protected])
  4. Valentina Wu ([email protected])

Installation and prerequisite

  1. Install Python3, see official website
  2. Install ZeroMQ, see official website
  3. Clone this repository:
git clone https://git.fe.up.pt/sdle/2022/t1/g14/proj1.git
  1. Head inside the this project folder, run the following command to install the necessary libraries:
pip install -r requirements.txt

Usage Guide

For this publish-subscribe service:

  • The Clients:

    • Are able to do the following operations:
      • SUB - Subscribes a Topic
      • UNSUB - Unsubscribes a Topic
      • PUT - Publishes a Message on a Topic
      • GET - Retrieves a Message from a Topic
    • Topics are identified by an arbitrary string
    • Topics are created implicitly when a subscriber subscribes to a topic that does not exist yet.
    • All subscriptions are durable, according to the Java Message Service's (Jakarta Messaging) terminology.
    • A topic's subscriber should get all messages put on a topic, as long as it calls GET enough times, until it explicitly unsubscribes the topic
  • The Server:

    • Receives the operations mentioned above from the clients and reacts to them accordingly

How to run

Server Side Application

Using the Command Line, for Windows users, inside the /src directory:

python server.py

Using the Command Line, for Linux or MacOS users, inside the /src directory:

python3 server.py

Note: Only one server should be running at a time

Client Side Application

Using the Command Line, for Windows users, inside the /src directory:

python client.py <CLIENT_ID>

Using the Command Line, for Linux or MacOS users, inside the /src directory:

python3 client.py <CLIENT_ID>

Note: More than one client can be initiated, as long as the <CLIENT_ID> are different from each other

While the Client Application is running, the following operation commands can be sent to the server side:

SUB <TOPIC_NAME>
UNSUB <TOPIC_NAME>
GET <TOPIC_NAME>
PUT <TOPIC_NAME> <MESSAGE_CONTENT>

For example, to PUT a message "Porto is very hot today" to the Topic "weather", enter:

PUT weather Porto is very hot today

reliable-pub-sub-service's People

Contributors

emantrigo avatar fabiomiguel2000 avatar pfs-fe-up-pt-github avatar saralp20 avatar valentinawu1112 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.