# olahol/melody

:notes: Minimalist websocket framework for Go

Repository: https://github.com/olahol/melody
Canonical: https://ross.abutalabs.com/products/olahol-melody
Language: Go
License: BSD-2-Clause
License Family: permissive
Topics: websocket, framework, websocket-framework, minimalist, example, go, golang
Last push: 2025-10-28T18:41:28+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 49, release rhythm 35, longevity 100
- inputs: {"age_days": 4130, "days_push": 309, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4083, forks 371 (observed 2026-08-28T04:08:34.470255+00:00)

## What it is
Melody is a minimalist websocket framework for Go built on top of gorilla/websocket. It abstracts away tedious websocket handling with a simple net/http-like interface, session management, broadcasting, and automatic ping/pong heartbeats.

## Use cases
- build a websocket chat server in Go
- broadcast messages to all connected websocket clients
- handle websocket sessions with per-session data
- add real-time features to a Go web app
- automatically detect and drop broken websocket connections
- send messages to selected websocket sessions only

## When to choose
- you want a simple, high-level websocket API in Go without managing gorilla/websocket details
- you need safe concurrent writes and broadcasting out of the box
- you want automatic heartbeat/timeout handling for dead connections
- your app fits the net/http handler style

## When to avoid
- you need fine-grained control over websocket frames, compression, or subprotocols
- you need a full-featured realtime platform with rooms, reconnection, or fallbacks like Socket.IO
- you are not using Go
- you need client-side websocket support only

## Facets
- artifact type: library
- maturity: stable
- function: websocket, middleware, http-server
- domain: web-development, backend
- platform: go, windows, cross-platform
- tags: websocket-framework, broadcast, sessions, gorilla-websocket, realtime, minimalist, real-time, linux, macos

## Member repositories
- olahol/melody (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:34.470255+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:24.662180+00:00, confidence not recorded.
  - readme: https://github.com/olahol/melody (fetched 2026-08-28T04:08:34.470255+00:00, sha 031c92b8521f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
