WEBVTT

00:00:00.500 --> 00:00:03.169
Three machines, explained one by one.

00:00:04.004 --> 00:00:07.376
Together, they make up the workflow stack in RSX.

00:00:08.400 --> 00:00:11.368
Reducers check each action before it changes state.

00:00:12.204 --> 00:00:15.797
Rechain records accepted actions in a history you can replay.

00:00:16.800 --> 00:00:19.404
Reactor batches messages to the same canister.

00:00:20.239 --> 00:00:23.130
It tracks delivery when a message needs another attempt.

00:00:24.133 --> 00:00:26.346
A workflow is a graph you can inspect.

00:00:27.181 --> 00:00:29.733
Takt shows the path it took and where it’s waiting.

00:00:30.733 --> 00:00:32.699
Takt asks the wallet to charge.

00:00:33.534 --> 00:00:35.292
Reactor moves the request.

00:00:36.125 --> 00:00:38.521
Rechain records the accepted charge.

00:00:39.533 --> 00:00:41.707
Ask an agent to draft your workflow.

00:00:42.542 --> 00:00:45.303
Follow a run and point to the step you want to change.

00:00:46.300 --> 00:00:48.200
Start inside each machine.

00:00:49.036 --> 00:00:51.940
Then see them work together in Fourcans and Chatapp.

00:00:58.017 --> 00:01:01.117
Rechain keeps state and an ordered action log inside your

00:01:01.050 --> 00:01:01.729
canister.

00:01:02.548 --> 00:01:03.995
Follow top up eleven.

00:01:04.813 --> 00:01:08.175
A thunk reads selectors, makes a decision, and builds an

00:01:08.108 --> 00:01:08.669
action.

00:01:09.488 --> 00:01:12.758
After dispatch, it can return an application result.

00:01:13.576 --> 00:01:15.206
Here, Bob has six.

00:01:16.024 --> 00:01:19.503
The target is eleven, so we dispatch Transfer five.

00:01:20.321 --> 00:01:23.162
Each reducer checks the action against its own state.

00:01:23.980 --> 00:01:26.391
The balances reducer returns a function.

00:01:27.209 --> 00:01:30.401
That commit function subtracts five from Alice and adds five

00:01:30.334 --> 00:01:30.948
to Bob.

00:01:31.767 --> 00:01:34.242
It runs only if every reducer accepts.

00:01:35.061 --> 00:01:37.472
The prepared functions move into the queue.

00:01:38.290 --> 00:01:40.531
All accepted: run the commits.

00:01:41.350 --> 00:01:43.865
Each function updates only its owned state.

00:01:44.683 --> 00:01:47.849
The log makes room, and the action becomes block four.

00:01:48.668 --> 00:01:51.391
Its previous hash links it to the existing chain.

00:01:52.209 --> 00:01:55.531
We're slowing down one synchronous, atomic dispatch.

00:01:56.350 --> 00:01:59.255
The thunk can now return the result: id four.

00:02:01.484 --> 00:02:04.962
An action can also go straight to dispatch, without a thunk.

00:02:05.780 --> 00:02:07.410
Try transferring ten.

00:02:08.228 --> 00:02:09.728
Alice only has nine.

00:02:10.546 --> 00:02:13.608
The balances reducer rejects it, so none of the prepared

00:02:13.541 --> 00:02:14.506
functions run.

00:02:15.325 --> 00:02:17.957
No state change, and no new block.

00:02:20.150 --> 00:02:23.563
As the log grows, older blocks move to a separate archive

00:02:23.496 --> 00:02:24.123
canister.

00:02:24.941 --> 00:02:27.131
This is an awaited intercanister call.

00:02:27.949 --> 00:02:31.063
The source keeps its copy until the archive confirms the

00:02:30.996 --> 00:02:31.545
batch.

00:02:32.363 --> 00:02:35.138
Once confirmed, that space can be released.

00:02:35.957 --> 00:02:39.266
When an archive fills up, Rechain adds another as needed.

00:02:40.084 --> 00:02:42.782
The block numbers and hash links stay unchanged.

00:02:43.600 --> 00:02:46.532
Readers follow the archive locations to read the complete

00:02:46.465 --> 00:02:47.026
history.

00:02:49.250 --> 00:02:52.468
Replay the recorded actions through the reducers to rebuild

00:02:52.401 --> 00:02:52.923
state.

00:02:53.742 --> 00:02:57.181
Your canister can do this, and so can a third party reading

00:02:57.114 --> 00:02:57.741
the log.

00:02:58.559 --> 00:03:01.634
Use the same starting state and reducer rules for the same

00:03:01.567 --> 00:03:02.207
result.

00:03:03.026 --> 00:03:07.012
Record decision inputs in actions; replay doesn't rerun thunks.

00:03:07.830 --> 00:03:11.257
A reader can analyse that state, make a decision, and call

00:03:11.190 --> 00:03:12.402
your public API.

00:03:13.221 --> 00:03:16.413
Normal authorisation and reducer checks still apply.

00:03:18.617 --> 00:03:20.389
How does a reader trust the log?

00:03:21.208 --> 00:03:24.126
Rechain commits the published tip's index and hash through

00:03:24.059 --> 00:03:26.183
a Merkle root in certified data.

00:03:27.002 --> 00:03:29.647
An IC certificate authenticates that root.

00:03:30.465 --> 00:03:33.566
The reader verifies the certificate and witness, then checks

00:03:33.499 --> 00:03:35.389
the blocks against that trusted tip.

00:03:36.208 --> 00:03:38.618
A modified block fails verification.

00:03:39.437 --> 00:03:43.072
Check certificate freshness too, to reject stale proofs.

00:03:43.890 --> 00:03:47.850
Rechain's polling reader checks block hashes; certificate verification

00:03:47.783 --> 00:03:49.530
is an additional client step.

00:03:50.348 --> 00:03:53.332
Together, these checks detect a man in the middle changing

00:03:53.265 --> 00:03:53.905
the log.

00:03:56.117 --> 00:03:58.527
The same history is useful for debugging.

00:03:59.346 --> 00:04:02.095
Pick an action and compare state before and after.

00:04:02.913 --> 00:04:07.329
Here is Transfer five: Alice loses five, Bob gains five.

00:04:08.148 --> 00:04:11.926
You can see what happened, rebuild it, and understand why.

00:04:19.117 --> 00:04:22.361
An inter-canister call is a relatively coarse communication

00:04:22.294 --> 00:04:22.973
primitive.

00:04:23.791 --> 00:04:27.504
Small operations compete for callback slots, queue space,

00:04:27.580 --> 00:04:28.923
and execution time.

00:04:29.742 --> 00:04:33.038
The replica guarantees fifty callback slots per canister.

00:04:33.856 --> 00:04:37.413
Reactor makes each physical call carry much more useful work:

00:04:37.567 --> 00:04:41.397
hundreds of small application messages, grouped into one batch.

00:04:43.584 --> 00:04:45.499
Each canister has one Reactor.

00:04:46.318 --> 00:04:50.018
Requests collect in its outbox, grouped by destination.

00:04:50.836 --> 00:04:54.536
Here, three hundred small messages fit into one inter-canister

00:04:54.469 --> 00:04:54.979
call.

00:04:55.797 --> 00:04:57.414
They cross the channel together.

00:04:58.232 --> 00:05:01.593
Reactor sends the work already queued; it does not wait

00:05:01.526 --> 00:05:02.596
for a full batch.

00:05:03.414 --> 00:05:06.723
The receiving entrypoint stores them in an inbox and acknowledges

00:05:06.656 --> 00:05:07.283
receipt.

00:05:08.102 --> 00:05:10.981
This acknowledgement means stored, not completed.

00:05:11.800 --> 00:05:14.809
The scheduler then runs registered endpoint handlers.

00:05:15.628 --> 00:05:19.080
These are local synchronous functions: they can read selectors

00:05:19.013 --> 00:05:20.408
or dispatch actions.

00:05:21.227 --> 00:05:23.807
Results keep their requests' return addresses.

00:05:24.625 --> 00:05:27.361
They collect into another batch and travel back through the

00:05:27.294 --> 00:05:27.817
channel.

00:05:28.636 --> 00:05:31.593
The sender matches each result to its waiting request.

00:05:33.784 --> 00:05:36.624
Queues also help protect the user experience.

00:05:37.442 --> 00:05:41.559
Reactor serves three priorities: Control, for replies and

00:05:41.492 --> 00:05:45.387
library obligations; Interactive, for the user's current flow;

00:05:45.580 --> 00:05:48.395
and Maintenance, for ordinary background work.

00:05:49.213 --> 00:05:52.848
Here, an interactive request arrives after maintenance, but

00:05:52.781 --> 00:05:54.007
gets served first.

00:05:54.825 --> 00:05:57.067
Priority is checked between batches.

00:05:57.885 --> 00:06:01.090
It cannot interrupt a running handler, and maintenance waits

00:06:01.023 --> 00:06:03.460
while higher-priority work remains ready.

00:06:05.650 --> 00:06:09.649
An ingress cap, say a thousand calls per block, limits incoming

00:06:09.582 --> 00:06:11.537
calls from outside the IC.

00:06:12.355 --> 00:06:15.586
It does not limit us to a thousand application operations.

00:06:16.405 --> 00:06:20.417
On one subnet, an ingress call can trigger batches, handlers,

00:06:20.519 --> 00:06:24.037
replies, and further calls within the same execution round,

00:06:24.126 --> 00:06:25.495
while budget remains.

00:06:26.314 --> 00:06:29.336
Work that does not fit stays queued for a later turn or

00:06:29.269 --> 00:06:29.948
round.

00:06:30.767 --> 00:06:34.193
Batching reduces communication overhead; it does not create

00:06:34.126 --> 00:06:35.078
more compute.

00:06:37.284 --> 00:06:41.087
In a sixteen-canister, single-subnet Pocket I C benchmark,

00:06:41.255 --> 00:06:44.252
the measured arrival window reached about sixty-five hundred

00:06:44.185 --> 00:06:46.257
Reactor calls handled per second.

00:06:47.075 --> 00:06:50.515
Including the final drain, that run averaged about forty-two

00:06:50.448 --> 00:06:50.996
hundred.

00:06:51.815 --> 00:06:55.215
We count requests and notifications handled at endpoints.

00:06:56.034 --> 00:06:59.186
Replies are additional messages; they are not counted again

00:06:59.119 --> 00:06:59.955
as calls.

00:07:02.150 --> 00:07:05.055
Now spread the same channel across six canisters.

00:07:05.873 --> 00:07:07.841
Every canister receives ingress.

00:07:08.660 --> 00:07:13.805
A fans out to B, C, D, E, and F, while they send work

00:07:13.738 --> 00:07:14.573
of their own.

00:07:15.392 --> 00:07:19.313
Requests, results, and application-created follow-up work share

00:07:19.246 --> 00:07:19.912
the mesh.

00:07:20.730 --> 00:07:23.909
These three hundred illustrated operations show the idea:

00:07:24.051 --> 00:07:27.854
many small messages, fewer physical calls, and each canister

00:07:27.788 --> 00:07:29.105
still owns its state.

00:07:36.317 --> 00:07:38.844
A user call often starts a longer job.

00:07:39.663 --> 00:07:42.907
The public method checks the caller, submits work to Takt,

00:07:43.035 --> 00:07:45.121
and returns an execution ID.

00:07:45.939 --> 00:07:49.183
The workflow engine moves that execution through a defined

00:07:49.116 --> 00:07:49.743
graph.

00:07:50.561 --> 00:07:54.912
Here, reserve remotely, deliver locally, close remotely, then

00:07:54.845 --> 00:07:55.420
audit.

00:07:56.238 --> 00:07:58.545
Takt saves progress between steps.

00:07:59.363 --> 00:08:02.399
Waiting for one remote result does not stop the canister

00:08:02.332 --> 00:08:03.675
from serving other work.

00:08:05.884 --> 00:08:09.766
We author three things: Motoko types for persisted progress,

00:08:09.868 --> 00:08:13.529
functions that perform the work, and a takt dot JSON definition

00:08:13.462 --> 00:08:14.687
connecting the steps.

00:08:15.506 --> 00:08:18.151
A node names an operation and its next step.

00:08:18.969 --> 00:08:22.344
The generator checks the graph and the Motoko types, then

00:08:22.277 --> 00:08:24.375
produces typed runtime wiring.

00:08:25.193 --> 00:08:28.503
That same definition also supplies the inspector's graph.

00:08:29.321 --> 00:08:32.305
We edit the source definition, then generate again.

00:08:34.517 --> 00:08:36.732
Local tasks run synchronously.

00:08:37.550 --> 00:08:40.755
They can dispatch reducer actions through Rechain; business

00:08:40.688 --> 00:08:42.526
state stays with its reducers.

00:08:43.345 --> 00:08:47.383
Read steps use selectors, while transforms prepare typed data.

00:08:48.201 --> 00:08:49.987
A choice selects one route.

00:08:50.806 --> 00:08:54.284
Remote tasks can use Reactor to batch requests and addressed

00:08:54.217 --> 00:08:55.873
replies between canisters.

00:08:56.691 --> 00:08:58.998
Direct actor calls are supported too.

00:08:59.816 --> 00:09:03.685
Reactor supplies scheduling; Takt keeps the workflow's progress.

00:09:04.504 --> 00:09:08.034
A remote wait suspends this operation, not the whole engine.

00:09:10.217 --> 00:09:12.158
A Choice node takes one route.

00:09:12.977 --> 00:09:15.414
This workflow checks its input in order.

00:09:16.232 --> 00:09:18.278
Four units selects the remote audit.

00:09:19.097 --> 00:09:21.494
Five selects the local audit directly.

00:09:22.313 --> 00:09:25.336
The first matching selector supplies the next node's typed

00:09:25.269 --> 00:09:25.804
input.

00:09:26.623 --> 00:09:28.369
The other route stays quiet.

00:09:30.550 --> 00:09:33.937
A parallel node starts separate branches, each with its own

00:09:33.870 --> 00:09:36.111
typed input and execution progress.

00:09:36.930 --> 00:09:39.874
Both remote operations can be outstanding together.

00:09:40.693 --> 00:09:43.221
Each result is merged back into the parent.

00:09:44.039 --> 00:09:47.062
The continuation waits until both branches finish.

00:09:47.880 --> 00:09:51.281
A retry belongs to its own visit, so a completed sibling

00:09:51.214 --> 00:09:52.570
does not start over.

00:09:53.388 --> 00:09:56.971
Parallel work is not a distributed rollback: effects already

00:09:56.904 --> 00:09:59.262
sent still need their outcomes resolved.

00:10:01.450 --> 00:10:05.475
A workflow can start another workflow, even in another canister.

00:10:06.293 --> 00:10:08.912
Scheduling the child does not mean it has finished.

00:10:09.731 --> 00:10:11.907
Here, the parent waits for an event.

00:10:12.726 --> 00:10:15.683
The subscription is registered before starting the child,

00:10:15.825 --> 00:10:17.688
so an early event is not lost.

00:10:18.507 --> 00:10:21.881
The child waits until a saved deadline, then publishes through

00:10:21.814 --> 00:10:22.975
a reducer action.

00:10:23.793 --> 00:10:26.686
Its block notification travels back through Reactor.

00:10:27.504 --> 00:10:31.308
Takt matches the expected producer, topic, and wait address,

00:10:31.410 --> 00:10:32.988
then resumes the parent.

00:10:33.806 --> 00:10:36.191
These saved waits survive upgrades.

00:10:38.417 --> 00:10:40.671
Failures need different responses.

00:10:41.489 --> 00:10:45.046
A known temporary rejection can retry after backoff, within

00:10:44.979 --> 00:10:46.140
a configured budget.

00:10:46.958 --> 00:10:50.606
The attempt number changes; the operation identity and saved

00:10:50.539 --> 00:10:51.856
request stay the same.

00:10:52.674 --> 00:10:56.322
Safe retries depend on the participant's idempotency contract

00:10:56.255 --> 00:10:57.572
and its validity window.

00:10:58.390 --> 00:11:00.580
But a timeout does not prove failure.

00:11:01.398 --> 00:11:04.707
An unresolved Reactor request keeps waiting for its original

00:11:04.640 --> 00:11:05.228
reply.

00:11:06.047 --> 00:11:09.382
If the outcome cannot safely be established, the workflow

00:11:09.315 --> 00:11:12.325
blocks for reconciliation using authoritative evidence.

00:11:13.143 --> 00:11:15.358
A known failure can take a catch route.

00:11:16.177 --> 00:11:19.590
Compensation is a new business action, not an undo button

00:11:19.523 --> 00:11:20.736
for remote effects.

00:11:22.917 --> 00:11:26.252
The inspector reads the canister's execution state and displays

00:11:26.185 --> 00:11:27.788
the same compiled graph.

00:11:28.607 --> 00:11:32.098
Select a node to see its visits, attempts, and outcome.

00:11:32.917 --> 00:11:36.408
A visit is one entry into a node; retries are attempts

00:11:36.341 --> 00:11:37.580
inside that visit.

00:11:38.398 --> 00:11:41.681
Enable tracing for retained execution history; it is off

00:11:41.614 --> 00:11:42.541
by default.

00:11:43.359 --> 00:11:47.124
The timeline shows how long each node takes, including remote

00:11:47.057 --> 00:11:48.804
attempts and retry waits.

00:11:49.622 --> 00:11:52.918
The instruction view shows recorded cost per node, on a

00:11:52.851 --> 00:11:54.468
cumulative cost axis.

00:11:55.286 --> 00:11:58.830
Here, Deliver uses nearly a million instructions while sharing

00:11:58.763 --> 00:12:00.275
one IC timestamp.

00:12:01.094 --> 00:12:04.351
Waiting takes time; executing takes instructions.

00:12:05.169 --> 00:12:07.801
Caller and participant measurements stay separate.

00:12:08.620 --> 00:12:10.874
Rechain records business changes.

00:12:11.693 --> 00:12:13.934
Reactor moves and schedules work.

00:12:14.752 --> 00:12:18.934
Takt makes the whole workflow explicit, persistent, and inspectable.

00:12:26.150 --> 00:12:28.651
Fourcans brings the three libraries together.

00:12:29.470 --> 00:12:33.248
Each canister runs the same application: Takt keeps workflow

00:12:33.181 --> 00:12:37.297
progress, Reactor schedules and transports work, and Rechain

00:12:37.230 --> 00:12:39.107
owns the business state and log.

00:12:39.926 --> 00:12:42.024
These are test processing cells.

00:12:42.842 --> 00:12:45.969
Their actions increment counters and add units to a total.

00:12:46.788 --> 00:12:48.743
Start a Local workflow on A.

00:12:48.949 --> 00:12:52.310
Open dispatches an action, its reducers commit, and a block

00:12:52.243 --> 00:12:53.000
appears.

00:12:53.819 --> 00:12:55.058
Audit does the same.

00:12:55.876 --> 00:12:58.170
Two local steps, two blocks.

00:12:58.988 --> 00:13:03.209
Now zoom out: B, C, and D contain the same machinery.

00:13:05.417 --> 00:13:07.424
A Sequence workflow starts on A.

00:13:07.409 --> 00:13:09.663
Reserve becomes a Reactor request to B.

00:13:09.818 --> 00:13:12.202
B stores the batch and acknowledges receipt.

00:13:13.021 --> 00:13:15.679
Its endpoint dispatches into B's Rechain.

00:13:16.497 --> 00:13:19.780
Both reducers must accept before their commit functions change

00:13:19.713 --> 00:13:21.056
state and append a block.

00:13:21.875 --> 00:13:24.793
The addressed result carries that block's index back to A.

00:13:24.752 --> 00:13:28.504
Takt can now deliver locally, close on C, and audit on

00:13:28.437 --> 00:13:28.843
A.

00:13:29.661 --> 00:13:31.773
The original caller is preserved.

00:13:32.591 --> 00:13:36.434
Within the validity window, the idempotency reducer recognizes

00:13:36.367 --> 00:13:39.950
a repeated request, so the workflow can reuse its original

00:13:39.883 --> 00:13:40.497
receipt.

00:13:42.683 --> 00:13:44.677
Parallel starts two branches on A.

00:13:44.636 --> 00:13:47.450
Reserve goes to B, while Deliver goes to C.

00:13:48.268 --> 00:13:50.666
Both requests can be outstanding together.

00:13:51.485 --> 00:13:54.507
Each destination commits to its own state and returns its

00:13:54.440 --> 00:13:55.757
own block reference.

00:13:56.576 --> 00:13:59.677
While A waits, D can run its own Local workflow.

00:14:00.495 --> 00:14:03.830
Takt joins both results, then closes locally on A.

00:14:04.649 --> 00:14:08.531
There is no global transaction across these logs; each dispatch

00:14:08.464 --> 00:14:10.328
commits inside its own canister.

00:14:12.550 --> 00:14:16.028
The Child workflow prepares a unique topic, registers its

00:14:15.961 --> 00:14:18.281
wait, and schedules a workflow on D.

00:14:18.214 --> 00:14:21.262
Admission is not completion: A waits for a matching block

00:14:21.195 --> 00:14:21.770
event.

00:14:22.589 --> 00:14:26.132
D's Scheduled workflow waits until its saved deadline, then

00:14:26.065 --> 00:14:27.122
takes a Choice.

00:14:27.940 --> 00:14:31.471
With four units, it requests a maintenance Audit on B before

00:14:31.404 --> 00:14:32.473
auditing locally.

00:14:33.292 --> 00:14:35.455
That local Audit commits a block on D.

00:14:35.414 --> 00:14:37.278
Reactor delivers the block event to A.

00:14:37.224 --> 00:14:41.353
Takt checks the producer, topic, and job, resumes the parent,

00:14:41.430 --> 00:14:42.812
and dispatches Close.

00:14:43.630 --> 00:14:47.083
The event connects two independently persisted workflows.

00:14:49.283 --> 00:14:52.800
Fanout starts twelve selector calls: four to B, four to

00:14:52.733 --> 00:14:54.402
C, and four to D.

00:14:54.426 --> 00:14:56.732
Reactor groups calls for the same peer.

00:14:57.551 --> 00:15:00.560
Each endpoint reads its local total without dispatching an

00:15:00.493 --> 00:15:02.201
action or creating a block.

00:15:03.020 --> 00:15:05.092
The twelve addressed results return to A.

00:15:05.064 --> 00:15:08.620
Takt joins the observations, then commits one Close action

00:15:08.553 --> 00:15:10.534
with their combined total in its memo.

00:15:11.353 --> 00:15:14.935
These are observations from separate canisters, not one atomic

00:15:14.868 --> 00:15:16.849
snapshot of the whole application.

00:15:19.050 --> 00:15:22.424
Relay keeps its workflow on A while its effects visit A,

00:15:22.630 --> 00:15:26.890
B, A, C, A, D, C, then B.

00:15:27.708 --> 00:15:30.939
Every hop commits an Audit action and retains the resulting

00:15:30.872 --> 00:15:31.890
block reference.

00:15:32.708 --> 00:15:35.718
A waits for each remote result before moving to the next

00:15:35.651 --> 00:15:36.096
hop.

00:15:36.914 --> 00:15:39.637
The graph does not migrate between canisters.

00:15:40.456 --> 00:15:43.674
Takt coordinates the order, Reactor carries the calls and

00:15:43.607 --> 00:15:47.411
replies, and each destination's Rechain records its own effect.

00:15:48.229 --> 00:15:51.499
Eight references connect the story across four separate logs.

00:15:53.717 --> 00:15:55.880
Now every canister receives work.

00:15:56.698 --> 00:16:00.372
Start the five ordinary workflow kinds on each cell: twenty

00:16:00.305 --> 00:16:02.560
roots, plus four scheduled children.

00:16:03.378 --> 00:16:06.440
Queues gather calls and results while the workflow engines

00:16:06.373 --> 00:16:08.067
keep independent progress.

00:16:08.886 --> 00:16:12.221
Reducers commit locally, and each chain grows in order.

00:16:13.039 --> 00:16:16.062
This one mix adds forty-eight permanent blocks across the

00:16:15.995 --> 00:16:16.895
application.

00:16:17.714 --> 00:16:21.453
We can inspect a workflow's progress, follow its remote results,

00:16:21.568 --> 00:16:23.757
and read the blocks behind its effects.

00:16:24.576 --> 00:16:27.364
The same three machines compose at every canister.

00:16:34.633 --> 00:16:37.304
Chatapp puts the same three machines to work.

00:16:38.124 --> 00:16:40.548
Every canister can own users and channels.

00:16:41.366 --> 00:16:43.061
Takt coordinates a send.

00:16:43.879 --> 00:16:46.342
Reactor carries work to other canisters.

00:16:47.161 --> 00:16:49.780
Rechain validates and commits the chat state.

00:16:50.598 --> 00:16:52.709
There is one important setting here.

00:16:53.528 --> 00:16:56.446
This app disables block recording and archives.

00:16:57.265 --> 00:17:00.314
Messages live in the reducer’s bounded history maps.

00:17:01.132 --> 00:17:04.467
Watch a local send: the workflow chooses local delivery,

00:17:04.609 --> 00:17:07.853
the reducer prepares its commit, and the history changes.

00:17:10.050 --> 00:17:12.408
A user sends through their home canister.

00:17:13.227 --> 00:17:15.663
The public method checks that the sender belongs to the

00:17:15.596 --> 00:17:19.596
caller, then starts a send workflow and returns its identifier.

00:17:20.414 --> 00:17:24.166
The destination is already inside the target’s D C I D,

00:17:24.320 --> 00:17:26.288
together with its local object number.

00:17:27.107 --> 00:17:29.153
No directory lookup is needed.

00:17:29.971 --> 00:17:32.760
The Choice node compares that owner with this canister.

00:17:33.578 --> 00:17:35.455
Same owner takes Deliver Local.

00:17:36.273 --> 00:17:39.231
A different owner takes Deliver Remote, through Reactor.

00:17:40.050 --> 00:17:42.265
The workflow stays in the sender’s home.

00:17:44.450 --> 00:17:47.811
Follow a channel post from A to C, on another subnet.

00:17:48.629 --> 00:17:52.225
Reactor puts the delivery in its interactive queue, alongside

00:17:52.158 --> 00:17:53.410
other sends to C.

00:17:54.228 --> 00:17:57.811
Available messages travel together in one intercanister call.

00:17:58.629 --> 00:18:01.222
The storage acknowledgement says the batch arrived.

00:18:02.041 --> 00:18:04.191
The workflow still needs the result.

00:18:05.009 --> 00:18:08.644
At C, the endpoint checks the forwarding canister and preserves

00:18:08.577 --> 00:18:09.803
the original caller.

00:18:10.621 --> 00:18:13.449
The chat reducer checks channel membership and the sender’s

00:18:13.382 --> 00:18:13.996
nonce.

00:18:14.814 --> 00:18:17.824
Its commit appends one sequenced message and remembers the

00:18:17.757 --> 00:18:18.410
receipt.

00:18:19.228 --> 00:18:22.655
C batches the result back to A, and Takt finishes.

00:18:23.473 --> 00:18:25.766
Channel members query this shared history.

00:18:26.585 --> 00:18:30.441
A post is stored once, not copied into every member’s inbox.

00:18:32.650 --> 00:18:35.099
A direct message uses the same workflow.

00:18:35.918 --> 00:18:38.407
This time the destination is another user.

00:18:39.225 --> 00:18:42.586
First, that user’s canister commits the received message.

00:18:43.405 --> 00:18:45.737
Its result comes back to the sender’s home.

00:18:46.556 --> 00:18:50.073
Now Copy Choice takes Copy Direct, which dispatches a local

00:18:50.006 --> 00:18:52.313
reducer action to save the sender’s copy.

00:18:53.131 --> 00:18:55.373
Only then does this workflow finish.

00:18:56.191 --> 00:18:59.162
These are two separate commits, on two canisters.

00:18:59.980 --> 00:19:03.433
Destination delivery and source workflow completion are different

00:19:03.366 --> 00:19:04.331
milestones.

00:19:06.550 --> 00:19:09.090
Sending the same nonce again should not append the same

00:19:09.023 --> 00:19:10.067
message twice.

00:19:10.885 --> 00:19:14.455
While its receipt is retained, the reducer returns the original

00:19:14.388 --> 00:19:15.132
sequence.

00:19:15.951 --> 00:19:18.843
Reusing that nonce with different content fails.

00:19:19.662 --> 00:19:23.661
A nonmember’s channel post fails too, before any state change.

00:19:24.479 --> 00:19:28.192
Remote work uses Takt’s reconciliation contract with Reactor’s

00:19:28.125 --> 00:19:29.624
saved request identity.

00:19:30.443 --> 00:19:33.830
An unknown result is not permission to invent a fresh delivery.

00:19:34.648 --> 00:19:38.101
History is deliberately bounded: three thousand messages per

00:19:38.034 --> 00:19:40.145
channel, and three hundred per user.

00:19:40.964 --> 00:19:44.090
Old messages and their client nonce receipts leave together.

00:19:44.909 --> 00:19:48.088
That nonce deduplication guarantee ends when its receipt is

00:19:48.021 --> 00:19:48.661
evicted.

00:19:50.850 --> 00:19:52.883
Now let the canisters work together.

00:19:53.701 --> 00:19:55.903
Each accepts its own users’ sends.

00:19:56.722 --> 00:19:59.484
Local destinations stay inside the canister.

00:20:00.303 --> 00:20:04.042
Remote destinations go through per-peer Reactor queues, including

00:20:03.975 --> 00:20:05.617
across subnet boundaries.

00:20:06.435 --> 00:20:10.213
Requests travel out, results travel back, and many workflows

00:20:10.146 --> 00:20:11.659
remain in flight together.

00:20:12.477 --> 00:20:15.448
The same mixed-role canister repeats throughout the mesh.

00:20:16.266 --> 00:20:20.044
Here is the benchmark layout: eight subnets, eight canisters

00:20:19.977 --> 00:20:20.630
in each.

00:20:21.448 --> 00:20:24.054
Batching amortizes communication overhead.

00:20:24.873 --> 00:20:28.052
It does not turn separate canister commits into one atomic

00:20:27.985 --> 00:20:28.872
transaction.

00:20:31.084 --> 00:20:33.585
How much work did that arrangement handle?

00:20:34.403 --> 00:20:37.543
The retained two-million-user run measured about twenty-four

00:20:37.476 --> 00:20:41.149
thousand destination deliveries per second: twenty-three thousand,

00:20:41.252 --> 00:20:42.868
eight hundred and seventy-two.

00:20:43.687 --> 00:20:46.814
That counts one channel or recipient commit per message.

00:20:47.632 --> 00:20:51.761
Replies, sender copies, and member reads do not add deliveries.

00:20:52.580 --> 00:20:56.449
The run used sixty-four canisters, one-hundred-and-twenty-eight-byte

00:20:56.382 --> 00:20:59.991
bodies, and a twenty-six-point-six-second measurement window.

00:21:00.809 --> 00:21:04.860
It was Pocket I C, with an assumed three-hundred-and-thirty-three-millisecond

00:21:04.793 --> 00:21:07.829
round, not measured mainnet network performance.

00:21:08.648 --> 00:21:12.230
All admitted work eventually drained, but backlog grew, so

00:21:12.163 --> 00:21:14.926
this run did not qualify as sustained throughput.

00:21:15.744 --> 00:21:19.639
The architecture is the useful part: Takt coordinates, Reactor

00:21:19.572 --> 00:21:22.582
batches, and Rechain commits each canister’s state.
