How catalinfl/adler works
Adler is a Go WebSocket server toolkit. An application routes HTTP requests to Adler, which upgrades each connection, registers a session, and dispatches lifecycle and message callbacks; applications then send messages directly, globally, or through rooms. Its optional matchmaker accepts session queue requests, promotes waiting clients, creates rooms, and notifies participants. The graph reflects documented capabilities as well as sampled runtime paths; some internal callback and matchmaker details are documented but not fully sampled.
Main entry points: session.go Session · adler.go Adler Server · matchmaking.go Matchmaker Worker · room.go Room Membership
Components 16
Server Lifecycle
- Adler Server
adler.go - Runtime Config
config.go - gws Engine
- Session Registry
core.go - Session
session.go - Lifecycle Handlers
adler.go
Messaging
- Protocol Serializer
serializer.go - Global Broadcast
adler.go - Outbound Queue
message.go
Rooms
- Room Membership
room.go - Room Broadcast
room.go
Matchmaking
- Matchmaker Worker
matchmaker/matchmaking.go - Match Queues
matchmaker/matchmaking.go - Queue Events
matchmaker/matchmaking.proto
Other components
- HTTP Application
- WebSocket Client
Connections 23
- HTTP Application → Adler Server: handles request
- Adler Server → gws Engine: upgrades connection
- gws Engine → Session: provides connection
- Adler Server → Session Registry: registers session
- Adler Server → Lifecycle Handlers: dispatches hooks
- Session → Lifecycle Handlers: dispatches frames
- WebSocket Client → gws Engine: sends frames
- Session → gws Engine: reads frames
- Session → Protocol Serializer: encodes protocol messages
- Session → Outbound Queue: queues writes
- Outbound Queue → gws Engine: writes frames
- Adler Server → Global Broadcast: offers send helpers
- Global Broadcast → Session Registry: selects sessions
- Session Registry → Session: dispatches writes
- Adler Server → Room Membership: creates rooms
- Room Membership → Session: tracks members
- Room Broadcast → Session: dispatches writes
- Room Membership → Room Broadcast: broadcasts to members
- Matchmaker Worker → Match Queues: manages queues
- Matchmaker Worker → Room Membership: creates and joins rooms
- Matchmaker Worker → Session: updates status and sends events
- Matchmaker Worker → Queue Events: emits event types
- Matchmaker Worker → Adler Server: uses server protocol