Skip to content

Improved go chat application with distributed web servers,group chat

License

Notifications You must be signed in to change notification settings

leoantony72/go-chat2

Repository files navigation

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

About

Improved go chat application with distributed web servers,group chat

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published