Inkline
Menu

Chat system

Templates
Chat system 10 items and 10 connections. Chat backend WebSocket send heartbeat append new message deliver (online) offline users Mobile / web client Load balancer WebSocket gateway Chat service Presence service Sessions + presence Message fan-out Message store Push worker Push providers
Chat system — preview
Architecture

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