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
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
| Shape | Symbol | Connections |
|---|---|---|
| Sender | Actor | → Chat server(Send message) · ← Chat server, Chat server |
| Chat server | Participant and lifeline | → Message store(Store), Recipient(Push new message), Sender(Sent), Sender(Read notice) · ← Sender, Message store, Recipient |
| Message store | Participant and lifeline | → Chat server(Stored) · ← Chat server |
| Recipient | Actor | → Chat server(Read receipt) · ← Chat server |
Symbols used here
| Symbol | Meaning |
|---|---|
| Participant and lifeline | A box on top and a dashed line below. |
| Actor | A human participant; a stick figure. |
| Synchronous message | A call that waits; solid line, filled head. |
| Reply | The answer; dashed line, open head. |
| Asynchronous message | Sent without waiting; solid line, open head. |
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