Chat system
TemplatesArchitecture
Real-time messaging over WebSockets with presence, an append-only message store, fan-out to online users and push notifications for offline ones.
What is inside
- WebSocket gateway
- Presence and sessions cache
- Fan-out and push
Use this template
Opens in the playground, no account needed. Sign up to save it.
Show the Inkline text
diagram architecture "Chat system"
direction right
theme light
client app "Mobile / web client"
zone backend "Chat backend" {
service lb "Load balancer"
service ws "WebSocket gateway"
service chat "Chat service"
service presence "Presence service"
cache sessions "Sessions + presence"
queue fanout "Message fan-out"
store messages "Message store"
fn push "Push worker"
}
external apns "Push providers"
app <-> lb : WebSocket
lb -> ws
ws -> chat : send
ws -> presence : heartbeat
presence -> sessions
chat -> messages : append
chat ~> fanout : new message
fanout ~> ws : deliver (online)
fanout ~> push : offline users
push -> apns