finds.dev← search

// the find

alash3al/wsify

★ 526 · Go · updated Jun 2024

A very simple general purpose websocket server that does the job

wsify is a minimal WebSocket pub/sub server in Go. You run it as a sidecar, connect clients over WebSocket, and they join/broadcast to named channels. Your existing backend stays in charge of auth via a webhook callback, and can push to channels via an HTTP endpoint.

The authorizer webhook design is smart — your app stays authoritative, wsify doesn't try to understand your auth model. The HTTP `/broadcast` endpoint lets any backend service push to WebSocket clients without holding a connection open. Two broker backends (in-memory and Redis) cover both single-node and multi-instance deployments. The codebase is genuinely small (~10 files) so there's nothing to get lost in.

No TLS termination built in — you're expected to put it behind a proxy, but that's not documented anywhere. The authorizer is called synchronously on every message which means a slow or dead auth service stalls the connection; there's no timeout configuration visible in the README. In-memory broker means zero message persistence — if the server restarts mid-broadcast, messages are silently dropped with no warning. Last meaningful commit is from 2024 and issues appear to go unanswered, so you're adopting this as-is.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →