just learning to use Go by building the websocket server
π 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 β‘
- π 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.