Skip to main content

Temporal ⇄ Pulse

Intermediate ⏱ 15 min temporal · python · durable activity

Temporal owns durable orchestration; Pulse is the real-time streaming step it calls. Repo example: examples/temporal-pulse-bridge/.

Why an Activity — the one design constraint that matters

Temporal workflows are deterministic and replay-safe, so they can't do I/O directly — every external call lives in an Activity. Pulse is therefore a step inside an Activity, and Temporal wraps it with durable retries / timeouts / exactly-once semantics:

OrderWorkflow (durable) → execute_activity(score_order, retry ×3, timeout 15s) → decide → escalate | auto-approve

The Activity does the same two calls as every other bridge:

POST /api/pulse/x/order-scoring/in
GET /api/pulse/events/order-scoring.score.out

Run it

pulse server start --dev
mkdir app && cp pulse.yaml app/ && (cd app && pulse deploy .) # stands up order-scoring
pip install temporalio requests
python run.py

run.py boots a local Temporal dev server in-process (WorkflowEnvironment.start_local()), starts a worker hosting OrderWorkflow + the score_order Activity, and executes the workflow:

amount= 2500 -> high_value=True decision=escalate
amount= 300 -> high_value=False decision=auto-approve

What's validated — stated precisely

  • The Activity's Pulse call is validated live against a --dev server (same POST-ingress + read-topic contract as the n8n/LangGraph bridges).
  • The Temporal wiring is real@workflow.defn / @activity.defn on temporalio 1.30.
  • The full in-process workflow run needs Temporal's dev server binary, which the repo's CI sandbox can't fetch — run python run.py on your machine to see the complete durable loop.

What each side contributes

ConcernOwner
Durable state, retries, timeouts, human tasksTemporal
Per-key windows, joins, dedup, LLM/MCP stages on the streamPulse
The seamone Activity with two HTTP calls

This is the cleanest division of labor of all the bridges: Temporal never sees the event firehose, Pulse never re-implements durable orchestration.

Next