ArchitectureAsync Workflows (Temporal)

Async Workflows (Temporal)

Overview

Any task that is durable, retryable, or takes longer than 500ms must be implemented as a Temporal Workflow in Go.

Use Cases

  • Image processing (bimg/libvips)
  • Email sending (Postmark)
  • PDF generation
  • Data import/export
  • Multi-step onboarding flows

Architecture

Go API Handler → Temporal Client → Temporal Server → Go Worker → Activities

Key Rules

  • Workflows are deterministic — no I/O inside workflow functions
  • All I/O happens in Activities
  • Pass context.Context with trace IDs through all workflow executions
  • Use Temporal’s built-in retry policies instead of custom retry logic