Diagram Desk

Chat message sequence diagram

A chat message stored by the server and pushed to the recipient in real time; the read receipt comes back as an async message.

The diagram

Chat serverMessage storeSend messageStoreStoredPush new messageSentRead receiptRead noticeSenderRecipient
Sequence diagram · 4 shapes

Reading it step by step

  • 1. 'Sender' sends a request to 'Chat server': 'Send message'.
  • 2. 'Chat server' sends a request to 'Message store': 'Store'.
  • 3. 'Message store' replies to 'Chat server': 'Stored'.
  • 4. 'Chat server' notifies 'Recipient': 'Push new message'.
  • 5. 'Chat server' replies to 'Sender': 'Sent'.
  • 6. 'Recipient' notifies 'Chat server': 'Read receipt'.
  • 7. 'Chat server' notifies 'Sender': 'Read notice'.

Shape by shape

ShapeSymbolConnections
SenderActor→ Chat server(Send message) · ← Chat server, Chat server
Chat serverParticipant and lifeline→ Message store(Store), Recipient(Push new message), Sender(Sent), Sender(Read notice) · ← Sender, Message store, Recipient
Message storeParticipant and lifeline→ Chat server(Stored) · ← Chat server
RecipientActor→ Chat server(Read receipt) · ← Chat server

Symbols used here

SymbolMeaning
Participant and lifelineA box on top and a dashed line below.
ActorA human participant; a stick figure.
Synchronous messageA call that waits; solid line, filled head.
ReplyThe answer; dashed line, open head.
Asynchronous messageSent without waiting; solid line, open head.

All sequence diagram symbols and how to draw

Diagram text

Paste this text into the editor to get the same picture, then change the names to fit your own work.

# Chat message sequence diagram
sequenceDiagram
  actor A as Sender
  participant S as Chat server
  participant D as Message store
  actor B as Recipient
  A->>S: Send message
  S->>D: Store
  D-->>S: Stored
  S-)B: Push new message
  S-->>A: Sent
  B-)S: Read receipt
  S-)A: Read notice

More sequence diagram examples

All SeewolLabs tools