WEBVTT

00:00.000 --> 00:16.000
All right, here I run, it's megan, this is about something that is very raw, very fresh,

00:16.000 --> 00:21.000
very new, very prototype, distributed real-time collaboration for writer.

00:21.000 --> 00:24.000
So I'm just here presenting that actually, quote,

00:24.000 --> 00:29.000
I've just been packed by Michael Stahl into T-Board.

00:29.000 --> 00:33.000
So I'm just talking about it.

00:33.000 --> 00:37.000
Although I had some ideas down about the actual work that's done with some money else.

00:37.000 --> 00:40.000
I'm distributed real-time, what does it mean?

00:40.000 --> 00:42.000
Let's start with a few definitions.

00:42.000 --> 00:44.000
Document collaboration.

00:44.000 --> 00:47.000
So this is not collaborating in a video call.

00:47.000 --> 00:52.000
This is actually a document that you want to work with more than one person on that.

00:52.000 --> 00:58.000
Distributed, which means not like a collaborative online with a one copy,

00:58.000 --> 01:01.000
and then like getting all the input into one copy,

01:01.000 --> 01:05.000
but more than one copy, two, three, ten, twenty,

01:05.000 --> 01:10.000
and different places on different machines and different instances in this world.

01:10.000 --> 01:13.000
So you need to kind of synchronize all those documents.

01:13.000 --> 01:18.000
And real-time means like not just sending the document around by email,

01:18.000 --> 01:23.000
and then everybody does that sequentially, but collaboratively,

01:23.000 --> 01:28.000
like in real-time, like at the same time editing.

01:28.000 --> 01:32.000
So right, there's some history there.

01:32.000 --> 01:39.000
Of this in the, let's say, computer science community,

01:39.000 --> 01:43.000
there was some ad hoc things to do collaboration as this mother of all,

01:43.000 --> 01:47.000
for demos from the Engelbord late sixties,

01:47.000 --> 01:55.000
which was allegedly at least the Wikipedia, the very first instance of some collaboration

01:55.000 --> 01:58.000
on some text document.

01:58.000 --> 02:04.000
Then in the early 2000s, there was the pre-web,

02:04.000 --> 02:09.000
if you will, area on Mac, most of this moon added,

02:09.000 --> 02:14.000
so ether added, which already did some sort of collaboration,

02:14.000 --> 02:19.000
we wrote different machines rightly, it was another one.

02:19.000 --> 02:25.000
And then it started slowly with the Ajax JavaScript world,

02:25.000 --> 02:30.000
and then it really was taking off, so that was the some Google wave,

02:30.000 --> 02:34.000
either paired, CK editor, started in the mid 2000s.

02:34.000 --> 02:38.000
And it was the first time that people actually started to look into that more

02:38.000 --> 02:42.000
conceptually, so there was this time of operational transformation,

02:42.000 --> 02:49.000
which was a formalized way to reason about what kind of algorithm do we need

02:49.000 --> 02:54.000
before that it was mostly ad hoc, so someone just somehow implemented that and made it work.

02:54.000 --> 03:01.000
And it was the second wave that's item three conflict free replicated data types,

03:01.000 --> 03:05.000
which is I think one step further from operational transformation.

03:05.000 --> 03:11.000
The idea there is to do something where you do not have inherent conflicts.

03:11.000 --> 03:15.000
So the problem with operational transformation was that it was formalized,

03:15.000 --> 03:20.000
but it didn't solve the problem that if someone was ten minutes offline

03:20.000 --> 03:25.000
and was editing something, and the rest was then editing in the same paragraph,

03:25.000 --> 03:29.000
there would be a conflict of this person come online again,

03:29.000 --> 03:32.000
and someone would need to resolve that conflict.

03:32.000 --> 03:36.000
And there's a CRDT which is this kind of newfangled thing,

03:36.000 --> 03:42.000
at least supposedly resolves that in a way that it's this always defined way

03:42.000 --> 03:47.000
that the conflict will be resolved, so for simple cases there are no conflicts.

03:47.000 --> 03:52.000
Although sometimes surprising behavior.

03:52.000 --> 03:59.000
So that is actually pretty wide spread now, it's all over the place, it's databases,

04:00.000 --> 04:03.000
the next cloud, if you've been using the next cloud editor,

04:03.000 --> 04:06.000
and the markdown editor is using that zip tab.

04:06.000 --> 04:09.000
But it was through the code, if you do a collaboration there is using that code,

04:09.000 --> 04:11.000
not always using that.

04:11.000 --> 04:14.000
And there's a number of libraries, many of them,

04:14.000 --> 04:19.000
obviously for the web, YAS, auto merge,

04:19.000 --> 04:23.000
and that's 2010, 2011 and later,

04:23.000 --> 04:27.000
and there's plenty of papers and plenty of research there.

04:27.000 --> 04:31.000
So let's say the history and the background.

04:31.000 --> 04:40.000
What we thought we could do is run a little prototype and see whether that is actually feasible and doable.

04:40.000 --> 04:47.000
So we were asking and now that, and I'm happy to say that they approved that project,

04:47.000 --> 04:52.000
and there was a bit of funding there to implement a prototype real-time collaboration.

04:52.000 --> 04:55.000
So we started small, so we said let's use CRDTs,

04:55.000 --> 04:58.000
because that's most of the parties these days,

04:58.000 --> 05:02.000
and do it for writer and do it for writer, read only document,

05:02.000 --> 05:05.000
where people want to collaborate on the comments.

05:05.000 --> 05:10.000
So that's the serious, very small use case, but I think not irrelevant.

05:10.000 --> 05:14.000
You get a contract, you get a, I don't know,

05:14.000 --> 05:18.000
there's some law enacted, that's like 20 pages of document,

05:18.000 --> 05:21.000
you want to review that, so you get like 20 people in the room,

05:21.000 --> 05:24.000
and you want to comment that, so you highlight the things,

05:24.000 --> 05:28.000
or this is a problem, or this is fine, and ask Jack about that.

05:28.000 --> 05:32.000
So go over that, and yeah, so that will be asked and then to fund.

05:32.000 --> 05:37.000
There's a project page there, and the first thing, of course,

05:37.000 --> 05:42.000
is we need to have editable comments while the document is read only.

05:42.000 --> 05:46.000
So that's what T were implemented, the patches there.

05:46.000 --> 05:49.000
And that's the comment from the, from the git commit,

05:49.000 --> 05:53.000
this is a prototype, obviously, and it creates a special note,

05:53.000 --> 05:56.000
that allows editing comments, and adding new comments,

05:56.000 --> 06:00.000
and deleting comments while the rest of the document is actually read only,

06:00.000 --> 06:03.000
which is mostly, there's a bit of plumbing there,

06:03.000 --> 06:07.000
but it's mostly enabling that part of the UI,

06:07.000 --> 06:10.000
whether the rest is still disabled, so there's this lot,

06:10.000 --> 06:15.000
there's a little bit of tweaking there,

06:15.000 --> 06:16.000
to make that still work.

06:16.000 --> 06:21.000
There's an environment variable you need to set to enable that, so yeah, very early days.

06:21.000 --> 06:25.000
The second one is actually, and that's the more,

06:25.000 --> 06:32.000
more involved, but here, hook an existing CIDT library into liberal office,

06:32.000 --> 06:36.000
and so we thought, let's start with rest here,

06:36.000 --> 06:40.000
and the good thing is that there was actually the only option,

06:40.000 --> 06:44.000
so there was either JavaScript, and there's some auto merge C++,

06:44.000 --> 06:45.000
but those were early days.

06:45.000 --> 06:48.000
The only thing I was really like mature enough,

06:48.000 --> 06:53.000
and our opinion was the MyRS library, which is Rust,

06:53.000 --> 06:58.000
and it's one of my secret plans, a number of years,

06:58.000 --> 07:01.000
to get some rest, just to prototype a way

07:01.000 --> 07:04.000
to get Rust integrated into the build system,

07:04.000 --> 07:06.000
and I'm making that usable from liberal office,

07:06.000 --> 07:09.000
and so Michael did that, that's the commit,

07:10.000 --> 07:12.000
Command-WRS working progress,

07:12.000 --> 07:15.000
which was linked on Garrett,

07:15.000 --> 07:22.000
so that adds a shadow added engine model,

07:22.000 --> 07:25.000
which mirrors what is in the added engine,

07:25.000 --> 07:29.000
which is the text engine that powers the commands,

07:29.000 --> 07:32.000
which models what is in the added engine,

07:32.000 --> 07:36.000
text model into the CODT data type,

07:36.000 --> 07:38.000
so that the CODT can then sum that,

07:38.000 --> 07:42.000
and then we copy it out back into the added engine.

07:42.000 --> 07:46.000
Right, what's not working?

07:46.000 --> 07:49.000
This cavalry and transport is mostly not working.

07:49.000 --> 07:53.000
This cavalry means, well, I'm sitting here,

07:53.000 --> 07:56.000
and somebody else sits in Berlin,

07:56.000 --> 07:58.000
and so how can we collaborate?

07:58.000 --> 08:01.000
So we need some way to find each other,

08:01.000 --> 08:06.000
that is superbly done by piggybacking

08:06.000 --> 08:08.000
on existing chat protocols.

08:08.000 --> 08:11.000
You already have a signal or an XMPP,

08:11.000 --> 08:15.000
or a matrix, chat, or teams, or whatever,

08:15.000 --> 08:18.000
so you would say, okay, we need an external,

08:18.000 --> 08:20.000
and then let's collaborate on the document,

08:20.000 --> 08:23.000
so there would be a way then to have an existing

08:23.000 --> 08:25.000
encrypted peer to peer,

08:25.000 --> 08:28.000
or at least an existing way for two people

08:28.000 --> 08:31.000
or any people to talk to each other.

08:31.000 --> 08:34.000
Yeah, there's peer to panda,

08:34.000 --> 08:37.000
which is quite interesting,

08:37.000 --> 08:42.000
that they are building blocks for peer-to-peer apps.

08:42.000 --> 08:44.000
They're also having some project there,

08:44.000 --> 08:47.000
with the norm, possibly getting libraries,

08:47.000 --> 08:51.000
and to the norm stack, so that might be interesting things there,

08:51.000 --> 08:57.000
and interesting projects to piggyback on,

08:57.000 --> 08:58.000
that's not done.

08:58.000 --> 09:01.000
So what we do currently is we just have local sockets,

09:01.000 --> 09:02.000
so that's one machine,

09:02.000 --> 09:07.000
it's obviously a demo, there's no very much practical use of that,

09:07.000 --> 09:09.000
but that needs to be doing.

09:09.000 --> 09:11.000
The other one is some,

09:11.000 --> 09:18.000
the improve the common skewie for that particular use case.

09:18.000 --> 09:24.000
The, I think there's a problem with a slide.

09:24.000 --> 09:29.000
Let's go here.

09:30.000 --> 09:34.000
So the common skewie is not really suitable for this actually,

09:34.000 --> 09:36.000
so it is in Colabron line obviously,

09:36.000 --> 09:40.000
because when you've seen that talk earlier from Planam here,

09:40.000 --> 09:42.000
but for playing desktop liberal office,

09:42.000 --> 09:45.000
it's clearly not been made for this,

09:45.000 --> 09:50.000
actually there's more than one user on the same document.

09:50.000 --> 09:54.000
The other thing is having multi-user curses,

09:54.000 --> 09:58.000
so being able to see where the other person has the attention,

09:58.000 --> 10:01.000
so that's quite useful then if you want to collaborate,

10:01.000 --> 10:03.000
if you can see Jack is over there,

10:03.000 --> 10:06.000
so let's not disturb him and Bob is here with me,

10:06.000 --> 10:09.000
so we can chat about this thing.

10:09.000 --> 10:11.000
Are you really reading what I'm reading, et cetera?

10:11.000 --> 10:14.000
And I've done this overlay with the user names,

10:14.000 --> 10:18.000
pretty much the same experience that you've got from Colabron line.

10:18.000 --> 10:21.000
We push this all into the feature branch,

10:21.000 --> 10:23.000
so this is a kind of consolidated,

10:23.000 --> 10:26.000
all this patches into one, if you're curious,

10:26.000 --> 10:30.000
as I said, it's really quite a prototype,

10:30.000 --> 10:35.000
so let's see demo if I can pull this off.

10:35.000 --> 10:38.000
Important is get this branch, build the branch,

10:38.000 --> 10:40.000
and then you need to set,

10:40.000 --> 10:44.000
edit, comment and read only mode for both instances,

10:44.000 --> 10:47.000
and for one instance you need to set this wire as a set,

10:47.000 --> 10:52.000
which is making the sockets listen here,

10:52.000 --> 10:57.000
so that's this guy, let's see if that comes up.

10:57.000 --> 11:00.000
Yeah, so that comes up, but it's waiting,

11:00.000 --> 11:02.000
it's waiting for the other side of the demo,

11:02.000 --> 11:04.000
which is this one here,

11:06.000 --> 11:10.000
right, and it does seem to work.

11:12.000 --> 11:17.000
So let's start here,

11:17.000 --> 11:20.000
so you watch the right side,

11:20.000 --> 11:22.000
which is the other side,

11:22.000 --> 11:24.000
so first thing is,

11:26.000 --> 11:29.000
I'm typing something, it works.

11:29.000 --> 11:32.000
Okay, so let's try the other side,

11:32.000 --> 11:34.000
let's type something here,

11:34.000 --> 11:36.000
well, that works as well,

11:36.000 --> 11:37.000
oops,

11:41.000 --> 11:43.000
yeah, that works as well.

11:43.000 --> 11:46.000
Okay, let's go one step up, let's,

11:51.000 --> 11:53.000
let's make this bold, let's be bold,

11:53.000 --> 11:55.000
and I'll actually know this is the,

11:55.000 --> 11:58.000
the read only side, which is,

11:58.000 --> 12:01.000
I think there's a bug in the,

12:01.000 --> 12:03.000
there should actually be,

12:03.000 --> 12:05.000
well, let's look here,

12:05.000 --> 12:08.000
so the, the, the text and edit rule,

12:08.000 --> 12:09.000
why it's not not active here,

12:09.000 --> 12:12.000
but it's on this side, so let's let's go here,

12:12.000 --> 12:14.000
and let's make this bold,

12:14.000 --> 12:16.000
and let's make this italic,

12:16.000 --> 12:18.000
and let's make this underlying,

12:18.000 --> 12:21.000
so you see that, that's mirrored to the other side,

12:21.000 --> 12:24.000
let's, let's go over here,

12:24.000 --> 12:27.000
and let's do something like,

12:27.000 --> 12:31.000
delete command, oh yeah, that also works.

12:31.000 --> 12:33.000
Right, so,

12:33.000 --> 12:37.000
so basically, what works is,

12:37.000 --> 12:40.000
text on both sides,

12:40.000 --> 12:43.000
what works is adding and deleting of commands,

12:43.000 --> 12:45.000
what works is basic formatting,

12:45.000 --> 12:47.000
you can't do that much formatting,

12:47.000 --> 12:49.000
it's not like a writer,

12:49.000 --> 12:52.000
three column layout that you can do in the comments,

12:52.000 --> 12:55.000
they can do basic things like change font size,

12:55.000 --> 12:57.000
bold italic, that sort of thing,

12:57.000 --> 12:59.000
alignment of the paragraph, you see this,

12:59.000 --> 13:02.000
kind of, this is some,

13:02.000 --> 13:03.000
flash,

13:03.000 --> 13:04.000
light,

13:04.000 --> 13:07.000
light, so let's, let's make this,

13:07.000 --> 13:08.000
flash,

13:08.000 --> 13:09.000
left,

13:09.000 --> 13:11.000
and it's, it's getting reflected down,

13:11.000 --> 13:14.000
so so the basic, so it's not just text,

13:14.000 --> 13:16.000
but basic formatting and layout,

13:16.000 --> 13:17.000
that works,

13:17.000 --> 13:20.000
and it's getting mirrored by the CIDT,

13:20.000 --> 13:22.000
but with a promise that if,

13:22.000 --> 13:24.000
if one side goes offline,

13:24.000 --> 13:25.000
it would still resolve,

13:25.000 --> 13:27.000
if that comes online again,

13:27.000 --> 13:28.000
and if that's a conflict,

13:28.000 --> 13:30.000
usually that defined way,

13:30.000 --> 13:31.000
to resolve that,

13:31.000 --> 13:33.000
for example,

13:33.000 --> 13:35.000
if somebody deletes a paragraph,

13:35.000 --> 13:38.000
and the other side is typing in the paragraph,

13:38.000 --> 13:40.000
then the deletion would always been,

13:40.000 --> 13:43.000
that's,

13:43.000 --> 13:45.000
that's the way that needs explaining, of course,

13:45.000 --> 13:46.000
you can, but,

13:46.000 --> 13:48.000
but the way then to resolve that,

13:48.000 --> 13:50.000
if this, something unexpected happens,

13:50.000 --> 13:52.000
is that undo,

13:52.000 --> 13:53.000
is always possible,

13:53.000 --> 13:54.000
so you can always go back,

13:54.000 --> 13:55.000
so if the user's,

13:55.000 --> 13:56.000
well, what, there's what's important,

13:56.000 --> 13:57.000
then you just do undo,

13:57.000 --> 13:58.000
and then you have the side,

13:58.000 --> 13:59.000
see's the undo,

13:59.000 --> 14:00.000
and it comes back,

14:00.000 --> 14:01.000
and of course,

14:01.000 --> 14:02.000
if there's the edit wall,

14:02.000 --> 14:04.000
that's not something that technology

14:04.000 --> 14:05.000
can resolve them,

14:05.000 --> 14:08.000
so the people need to kind of talk to each other.

14:08.000 --> 14:09.000
So yeah,

14:09.000 --> 14:10.000
so that's,

14:10.000 --> 14:11.000
that's the first step,

14:12.000 --> 14:13.000
plans,

14:13.000 --> 14:14.000
obviously,

14:14.000 --> 14:15.000
that's the do items,

14:15.000 --> 14:17.000
like getting some,

14:17.000 --> 14:18.000
some discovery,

14:18.000 --> 14:20.000
and some transport going,

14:20.000 --> 14:21.000
and,

14:21.000 --> 14:23.000
I guess that's it,

14:23.000 --> 14:25.000
and I'm out of time.

