Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 1.26 KB

Readme.md

File metadata and controls

79 lines (57 loc) · 1.26 KB

Introduction

Built a Distributed Chat system with Golang, Cassandra and Redis. Scalling Websocket servers with redis Pub/Sub and storing message in Cassandra. Made this project for educational purpose.

Detailed Explanation on System Architecture: https://dev.to/leoantony72/distributed-chat-application-22oo

 

Running the application

docker-compose up -d

CRUD Routes

Routes Method Description
/user POST Create a User
/room POST Create a Room
/joinroom POST Join in a Room

Websocket Connection

ws:/localhost/chat?id=username

Examples

  • /user
{
    "username":"JOHN"
}
  • /room
{
    "name":"anime",
    "user":"JOHN"
}
  • /joinroom
{
    "name":"anime",
    "user":"JOHN"
}
  • Private Chat - Websocket
{
    "msg":"hello Boi",
    "receiver":"2GKtMkzDZDerO2a1gl5IHK6OTPY",
    "is_group":false
}
  • Group Chat - Websocket
{
    "msg":"hello Boi",
    "is_group":true,
    "group_name":"anime"
}

Hope you will try this out, and leave me your feedback also feel free to improve this project by making a PR😁.