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
- Host: GitHub
- URL: https://github.com/leoantony72/go-chat2
- Owner: leoantony72
- License: mit
- Created: 2022-10-08T10:00:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T15:38:49.000Z (over 2 years ago)
- Last Synced: 2025-03-27T02:39:15.370Z (about 1 month ago)
- Topics: cassandra, docker, golang, pubsub, redis, scalling, system, websockets
- Language: Go
- Homepage:
- Size: 31.3 KB
- Stars: 14
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
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😁.