Skip to content

Commit fe76039

Browse files
authored
Merge pull request nyghtowl#4 from temporal-community/add-architecture-diagram
Add Mermaid architecture diagram for streaming pipeline
2 parents 818374d + ddc4841 commit fe76039

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,21 @@ Copy `.env.example` and fill in:
117117

118118
The Temporal server runs separately from the app in both demos. The app embeds the worker (the code that executes activities), but the server holds all workflow state independently. Kill the app mid-turn, restart it, and the workflow picks up exactly where it left off — same turn, same state.
119119

120+
### Streaming Pipeline
121+
122+
```mermaid
123+
flowchart LR
124+
UI[Browser<br/>WebSocket] -->|Next Turn Update| WF[StreamingGameWorkflow]
125+
WF -->|execute_activity| Act[streaming_turn_activity]
126+
Act -.->|heartbeat per chunk| WF
127+
Act <-->|WebSocket per turn| Lyra[OpenAI Realtime — Lyra]
128+
Act <-->|WebSocket per turn| Zara[Gemini Live — Zara]
129+
Act -->|PCM16 chunks out-of-band| Q[(asyncio.Queue)]
130+
Q --> UI
131+
```
132+
133+
Solid arrows = text state flowing through Temporal (durable). Dotted = heartbeat. The `asyncio.Queue` carrying audio chunks is in-process and *not* durable — that's the point: Temporal tracks turn state cheaply while raw audio bytes stream straight to the browser.
134+
120135
**REST demo** — each Next Turn click executes a Temporal Update. Distinct activity nodes appear in the UI:
121136
- One for Lyra (dialogue + voice in a single native audio call)
122137
- One for Zara (Gemini text + OpenAI TTS combined)

0 commit comments

Comments
 (0)