WorkIt Library Uses Activity Boundaries to Prevent Duplicate Side Effects on Job Retry
WorkIt, an open-source JavaScript workflow library, addresses a common reliability problem where a crashed worker process may re-execute an operation that already completed, causing duplicate side effects. The library introduces a concept called activity boundaries, which assign each operation an explicit identity, a versioned canonical input hash, and a terminal status record stored in a durable activity store. When a restarted process submits the same activity ID with matching inputs, WorkIt replays the stored result instead of re-running the operation, while mismatched inputs trigger an ActivityConflictError rather than silently proceeding. The system distinguishes between local activity lifecycle ownership and remote provider idempotency, expecting developers to supply their own idempotency keys to external services alongside WorkIt's internal record. Uncertain or non-terminal states are not auto-resolved; instead, WorkIt preserves evidence and requires the application to define an explicit repair policy.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in