Video · 0:45

Never submits twice

Mark the steps that change something, a submit, a payment, an order, as side effects. Kaabist runs each one under a fence: if a run is cut halfway, it never presses the button again on its own. It stops and asks.

Transcript

The program reaches the submit. Steps run one after another. The click on Submit claim is marked as a side effect: it changes something in the world.

The fence goes up. Before it clicks, Kaabist writes the step down as about to execute, outside the browser, where a crash cannot erase it.

The click goes out, and the worker dies. The request leaves. Before the confirmation loads, the machine running the job is gone. The portal received the claim; nobody saw it.

A new worker takes the job. It replays from the last checkpoint and walks up to the same button.

It finds the fence open, and stops. The step was about to run and never confirmed. Clicking again could file the claim twice, so it does not guess: the job parks as side_effect_ambiguous.

A person decides. Someone checks the portal: the claim arrived. They skip the step, and the job carries on after the submit. One claim, filed once.

Watched the story?Run your own.

Opening soon

Kaabist is getting ready for launch. The panel, the docs and the status page open on launch day.