WEBVTT

00:00:00.500 --> 00:00:02.088
Go back to the first moment.

00:00:02.989 --> 00:00:06.009
The canister is created, and its memory is empty.

00:00:06.908 --> 00:00:08.796
How does this tree come to exist?

00:00:09.694 --> 00:00:12.077
The root does it, in its install function.

00:00:12.976 --> 00:00:14.551
First the root's own memory.

00:00:15.450 --> 00:00:18.028
It has four slots, and this file names them.

00:00:18.926 --> 00:00:22.754
Then the root asks each module for a new, empty memory and attaches

00:00:22.767 --> 00:00:23.614
it in its slot.

00:00:24.512 --> 00:00:26.908
Policy arrives with its starting rules.

00:00:27.806 --> 00:00:29.968
The root never sees inside any of them.

00:00:30.866 --> 00:00:32.116
It is all one step.

00:00:33.015 --> 00:00:36.062
A memory that was made and not attached would be discarded when

00:00:36.075 --> 00:00:36.921
the step ends.

00:00:37.819 --> 00:00:39.239
Notice what is missing.

00:00:40.137 --> 00:00:41.387
There are no shelves.

00:00:42.285 --> 00:00:46.140
A shelf is created later, by Branches, when an admin opens a

00:00:46.153 --> 00:00:46.778
branch.

00:00:47.676 --> 00:00:49.942
Install builds the fixed part of the tree.

00:00:50.840 --> 00:00:52.429
The rest grows with use.

00:00:54.567 --> 00:00:56.090
Memory alone does nothing.

00:00:56.990 --> 00:01:00.233
The root now binds a service to each module and builds Desk

00:01:00.246 --> 00:01:00.688
from them.

00:01:01.587 --> 00:01:03.631
This is the call graph from lesson two.

00:01:04.530 --> 00:01:07.668
Install builds the initial tree on a fresh installation.

00:01:08.566 --> 00:01:11.183
Restore opens the saved tree on upgrade.

00:01:12.082 --> 00:01:13.891
Both end with this same binding.

00:01:16.000 --> 00:01:17.809
Jump forward to day one-twenty.

00:01:18.710 --> 00:01:22.720
Two branches are open, five loans are out, and release one is

00:01:22.733 --> 00:01:23.437
installed.

00:01:24.335 --> 00:01:25.611
We want a new rule.

00:01:26.509 --> 00:01:29.140
A member with an overdue loan may not borrow again.

00:01:30.038 --> 00:01:31.861
That rule lives in Desk's code.

00:01:32.759 --> 00:01:34.739
No module saves anything new.

00:01:35.637 --> 00:01:36.952
Install release two.

00:01:37.851 --> 00:01:40.233
The old program lets go of its services.

00:01:41.132 --> 00:01:44.791
Every service band, the call lines, Desk, all of it.

00:01:45.689 --> 00:01:47.955
Services do not survive an upgrade.

00:01:48.853 --> 00:01:49.791
Memory does.

00:01:50.689 --> 00:01:53.306
The new program starts on the restore path.

00:01:54.205 --> 00:01:55.311
It creates nothing.

00:01:56.210 --> 00:01:59.999
It finds the root, finds each attached module, and binds the

00:02:00.012 --> 00:02:01.015
services again.

00:02:01.913 --> 00:02:05.129
The shelves that were opened last month are still on their keys.

00:02:06.028 --> 00:02:08.345
Member five-oh-two asks for a saw.

00:02:09.244 --> 00:02:12.629
Two loans, under the limit, and a saw is on the shelf.

00:02:13.528 --> 00:02:15.051
Yesterday this was a yes.

00:02:15.950 --> 00:02:18.306
But both of their loans were due before today.

00:02:19.205 --> 00:02:20.598
Release two says no.

00:02:21.496 --> 00:02:23.137
The data did not change.

00:02:24.035 --> 00:02:24.921
The rule did.

