WEBVTT

00:00.000 --> 00:16.360
So, hello everyone, I'm Jessica Talon, internally sometimes known as the goblin in

00:16.360 --> 00:23.280
Chantras, because I work in Goblins a lot, I sort of live and breathe it.

00:23.280 --> 00:28.720
I work at the Sprightly Institute, and I looked at this morning, it turns out we've been

00:28.720 --> 00:36.080
working on the Sprightly Technologies in November 2021, so a while.

00:36.080 --> 00:45.720
You may know me from being a co-author on activity pub, so my background is in developing

00:45.720 --> 00:51.400
and standardizing federated social technologies.

00:51.400 --> 00:57.720
So, who is Sprightly, I'm guessing you're all aware by now, but in case you missed it,

00:57.720 --> 01:04.080
where a research institute, where a US registered nonprofit, and we're developing the next

01:04.080 --> 01:11.440
generation of decentralized networking technologies, the two sort of headline projects

01:11.440 --> 01:22.960
we develop, goblins, just talks about, and whoop, which you may have heard my colleague David

01:22.960 --> 01:31.920
Thompson speak about earlier, it's a Giles scheme to WebAssembly compiler, and we are running

01:31.920 --> 01:37.800
a donation campaign, we're a number of it, so if you think this works important, I'm

01:37.880 --> 01:42.880
not spotters, please go to our website and donate.

01:42.880 --> 01:44.880
What is this talk?

01:44.880 --> 01:52.720
Well, I really like Goblins, it turns out, and I'm going to make a really bold claim, and

01:52.720 --> 02:03.920
say you should use it for almost anything, your next project for sure, granted, I'm biased.

02:03.960 --> 02:10.440
So, this is our cute Goblins character, but what is Goblins?

02:10.440 --> 02:16.200
You've heard everyone throw this word around, or maybe you haven't, I'm going to, so it's

02:16.200 --> 02:24.640
a Gile Library, it's based on the Acta model, it's employees object capability security,

02:24.640 --> 02:32.440
which has really well with the Acta model, and sort of one comes out of the other, it's

02:32.520 --> 02:40.200
O'Cappen, which is our distributed peer-to-peer networking technology, it has a time travel

02:40.200 --> 02:46.120
debugger, which is as cool as it sounds, and it has a persistent system, and a bunch

02:46.120 --> 02:49.200
of other things.

02:49.200 --> 02:50.600
So what is this Acta model?

02:50.600 --> 02:57.080
Leader Veets says these spritly folks are telling you all about the Acta model, and I'm a spritly

02:57.080 --> 03:02.400
person, I'm going to tell you all about the Acta model.

03:02.440 --> 03:09.520
So what are Actas that the kind of objects, they're not objects in the sense of inheritance

03:09.520 --> 03:15.200
or anything like that, but they have some data usually, some data associated with them,

03:15.200 --> 03:21.480
and then some behavior, and they may have methods and other things like that, and they tend

03:21.480 --> 03:29.320
to communicate with each other by sending messages to one another, and in Goblins, these

03:29.400 --> 03:35.240
messages tend to result in promises, that isn't necessarily a feature of the Acta model,

03:35.240 --> 03:39.800
and I'm about to come on to this, we technically don't actually implement the Acta model,

03:39.800 --> 03:46.200
we implement the VAT model, which is very heavily based on the Acta model, just with some

03:46.200 --> 03:52.600
interesting other things associated with it, so what's this VAT thing I'm referring to?

03:52.680 --> 03:58.920
VAT is essentially an event loop, and it's a message key.

03:58.920 --> 04:05.400
So when you message an actor, you know, actually messaging the actor directly, you are messaging

04:05.400 --> 04:12.280
the VAT at Livson, and it's going to join this queue of messages, and then the VAT is going

04:12.280 --> 04:20.760
to process one message at a time, and dispatch it to the actor, and actors are spawned

04:20.840 --> 04:27.880
within a particular VAT, spawning as the Goblins work for creating a new actor, and that's

04:27.880 --> 04:36.840
also transaction, so if an error happens, when it's processing a message, it will not apply the

04:36.840 --> 04:44.200
transaction. So what did these actors look like? I hope everyone can see it, I think this theme

04:44.280 --> 04:55.240
isn't great, now I've seen it in screen, but actors are essentially, well we've got this

04:55.240 --> 05:00.840
greeter actor here, and you can see it's got this sort of carrot, this hard-hacked character at

05:00.840 --> 05:06.600
the beginning, that's Goblins Convention for it's the constructor, so it's the greeter constructor.

05:08.200 --> 05:12.760
It has this become argument that Julie mentioned, and I'm going to mention in a little bit,

05:13.720 --> 05:18.760
I'm going to ignore it for now, because this actor doesn't use it, and it takes a name,

05:19.800 --> 05:24.440
then it returns, it doesn't do anything else in the constructor, it could, and then it returns

05:24.440 --> 05:31.480
some behavior, which is, it will, when in VAT it will, with a name it will greet that person,

05:31.480 --> 05:38.920
hello, Bob, my name is Alice, that kind of thing, and that's basically what an actor is,

05:38.920 --> 05:45.960
and so how do you use these things, as I said, you can spawn them, and in this case we're

05:45.960 --> 05:53.000
spawning Alice, and if you use this arrow it sends a message to Alice, and in this case you're

05:53.000 --> 05:57.080
passing Bob in, so that will be their name, and you're getting this promised thing back,

05:58.600 --> 06:05.480
but this is this dollar thing, that is an immediate invoke of the actor,

06:06.360 --> 06:13.880
it's synchronous, and so it can only be used when you're in the same VAT as the actor,

06:14.680 --> 06:18.840
but in this case you are, so you can see we just get this string, but you'd expect.

06:21.560 --> 06:28.360
So this promised thing, how do you use it? You have this function called on, and in this case

06:28.360 --> 06:33.960
we're, you know, we're creating a promise, and you can register a sort of call back like thing,

06:34.680 --> 06:39.400
and in this case, PK, if you didn't know, is basically something to the screen,

06:40.760 --> 06:46.040
and so it will print the greeting. Our actor won't ever really, it doesn't do much,

06:46.920 --> 06:52.280
but if you, if you did want to handle that, you can catch errors like that. That's not the

06:52.280 --> 06:59.320
only way to handle promises, there are mistakes in this code, I wish it fixed before coming

07:00.280 --> 07:05.960
either way, it's the just you need to get. So in this case was wanting a builder,

07:06.760 --> 07:11.000
and then you're sending a message to that builder, hey, build me a car factory, that's

07:11.000 --> 07:18.200
bit contrived, and you know, that takes a bit of time, but you don't have to wait until it's built,

07:18.200 --> 07:23.400
you can then just be like, make me a car, and then you don't even have to wait for the car,

07:23.400 --> 07:28.520
all the factory to exist, you can also just say, hey I want to drive the car, and what's happening

07:28.600 --> 07:35.880
here is called promised pipelining, you just send messages to a promise, and you can use it as if

07:35.880 --> 07:40.360
it is the value, and eventually it should resolve, if an error happens, it will be passed back

07:40.360 --> 07:47.480
up the chain, so you could catch the error when you're driving. And so this become the argument,

07:48.280 --> 07:57.480
Julie mentioned it in her talk, what is it? How does it work? So this is the sale actor, it's basically

07:57.560 --> 08:03.560
a box, you can put something in it, you can look up what's in the box, you can change the item in

08:03.560 --> 08:10.440
the box, it's a sale, and it's based on, if you call it in their arguments, it will show you the

08:11.000 --> 08:18.680
value, if you pass in a value, it will change to that new value, but we're not doing any sets or anything,

08:19.480 --> 08:25.080
we're using this become thing, and you can notice that we are actually calling the constructor again,

08:25.240 --> 08:31.640
passing in that become we had, and passing in the new value, and this is telling Goblins,

08:34.040 --> 08:42.040
be this new value, and this is important because we don't want to mutate the actor for reasons

08:42.040 --> 08:51.960
I'm going to get into, actually I should have gotten into them then, basically you want to be

08:52.040 --> 08:57.480
able to go back in time and use this transactionality, and this is a neat game called terminal

08:57.480 --> 09:03.640
face that my colleague Christine built, and this is this time travel in a really interesting way,

09:03.640 --> 09:10.920
and actually exposes it to the user, and so you're going along, and you can see you can zoom back

09:10.920 --> 09:17.720
in time, so when you die to these S-squigler things, you can just zoom and do that, and that's great.

09:18.680 --> 09:27.960
We also have a debugger, a little bit also spoke about debugging these things, it can be tricky,

09:29.960 --> 09:35.800
and so we have this debugger over here, I'm going to be very quick, you can stay in the editor,

09:35.800 --> 09:41.960
it's built on top of the editor, you can get trees of events, you can travel back in time,

09:41.960 --> 09:47.960
so again it's built on that, and it will even give you some diagrams, so here's a tree, several

09:47.960 --> 09:53.800
vats, lots of messages, I'm not going to focus on that, it's just nice to be able to see this thing,

09:53.800 --> 10:02.120
you can jump to a particular point in time and interrogate those actors at that time, it's not

10:02.120 --> 10:08.600
the current buffer list here where you're asking it's HP, it's the buffer list at the point in time

10:09.480 --> 10:16.840
from this list of events, so you can really play with your actors, and you can make diagrams,

10:16.840 --> 10:22.360
so these are three vats, let's just between them, and it makes it really easy to see what's going on,

10:22.360 --> 10:28.760
and start debugging things and makes sense if you're your code, oh, Captain, that's our distributed

10:29.800 --> 10:36.440
network component, and this allows you to have actors live on different machines,

10:37.320 --> 10:42.520
and it's transport mechanism agnostic, so we implement what we call net layers, there is the

10:42.520 --> 10:50.120
torn net layer, live PTP, TCPTLS, and now web sockets, and that allows you to very easily

10:53.160 --> 11:00.840
have your programs run over a different transport mechanisms, it includes third party handoffs

11:01.080 --> 11:05.240
and distributed a cyclic garbage collection, and we're currently standardizing it,

11:07.400 --> 11:12.280
I'm not going to focus too much on this code, but basically this is all the code you need to set up

11:12.280 --> 11:20.280
our captain, and this is all the code you need to connect over our captain, and interestingly,

11:22.200 --> 11:30.520
this is using the salad before, but if you wrote a huge program like a virtual world with lots

11:30.520 --> 11:35.800
of actors and lots of players, it's still this amount of code, it doesn't really grow.

11:38.360 --> 11:43.400
What are these handoffs? I'm not going to go through this too much, that would actually take

11:43.400 --> 11:53.640
more than the whole map I've been a lot here, but basically if you have three machines and your

11:54.520 --> 12:01.960
Alicia has a reference to Carol and Ben, and you want to share Carol with Ben, but you can see

12:03.240 --> 12:08.360
the machine B and C here don't have a connection, handoffs will securely allow this to happen,

12:08.360 --> 12:12.600
so you don't have to think about it, goblins it's care of it, and quite frankly you shouldn't

12:12.600 --> 12:19.000
need to ever understand this diagram, that should be, so think only I and other O-CAPM implementers need

12:19.000 --> 12:27.720
to focus on. It has this persistence thing, and this is a Q or E character, it should be easy to use

12:27.720 --> 12:33.800
and automatic in most cases, it should persist, act of reference, not just your strings and

12:33.800 --> 12:39.480
integers and things like that, and it should be stored in a storage diagnostics, so you shouldn't

12:39.480 --> 12:47.320
be tied to SQLite databases or files on your files system, and it's designed to be really easy to

12:47.400 --> 12:53.080
implement new ones, so we don't have a couple at the moment, we'll expand in time, but it should be

12:53.080 --> 13:00.680
easy for you to write whatever storage thing you need, and upgrading actors, it turns out persistence

13:00.680 --> 13:09.000
is a great time to do that. So if you were to remember the cell from before, what needs to change

13:09.000 --> 13:16.280
for this to be persistable, you want to look at this defined here, that you change it to define

13:17.160 --> 13:22.840
suddenly the cell can be persisted, and what do I mean by that? It's safe to disc, and you can

13:22.840 --> 13:28.920
wake it back up, and it will look and behave the same, it will be the same actor, even after

13:28.920 --> 13:36.760
a full process restar, and this will work for huge graphs of objects. This is how we go great,

13:36.760 --> 13:40.760
I'm not going to walk through it, basically, so if I missed out, it started off with temperature

13:40.760 --> 13:49.480
and Fahrenheit, I realized my mistake, Celsius is great, and so it's converting it to Celsius,

13:51.320 --> 13:55.160
actors are always tagged with version zero if you don't say something, and then if you're

13:55.160 --> 13:59.960
not great, you can say, hey, this is actually version one, and I'm going to do some kind of

14:00.520 --> 14:07.480
logic there, to change it, and then spawn the final thing. Goblins works on the web, this is actually

14:07.560 --> 14:15.160
Firefox here, and I'm going to skip that. This is Firefox, and this is actually Goblins working

14:15.160 --> 14:21.320
in this Goblin Chat, and it's actually using Ocapen even in the browser, and you can see

14:22.600 --> 14:29.480
you can chat to another, and so you can write your Goblins applications and bring them to the

14:29.480 --> 14:34.520
browser, you don't have to write JavaScript or anything like that, it just works, thank you Dave,

14:34.600 --> 14:43.560
Andrew Lee and Andy, and everyone that's worked on who, it's really easy to use, so I'm still in the

14:43.640 --> 15:05.160
textbooks, I'm done, questions, yes, I actually have one, is the scope of this time traveling

15:05.240 --> 15:14.440
back in time is a single version basically, right? So you can travel, repeat the question, sorry,

15:14.440 --> 15:21.640
is a time travel limited to a single VAT, and no, it is not, that's the distributed part of

15:21.640 --> 15:27.080
distributed debugging, you can jump between VATs, and actually my example I skipped over did that.

15:27.240 --> 15:35.880
It doesn't work over a capping yet, we're thinking about it, it will, hopefully.

15:35.880 --> 15:41.880
Because I've always used full of these stuff, because if you like stuff to distribute out,

15:41.880 --> 15:48.680
the concept of global time and global ordering is going to break down, it's a big topic,

15:49.640 --> 15:56.200
yeah, captures in the corridor will happily chat to you about that, yes?

16:03.480 --> 16:11.960
No, yeah, sorry, I should repeat, after persisting to disk and reawakening do you have the option

16:11.960 --> 16:21.720
to time travel the book? No, you don't, we're hoping to bring some diagnostics you can do,

16:21.720 --> 16:25.960
after you shut your program down, there's a lot of the debugging stuff we could do,

16:27.320 --> 16:31.960
did you want to add some of interesting? Except sort of yes, because you should be able to,

16:31.960 --> 16:37.960
we have in the designs that you're able to save generations, so you could restore previous generation.

16:38.040 --> 16:41.720
Yes, yes, let's true.

16:53.560 --> 16:57.960
So do I know about what can you, that is doing with Sparkle's work?

16:57.960 --> 17:07.400
I actually am not that familiar with Ganyu now, are you Christine?

17:08.920 --> 17:13.080
If somebody could try to make a Ganyu net net layer if they wanted to,

17:14.280 --> 17:17.720
and that's all we have time to talk about in this topic.

