{
  "$schema": "../../../skill/references/schemap.schema.json",
  "kind": "sequence",
  "title": "Realtime chat message",
  "subtitle": "WebSocket fan-out through Redis",
  "nodes": [
    { "id": "alice", "type": "client", "card": { "title": "Alice" } },
    { "id": "gw1", "type": "gateway", "card": { "title": "WS gateway A" } },
    { "id": "chat", "type": "service", "card": { "title": "chat-service" } },
    { "id": "db", "type": "database", "card": { "title": "Messages DB" } },
    { "id": "pubsub", "type": "queue", "card": { "title": "Redis pub/sub" } },
    { "id": "gw2", "type": "gateway", "card": { "title": "WS gateway B" } },
    { "id": "bob", "type": "client", "card": { "title": "Bob" } }
  ],
  "edges": [
    { "id": "m1", "from": "alice", "to": "gw1", "label": "send {room, text}", "tone": "main" },
    { "id": "m2", "from": "gw1", "to": "chat", "label": "SendMessage", "tone": "main" },
    { "id": "m3", "from": "chat", "to": "db", "label": "INSERT message" },
    { "id": "m4", "from": "chat", "to": "pubsub", "label": "PUBLISH room:42", "kind": "async", "tone": "main" },
    { "id": "m5", "from": "chat", "to": "gw1", "label": "ack id", "kind": "return" },
    { "id": "m6", "from": "pubsub", "to": "gw2", "label": "message", "kind": "async", "tone": "main" },
    { "id": "m7", "from": "gw2", "to": "bob", "label": "push", "tone": "main" }
  ]
}
