https://github.com/04ar/go_server
learning to make websocket go servers
https://github.com/04ar/go_server
Last synced: 9 months ago
JSON representation
learning to make websocket go servers
- Host: GitHub
- URL: https://github.com/04ar/go_server
- Owner: 04AR
- Created: 2025-08-28T10:38:59.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-05T21:12:16.000Z (9 months ago)
- Last Synced: 2025-09-05T23:29:05.163Z (9 months ago)
- Language: Go
- Size: 44.9 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
just learning to use Go by building the websocket server
# Go WebSocket Server with Redis + SQL Backend
🚀 A lightweight and scalable **WebSocket server written in Go** that supports **real-time synchronization** between clients.
It uses:
- **Redis** → for state replication, broadcasting, and real-time pub/sub.
- **PostgreSQL or SQLite** → for persistent storage (user accounts, auth, metadata).
- **JWT authentication** → for secure client identification.
This setup is ideal for:
- Any real-time service that requires persistence + fast sync ⚡
---
## ✨ Features
- 🔌 **WebSocket-based communication** (bidirectional, low latency).
- 🗄️ **Pluggable database layer** → choose between **Postgres** or **SQLite**.
- 📡 **Redis Pub/Sub** → ensures all clients across multiple servers stay in sync.
- 🔒 **JWT-based authentication** → secure and stateless.
- 🛠️ **Thin abstraction layer** → easy to extend with custom game/app logic.
- ⚡ **Goroutine-based concurrency** → scales well with thousands of connections.
---