Giter Club home page Giter Club logo

messagedeliverysystem's Introduction

MessageDeliverySystem

This project designs and implements a message delivery system using Python. It includes the following parts:

HUB:

The Hub relays incoming message bodies to receivers based on user ID(s) defined in the message. The hub can for example assign arbitrary (unique) user id to the clients as they connect.

  • user_id - unsigned 64 bit integer
  • Connection to hub is done using pure TCP.

CLIENTS:

Clients are users who are connected to the hub. Client can send three types of messages which are described below.

Identity message -

A Client can send an identity message which the hub will respond with the user_id of the connected user.

List message -

Client can send a command to list messages, which cause the hub to answer with the list of all connected client user_ids (excluding the requesting client).

Relay message -

Clients can send relay messages where the body of the message is relayed to the receivers marked in the message. The message body can be relayed to one or multiple receivers.

  • max 255 receivers (user_id:s) per message
  • message body - byte array (text, JSON, binary, or anything), max length 1024 kilobytes

HOW TO RUN THE PROJECT -

  • Start the Server in a terminal - Run python server.py

  • Start different Clients in different terminals - Run python client.py

    Now one can enter different commands such as 1 to list all connected clients, 2 to relay message to different clients.

messagedeliverysystem's People

Contributors

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