Skip to main content

Temporal-backed workflow registry, scheduler, and HTTP dispatch gateway.

Project description

temporal-registry

Temporal-backed workflow registry, scheduler, and HTTP dispatch gateway.

The Problem

Temporal gives you durable workflow execution, but clients still need to know a lot before they can safely start work:

  • Which workflow types exist.
  • Which task queue can run each workflow.
  • What input shape each workflow expects.
  • Which search attributes are supported.
  • Whether any worker that can run the workflow is currently alive.

Without a registry, that information tends to get copied into clients, deployment config, docs, and worker code. Those copies drift. Clients start hard-coding task queues, old workflow names stay around, schedule creation depends on tribal knowledge, and independent worker deployments become tightly coupled to every caller.

The operational failure mode is simple: the worker knows what it can run, but the client does not have a reliable, current way to discover that before it starts or schedules a workflow.

The Solution

temporal-registry is a small always-on registry service for Temporal workflow workers. It serves two purposes:

  • It hosts an HTTP API for clients to discover, start, schedule, and administer registered workflows.
  • It also runs as a Temporal worker for the registry workflow, which stores workflow registrations, task queues, schemas, workers, and heartbeat state.

Other workers register their runnable workflow types, task queues, input schemas, search attributes, labels, and heartbeat TTLs. The registry stores that metadata inside the durable registry workflow, then exposes it through the HTTP API.

Clients use the registry instead of hard-coding worker details. A caller can:

  • List registered workflow types.
  • Validate workflow input against the registered schema.
  • Start a workflow on the currently registered task queue.
  • Create schedules without knowing the worker deployment layout.
  • Query supported search attributes for a workflow type.

Worker heartbeats keep availability current. If a worker stops heartbeating, the registry can stop advertising that worker as a healthy dispatch target, while the registry state itself remains durable because it is backed by Temporal.

This keeps ownership clean: workers own execution and capability registration; clients own requests; temporal-registry owns discovery, validation, dispatch, and scheduling. It does not execute workflow activities directly; registered Temporal workers host the actual workflow code.

Use it when workers are deployed independently, workflow types change over time, or multiple runtimes need to advertise capabilities into one shared Temporal namespace.

How To Use It

  1. Start temporal-registry against your Temporal namespace.
  2. Have each worker register the workflow types it can run, including task queue, input schema, labels, and supported search attributes.
  3. Keep workers heartbeating so the registry knows which dispatch targets are currently healthy.
  4. Point clients at the registry API to list workflows, validate inputs, start runs, or create schedules without hard-coding worker task queues.

Terms And Configuration

temporal-registry sits between HTTP clients and Temporal. It hosts both the registry HTTP API and the registry worker. The HTTP API talks to Temporal over gRPC, while clients talk to temporal-registry over HTTP.

client / curl / docs
        |
        | HTTP
        v
temporal-registry API
        |
        | Temporal gRPC
        v
Temporal frontend
        |
        v
registry workflow state

Temporal terms:

  • TEMPORAL_ADDRESS is the Temporal frontend gRPC endpoint. Despite the word "frontend", this is not the browser UI.
  • TEMPORAL_NAMESPACE is the Temporal namespace where the registry workflow and dispatched workflows run.
  • TEMPORAL_TLS controls whether the registry connects to Temporal using TLS.
  • TEMPORAL_API_KEY authenticates the registry process to Temporal, if your Temporal deployment requires API-key auth.
  • Temporal UI is the browser UI for humans to inspect workflow histories, schedules, and runs. It is separate from this service.

Registry terms:

  • TEMPORAL_REGISTRY_URL is the HTTP URL for the temporal-registry API, for example http://127.0.0.1:8080.
  • TEMPORAL_REGISTRY_TOKEN is the bearer token for the registry HTTP API when registry auth is enabled. It is not the Temporal API key.
  • The registry workflow is the durable Temporal workflow that stores registered workflow types, task queues, schemas, workers, and heartbeat state.
  • The registry worker is the worker process started by temporal-registry to execute the registry workflow itself.

Quick Start

uv sync --frozen
uv run temporal-registry -f temporal_registry/config.yaml

The HTTP API publishes an OpenAPI spec at /openapi.json and interactive docs at /docs.

Health and visibility endpoints:

  • /health returns ok when the HTTP API process is alive.
  • /ready checks that the API can query the registry workflow through Temporal.
  • /registry/status returns registry workflow counts and the latest registry service startup/heartbeat markers.

The registry records a startup signal and a low-frequency registry service heartbeat signal in the registry workflow history so the Temporal UI has an obvious sign that the registry service is active.

Useful targets:

make test
make lint
make docker-build

Contributing

Set up the project with uv sync --frozen, then run make check before opening a change. Use make fmt to apply Ruff formatting and safe fixes.

For local git hooks:

make hooks-install

The hooks run shared config sync, Ruff, mypy, and commit message linting. Commit messages should follow Conventional Commits because releases are managed by release-please.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

temporal_registry-0.1.2.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

temporal_registry-0.1.2-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file temporal_registry-0.1.2.tar.gz.

File metadata

  • Download URL: temporal_registry-0.1.2.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for temporal_registry-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4eb5aa5d9b4fb1cebefcd3ebbded1b3fe6733951ea0a4595a81c8c54e13c74bb
MD5 8735fbb0fcc60d657483d15d7be682b1
BLAKE2b-256 113b628e137cb86ac52c21127320babf61acb4ac3e929f752934ca8423130df0

See more details on using hashes here.

File details

Details for the file temporal_registry-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: temporal_registry-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for temporal_registry-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 39c59b1ae44de6ae8e74bbfc52860f0d8b6a3b4360d5ca22fd88b0257e06a61d
MD5 1516acea732266dba075a7ab34a7d806
BLAKE2b-256 7677c377f2205dd1963c4f93bbff5e013346ab7226447bcac3905fab96fd07d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page