An open API service indexing awesome lists of open source software.

https://github.com/leoantony72/go-chat2

Improved go chat application with distributed web servers,group chat
https://github.com/leoantony72/go-chat2

cassandra docker golang pubsub redis scalling system websockets

Last synced: 18 days ago
JSON representation

Improved go chat application with distributed web servers,group chat

Awesome Lists containing this project

README

        

## 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

```bash
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

```websocket URL
ws:/localhost/chat?id=username
```

## Examples

- /user

```JSON
{
"username":"JOHN"
}
```

- /room

```JSON
{
"name":"anime",
"user":"JOHN"
}
```

- /joinroom

```JSON
{
"name":"anime",
"user":"JOHN"
}
```

- Private Chat - Websocket

```JSON
{
"msg":"hello Boi",
"receiver":"2GKtMkzDZDerO2a1gl5IHK6OTPY",
"is_group":false
}
```

- Group Chat - Websocket

```JSON
{
"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😁.