Giter Site home page Giter Site logo

chat21-server's Introduction

Chat21 Real Time messaging engine

๐Ÿš€ Do you want to install Tiledesk on your server with just one click?

Use Docker Compose Tiledesk installation guide

Chat21 Real Time messaging engine is a simple "observer" on RabbitMQ Message Brocker.

Chat21 Client Applications use MQTT protocol to connect to RabbitMQ. Each end-user writes outoging messages on a specific path where his RabbitMQ JWT Token allows him to write.

MQTT Outgoing path example:

/apps/tilechat/users/USER-ID/RECIPIENT-USER-ID/messages/outgoing

The Client application connected with MQTT to RabbitMQ, sends the message as a JSON payload to the /outgoing path.

The observer subscribes himself to these paths. As soon as he gets notified of an outgoing message the same message payload is forwarded (AMQP publish operation) to the recipient path:

/apps/tilechat/users/RECIPIENT-USER-ID/SENDER-USER-ID/messages/clientadded

The recipient will receive the MQTT publish notification on the incoming path decoding it as a new message based on the final part of the path, that always indicates the type of operation on that path:

/clientadded = new payload (a message) arrived on the path.

Using this observer Chat21 implements the "inbox" concept. Messages are not delivered directly with shared path between the two clients, but rather delivered through this observer who can take additional actions to improve privacy, security, persistence and apply other policies on messages (i.e. blocking users).

Moreover, a granular security can be applied with the "inbox" pattern, using RabbitMQ JWT Tokens specification, where a user can only read and write on his own, specific paths, never reading or writing directly on other users inboxes.

The inbox pattern just works like email SMTP/POP3 protocols. The message is sent from the user to his own SMTP server inbox (the /outgoing path), as an outgoing message. The "observer" (this application), gets the message and sends it to the recipient's SMTP server (the recipient inbox path) with a /clientadded action where the recipient itself will receive the message as soon as he connects to RabbitMQ through MQTT.

Docker Build

docker build -t chat21/chat21-server:dev .

docker push chat21/chat21-server:dev

docker run chat21/chat21-server:dev

chat21-server's People

Contributors

andrealeo83 avatar sponzillo 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.