← Learn OKHAM

Reuse a workflow and scale its execution

The same engine can run multiple OBCs. An order screen, a scheduled job and another service can also call the same versioned workflow. Teams can embed a compatible engine or use a shared execution service. Each project connects its own operations, permissions and state through the declared interfaces.

Change a flow in one place
Version the OBC when the sequence changes and the OPC when a rule changes. Review affected callers and rerun the same behavior checks. Unchanged operations can keep their existing implementations.
Run multiple instances
Use one definition for many independent runs, each with its own state. Where the workload can run in parallel, distribute instances across workers and give busy workflows more capacity.
Use the same contracts across languages
Bind an operation written in another language through its declared interface. To port the engine itself, implement the contract features the workflow uses and verify the same decisions, transitions and effects.

When several workers or callers act on the same records, the host coordinates access and handles retries. The workflow definition gives each execution the same rules. The deployment determines how much work can run at once.

Deploy the same workflow across nodes

OKHAM fits the serverless pattern of composing focused operations with a workflow. An OBC defines the sequence, OPC policies govern when a step may run, and the state machine invokes the bound operations. A binding can call a serverless function, a container workload or a service API. The same versioned workflow can be started by an HTTP request, an event or a schedule.

  1. Scale executionRun compatible engine instances or workers on multiple nodes. Independent workflow runs can be processed in parallel. A serverless platform or autoscaler can adjust worker capacity to match demand.
  2. Keep progress durableStore the run ID, contract versions and committed transitions in a durable store so another worker can resume. Use consistent updates for each run and idempotent operations or reconciliation when an action is retried.
  3. Share updates livePublish committed changes in an event format that producers and consumers understand. The Event type defines the source, timestamp and payload of an update. Replication across nodes or regions depends on the data store and the deployment’s recovery policy.

For example, maintenance requests for different sites can run on separate workers under the same policy. When a worker records a decision, a shared event stream can update a dashboard. A replacement worker can resume from the saved transition. The event transport and storage determine latency, replication lag and what can continue during a network outage.

Compare functions and workflow orchestration in AWS

See the proposed application for infrastructure operations