Recipes

Choose an Execution mode

Run related Commands concurrently or serialize them in a type-and-key lane.

v0.1.0-dev.2Intermediateusecase_forge
Open source reference

Choose an Execution mode

concurrent starts eligible Entries without waiting for related work. sequential permits one active Execution in the applicable lane.

dart
registerCommand<ApplyAccountMutation>(
  _apply,
  instructions: const UseCaseInstructionOverrides(
    processing: UseCaseProcessingInstructionOverrides(
      executionMode: UseCaseExecutionMode.sequential,
    ),
  ),
);

With an executionKey, each account has an independent sequential lane. Without a key, every ApplyAccountMutation shares one type-wide lane. A different exact Command type never joins that lane automatically.

Choose sequential when completion order protects a resource invariant. Choose concurrent when operations are independent and the service can handle overlap. Neither mode imposes a global maximum concurrency limit.

ARKTELOS

Purpose-built engineering systems for software that has to hold.