Hermes is a scalable, GRPC based messaging service.
Nats-Streaming
PostgreSQL
Redis
- Channel: Channel is the basis of all communications in hermes, each user has it's own channel, each group is a channel, and each broadcast is a channel. Channels are basically NATS channels but they are persistant using a PostgreSQL database.
- Message: Messages are the data people send to each other, it could be a simple text message or a complex reply to another message maybe with a GIF.
- User: Users are the people :). Users are here to only know who has what permission but other than that, hermes is built entirely on the idea of channels and messages.
Hermes uses Nats-Streaming as pub/sub service and uses nats concept of channels as a way of communication between two users. Each new event will be published to a channel and the eventHandler specific to the event (there are only two event handlers) will deliver the event to the users using GRPC streaming.
- User creates a connection to hermes event buff with a valid JWT token.
- Hermes subscribe user to user-discovery
- User sends a new message to Hermes
- Hermes finds target channel of the message (based on recipient, or if message itself has a channel)
- Hermes makes sure that all members of target channel are subscribed to channel.
- Hermes based on strategy and channel type decides whether to save the message or not.
- Hermes sends message into channel (publishes message into nats).
- other users that are subscribed to channel receive the message.
git clone github.com/hermeschat/engine/
cd hermes
docker-compose up .
Hermes uses MIT license for more information read licence file.