THE STACK Three machines, explained one by one. Together, they make up the workflow stack in RSX. Reducers check each action before it changes state. Rechain records accepted actions in a history you can replay. Reactor batches messages to the same canister. It tracks delivery when a message needs another attempt. A workflow is a graph you can inspect. Takt shows the path it took and where it’s waiting. Takt asks the wallet to charge. Reactor moves the request. Rechain records the accepted charge. Ask an agent to draft your workflow. Follow a run and point to the step you want to change. Start inside each machine. Then see them work together in Fourcans and Chatapp. RECHAIN: INSIDE THE MACHINE Rechain keeps state and an ordered action log inside your canister. Follow top up eleven. A thunk reads selectors, makes a decision, and builds an action. After dispatch, it can return an application result. Here, Bob has six. The target is eleven, so we dispatch Transfer five. Each reducer checks the action against its own state. The balances reducer returns a function. That commit function subtracts five from Alice and adds five to Bob. It runs only if every reducer accepts. The prepared functions move into the queue. All accepted: run the commits. Each function updates only its owned state. The log makes room, and the action becomes block four. Its previous hash links it to the existing chain. We're slowing down one synchronous, atomic dispatch. The thunk can now return the result: id four. An action can also go straight to dispatch, without a thunk. Try transferring ten. Alice only has nine. The balances reducer rejects it, so none of the prepared functions run. No state change, and no new block. As the log grows, older blocks move to a separate archive canister. This is an awaited intercanister call. The source keeps its copy until the archive confirms the batch. Once confirmed, that space can be released. When an archive fills up, Rechain adds another as needed. The block numbers and hash links stay unchanged. Readers follow the archive locations to read the complete history. Replay the recorded actions through the reducers to rebuild state. Your canister can do this, and so can a third party reading the log. Use the same starting state and reducer rules for the same result. Record decision inputs in actions; replay doesn't rerun thunks. A reader can analyse that state, make a decision, and call your public API. Normal authorisation and reducer checks still apply. How does a reader trust the log? Rechain commits the published tip's index and hash through a Merkle root in certified data. An IC certificate authenticates that root. The reader verifies the certificate and witness, then checks the blocks against that trusted tip. A modified block fails verification. Check certificate freshness too, to reject stale proofs. Rechain's polling reader checks block hashes; certificate verification is an additional client step. Together, these checks detect a man in the middle changing the log. The same history is useful for debugging. Pick an action and compare state before and after. Here is Transfer five: Alice loses five, Bob gains five. You can see what happened, rebuild it, and understand why. REACTOR: INSIDE THE CHANNEL An inter-canister call is a relatively coarse communication primitive. Small operations compete for callback slots, queue space, and execution time. The replica guarantees fifty callback slots per canister. Reactor makes each physical call carry much more useful work: hundreds of small application messages, grouped into one batch. Each canister has one Reactor. Requests collect in its outbox, grouped by destination. Here, three hundred small messages fit into one inter-canister call. They cross the channel together. Reactor sends the work already queued; it does not wait for a full batch. The receiving entrypoint stores them in an inbox and acknowledges receipt. This acknowledgement means stored, not completed. The scheduler then runs registered endpoint handlers. These are local synchronous functions: they can read selectors or dispatch actions. Results keep their requests' return addresses. They collect into another batch and travel back through the channel. The sender matches each result to its waiting request. Queues also help protect the user experience. Reactor serves three priorities: Control, for replies and library obligations; Interactive, for the user's current flow; and Maintenance, for ordinary background work. Here, an interactive request arrives after maintenance, but gets served first. Priority is checked between batches. It cannot interrupt a running handler, and maintenance waits while higher-priority work remains ready. An ingress cap, say a thousand calls per block, limits incoming calls from outside the IC. It does not limit us to a thousand application operations. On one subnet, an ingress call can trigger batches, handlers, replies, and further calls within the same execution round, while budget remains. Work that does not fit stays queued for a later turn or round. Batching reduces communication overhead; it does not create more compute. In a sixteen-canister, single-subnet Pocket I C benchmark, the measured arrival window reached about sixty-five hundred Reactor calls handled per second. Including the final drain, that run averaged about forty-two hundred. We count requests and notifications handled at endpoints. Replies are additional messages; they are not counted again as calls. Now spread the same channel across six canisters. Every canister receives ingress. A fans out to B, C, D, E, and F, while they send work of their own. Requests, results, and application-created follow-up work share the mesh. These three hundred illustrated operations show the idea: many small messages, fewer physical calls, and each canister still owns its state. TAKT: INSIDE THE WORKFLOW A user call often starts a longer job. The public method checks the caller, submits work to Takt, and returns an execution ID. The workflow engine moves that execution through a defined graph. Here, reserve remotely, deliver locally, close remotely, then audit. Takt saves progress between steps. Waiting for one remote result does not stop the canister from serving other work. We author three things: Motoko types for persisted progress, functions that perform the work, and a takt dot JSON definition connecting the steps. A node names an operation and its next step. The generator checks the graph and the Motoko types, then produces typed runtime wiring. That same definition also supplies the inspector's graph. We edit the source definition, then generate again. Local tasks run synchronously. They can dispatch reducer actions through Rechain; business state stays with its reducers. Read steps use selectors, while transforms prepare typed data. A choice selects one route. Remote tasks can use Reactor to batch requests and addressed replies between canisters. Direct actor calls are supported too. Reactor supplies scheduling; Takt keeps the workflow's progress. A remote wait suspends this operation, not the whole engine. A Choice node takes one route. This workflow checks its input in order. Four units selects the remote audit. Five selects the local audit directly. The first matching selector supplies the next node's typed input. The other route stays quiet. A parallel node starts separate branches, each with its own typed input and execution progress. Both remote operations can be outstanding together. Each result is merged back into the parent. The continuation waits until both branches finish. A retry belongs to its own visit, so a completed sibling does not start over. Parallel work is not a distributed rollback: effects already sent still need their outcomes resolved. A workflow can start another workflow, even in another canister. Scheduling the child does not mean it has finished. Here, the parent waits for an event. The subscription is registered before starting the child, so an early event is not lost. The child waits until a saved deadline, then publishes through a reducer action. Its block notification travels back through Reactor. Takt matches the expected producer, topic, and wait address, then resumes the parent. These saved waits survive upgrades. Failures need different responses. A known temporary rejection can retry after backoff, within a configured budget. The attempt number changes; the operation identity and saved request stay the same. Safe retries depend on the participant's idempotency contract and its validity window. But a timeout does not prove failure. An unresolved Reactor request keeps waiting for its original reply. If the outcome cannot safely be established, the workflow blocks for reconciliation using authoritative evidence. A known failure can take a catch route. Compensation is a new business action, not an undo button for remote effects. The inspector reads the canister's execution state and displays the same compiled graph. Select a node to see its visits, attempts, and outcome. A visit is one entry into a node; retries are attempts inside that visit. Enable tracing for retained execution history; it is off by default. The timeline shows how long each node takes, including remote attempts and retry waits. The instruction view shows recorded cost per node, on a cumulative cost axis. Here, Deliver uses nearly a million instructions while sharing one IC timestamp. Waiting takes time; executing takes instructions. Caller and participant measurements stay separate. Rechain records business changes. Reactor moves and schedules work. Takt makes the whole workflow explicit, persistent, and inspectable. FOURCANS: INSIDE THE APPLICATION Fourcans brings the three libraries together. Each canister runs the same application: Takt keeps workflow progress, Reactor schedules and transports work, and Rechain owns the business state and log. These are test processing cells. Their actions increment counters and add units to a total. Start a Local workflow on A. Open dispatches an action, its reducers commit, and a block appears. Audit does the same. Two local steps, two blocks. Now zoom out: B, C, and D contain the same machinery. A Sequence workflow starts on A. Reserve becomes a Reactor request to B. B stores the batch and acknowledges receipt. Its endpoint dispatches into B's Rechain. Both reducers must accept before their commit functions change state and append a block. The addressed result carries that block's index back to A. Takt can now deliver locally, close on C, and audit on A. The original caller is preserved. Within the validity window, the idempotency reducer recognizes a repeated request, so the workflow can reuse its original receipt. Parallel starts two branches on A. Reserve goes to B, while Deliver goes to C. Both requests can be outstanding together. Each destination commits to its own state and returns its own block reference. While A waits, D can run its own Local workflow. Takt joins both results, then closes locally on A. There is no global transaction across these logs; each dispatch commits inside its own canister. The Child workflow prepares a unique topic, registers its wait, and schedules a workflow on D. Admission is not completion: A waits for a matching block event. D's Scheduled workflow waits until its saved deadline, then takes a Choice. With four units, it requests a maintenance Audit on B before auditing locally. That local Audit commits a block on D. Reactor delivers the block event to A. Takt checks the producer, topic, and job, resumes the parent, and dispatches Close. The event connects two independently persisted workflows. Fanout starts twelve selector calls: four to B, four to C, and four to D. Reactor groups calls for the same peer. Each endpoint reads its local total without dispatching an action or creating a block. The twelve addressed results return to A. Takt joins the observations, then commits one Close action with their combined total in its memo. These are observations from separate canisters, not one atomic snapshot of the whole application. Relay keeps its workflow on A while its effects visit A, B, A, C, A, D, C, then B. Every hop commits an Audit action and retains the resulting block reference. A waits for each remote result before moving to the next hop. The graph does not migrate between canisters. Takt coordinates the order, Reactor carries the calls and replies, and each destination's Rechain records its own effect. Eight references connect the story across four separate logs. Now every canister receives work. Start the five ordinary workflow kinds on each cell: twenty roots, plus four scheduled children. Queues gather calls and results while the workflow engines keep independent progress. Reducers commit locally, and each chain grows in order. This one mix adds forty-eight permanent blocks across the application. We can inspect a workflow's progress, follow its remote results, and read the blocks behind its effects. The same three machines compose at every canister. CHATAPP: ACROSS THE SUBNETS Chatapp puts the same three machines to work. Every canister can own users and channels. Takt coordinates a send. Reactor carries work to other canisters. Rechain validates and commits the chat state. There is one important setting here. This app disables block recording and archives. Messages live in the reducer’s bounded history maps. Watch a local send: the workflow chooses local delivery, the reducer prepares its commit, and the history changes. A user sends through their home canister. The public method checks that the sender belongs to the caller, then starts a send workflow and returns its identifier. The destination is already inside the target’s D C I D, together with its local object number. No directory lookup is needed. The Choice node compares that owner with this canister. Same owner takes Deliver Local. A different owner takes Deliver Remote, through Reactor. The workflow stays in the sender’s home. Follow a channel post from A to C, on another subnet. Reactor puts the delivery in its interactive queue, alongside other sends to C. Available messages travel together in one intercanister call. The storage acknowledgement says the batch arrived. The workflow still needs the result. At C, the endpoint checks the forwarding canister and preserves the original caller. The chat reducer checks channel membership and the sender’s nonce. Its commit appends one sequenced message and remembers the receipt. C batches the result back to A, and Takt finishes. Channel members query this shared history. A post is stored once, not copied into every member’s inbox. A direct message uses the same workflow. This time the destination is another user. First, that user’s canister commits the received message. Its result comes back to the sender’s home. Now Copy Choice takes Copy Direct, which dispatches a local reducer action to save the sender’s copy. Only then does this workflow finish. These are two separate commits, on two canisters. Destination delivery and source workflow completion are different milestones. Sending the same nonce again should not append the same message twice. While its receipt is retained, the reducer returns the original sequence. Reusing that nonce with different content fails. A nonmember’s channel post fails too, before any state change. Remote work uses Takt’s reconciliation contract with Reactor’s saved request identity. An unknown result is not permission to invent a fresh delivery. History is deliberately bounded: three thousand messages per channel, and three hundred per user. Old messages and their client nonce receipts leave together. That nonce deduplication guarantee ends when its receipt is evicted. Now let the canisters work together. Each accepts its own users’ sends. Local destinations stay inside the canister. Remote destinations go through per-peer Reactor queues, including across subnet boundaries. Requests travel out, results travel back, and many workflows remain in flight together. The same mixed-role canister repeats throughout the mesh. Here is the benchmark layout: eight subnets, eight canisters in each. Batching amortizes communication overhead. It does not turn separate canister commits into one atomic transaction. How much work did that arrangement handle? The retained two-million-user run measured about twenty-four thousand destination deliveries per second: twenty-three thousand, eight hundred and seventy-two. That counts one channel or recipient commit per message. Replies, sender copies, and member reads do not add deliveries. The run used sixty-four canisters, one-hundred-and-twenty-eight-byte bodies, and a twenty-six-point-six-second measurement window. It was Pocket I C, with an assumed three-hundred-and-thirty-three-millisecond round, not measured mainnet network performance. All admitted work eventually drained, but backlog grew, so this run did not qualify as sustained throughput. The architecture is the useful part: Takt coordinates, Reactor batches, and Rechain commits each canister’s state.