WEBVTT

00:00:00.500 --> 00:00:02.114
A sailing school wants an app.

00:00:03.015 --> 00:00:06.856
Students enroll, instructors score them, and a student who passes

00:00:06.869 --> 00:00:09.200
gets a crew card that anyone can verify.

00:00:10.098 --> 00:00:13.496
Before we draw a single box, we write down the facts the app

00:00:13.509 --> 00:00:14.160
must keep.

00:00:15.059 --> 00:00:16.140
The pass mark.

00:00:17.038 --> 00:00:17.910
The courses.

00:00:18.809 --> 00:00:19.877
Who is a student.

00:00:20.775 --> 00:00:21.647
Enrollments.

00:00:22.546 --> 00:00:23.288
Scores.

00:00:24.187 --> 00:00:25.489
Each school's standing.

00:00:26.387 --> 00:00:27.181
The cards.

00:00:28.080 --> 00:00:29.147
Revocations.

00:00:30.046 --> 00:00:32.754
Beside each fact we write who has the final say.

00:00:33.653 --> 00:00:37.090
The dean runs the school, so the pass mark, the courses and

00:00:37.103 --> 00:00:38.718
the student list are the dean's.

00:00:39.616 --> 00:00:41.452
An instructor decides a score.

00:00:42.351 --> 00:00:44.707
But a card is not the school's to decide.

00:00:45.606 --> 00:00:48.939
The federation board stands behind every card, and only the

00:00:48.952 --> 00:00:51.426
board can suspend a school or revoke a card.

00:00:53.567 --> 00:00:54.882
Start with one actor.

00:00:55.782 --> 00:00:58.126
Every fact becomes a module inside it.

00:00:59.024 --> 00:01:02.293
This is the design you already know: modules own their memory,

00:01:02.540 --> 00:01:05.274
and one call can check and change several of them together.

00:01:06.173 --> 00:01:08.673
For most of this app, that is all we need.

00:01:09.571 --> 00:01:12.800
An actor line is a decision, and four questions make it.

00:01:13.699 --> 00:01:16.329
Authority: is the final say a different party?

00:01:17.227 --> 00:01:20.131
Audience: does a different public read it or call it?

00:01:21.030 --> 00:01:24.402
Consistency: must it change together with something else, in

00:01:24.415 --> 00:01:25.118
one call?

00:01:26.017 --> 00:01:29.454
Deployment: does it live, upgrade or scale on its own?

00:01:30.352 --> 00:01:31.563
Ask them of the card.

00:01:32.462 --> 00:01:34.962
Authority: the board, not the dean.

00:01:35.860 --> 00:01:39.532
Audience: anyone at all must be able to check a card, even if

00:01:39.545 --> 00:01:40.795
this school closes.

00:01:41.694 --> 00:01:44.740
Deployment: many schools will use one registry.

00:01:45.639 --> 00:01:48.061
Three tests say the card belongs elsewhere.

00:01:48.959 --> 00:01:51.472
So we draw a second actor, the registry.

00:01:52.371 --> 00:01:54.766
Consistency then tells us what goes with it.

00:01:55.665 --> 00:01:59.415
A card must never be issued for a suspended school, so standing

00:01:59.493 --> 00:02:00.652
and cards sit together.

00:02:01.550 --> 00:02:03.556
Should every module get its own canister?

00:02:04.454 --> 00:02:06.264
Try it with courses and the roll.

00:02:07.162 --> 00:02:10.027
Recording a score must check that the caller is that course's

00:02:10.040 --> 00:02:10.717
instructor.

00:02:11.615 --> 00:02:15.105
Inside one actor, that is a plain call, answered in the same

00:02:15.118 --> 00:02:15.548
step.

00:02:16.446 --> 00:02:18.920
Across a line it becomes a message and a wait.

00:02:19.819 --> 00:02:22.162
While we wait, the course can change.

00:02:23.061 --> 00:02:25.287
And the answer may not come back at all.

00:02:26.186 --> 00:02:30.274
Same authority, same audience, and they must agree in one call.

00:02:31.173 --> 00:02:32.280
We put them back.

00:02:34.433 --> 00:02:36.490
The line we kept has the same price.

00:02:37.390 --> 00:02:39.734
Awarding a card now needs both actors.

00:02:40.633 --> 00:02:41.948
The school can instruct.

00:02:42.846 --> 00:02:45.164
The registry decides and owns the card.

00:02:46.062 --> 00:02:49.708
Between them is a wait, and three ways it can end: yes, no,

00:02:49.981 --> 00:02:51.127
and not known yet.

00:02:52.026 --> 00:02:55.502
We accept that price here because the authority is truly separate.

00:02:56.401 --> 00:02:58.901
The rest of this course is about paying it well.

00:02:59.799 --> 00:03:00.880
This is our map.

00:03:01.778 --> 00:03:05.112
The school on the left, with its students, its instructor and

00:03:05.125 --> 00:03:06.297
its dean outside.

00:03:07.195 --> 00:03:10.125
The registry on the right, with the board above it and the public

00:03:10.138 --> 00:03:10.659
below.

00:03:11.557 --> 00:03:15.021
Every drawing from here on is this map, closer or longer.

