WEBVTT

00:00.000 --> 00:09.840
All right, I'm going to start talking so everybody needs to be quiet because I got a lot

00:09.840 --> 00:14.040
of slides and you got to look at the slides because I'm not reading them to you.

00:14.040 --> 00:17.440
You need to look at the slides and listen to me and don't get all sugar crashed because

00:17.440 --> 00:20.560
I know you've probably all been eating waffles like me.

00:20.560 --> 00:21.560
That's me.

00:21.560 --> 00:23.280
This is my talk this year.

00:23.280 --> 00:25.600
I will be, everybody's been talking about email.

00:25.600 --> 00:27.400
I will not be talking about email.

00:27.400 --> 00:28.760
I was asked to talk about something else.

00:28.760 --> 00:33.600
I will be talking about the 1968 Masterpiece Destroy All Monsters by Ishirohanda.

00:33.600 --> 00:37.280
I assume everyone has done the viewing and seen this beforehand.

00:37.280 --> 00:42.120
I'm specifically talking about the J-Map edit of this film.

00:42.120 --> 00:47.200
Much less often seen in Western translations, so I'm going to run you through the basics.

00:47.200 --> 00:50.520
Last time I was here at Fossham 2 years ago I did my talk in the terror of IMAP.

00:50.520 --> 00:53.720
The translation we used then was called J-Map, the absolute minimum.

00:53.760 --> 00:57.240
You hadn't seen this talk, you should probably watch it right now so you have the

00:57.240 --> 00:58.240
context you need.

00:58.240 --> 00:59.240
Oh wait.

00:59.240 --> 01:00.240
No.

01:00.240 --> 01:02.240
Okay, let's keep going.

01:02.240 --> 01:05.840
That's how I talked about this guy who knows who this is.

01:05.840 --> 01:07.640
Very good.

01:07.640 --> 01:18.360
I would also take Godzilla, much harder this guy who here represents SMTP submission.

01:18.360 --> 01:22.240
When you wrote an email and you're sending it for your ISP to send it out, not when ISP

01:22.240 --> 01:23.240
is talking to each other.

01:23.240 --> 01:25.560
That's Rodean, not talking about it today.

01:25.560 --> 01:29.640
There was something that was going to help us out with this problem of IMTP, I'm

01:29.640 --> 01:32.360
App and SMTP and that is J-Map.

01:32.360 --> 01:34.480
J-Map is awesome, it's really good.

01:34.480 --> 01:38.560
Other people were talking about it and they were talking about it because it's so good.

01:38.560 --> 01:42.680
If you have not been following lots of hydrogen movies, I will try and explain, especially

01:42.680 --> 01:48.000
if you want to hear from my talk last time, Godzilla and King Caesar were horrible monsters

01:48.040 --> 01:52.000
that are beneath the earth underlying everything we do and they're useful, they serve

01:52.000 --> 02:01.000
a purpose in nature, but they're like worst, so that's, I'm App and SMTP are these horrible

02:01.000 --> 02:04.200
things underneath everything we do and they're really useful and we're glad we have

02:04.200 --> 02:10.080
them but they are the worst and so, mega Godzilla was sent to Earth from space to defeat

02:10.080 --> 02:11.080
the monsters.

02:11.080 --> 02:15.880
Much like J-Map was sent to Earth from fast mail to defeat all the protocols.

02:15.880 --> 02:17.800
Thank you for attending my talk.

02:17.800 --> 02:19.800
But the thing is, there's not just those two monsters, right?

02:19.800 --> 02:24.360
If you watch these movies, there's like a screening of them, this is a freeze frame from

02:24.360 --> 02:28.760
destroy all monsters and if you haven't watched the movie recently, right, we talked

02:28.760 --> 02:34.200
about IMAP and POP, you can also see active saying dynamic DNS, but today, I'm only

02:34.200 --> 02:38.800
going to be talking about this guy, who knows this guy?

02:38.800 --> 02:44.800
That's Geterra, King Geterra, put respect on his name, but first, IMAP.

02:44.800 --> 02:49.080
So this is a picture of IMAP and what I've done is I've kind of highlighted all the bits

02:49.080 --> 02:50.080
of IMAP.

02:50.080 --> 02:54.440
If you are going to write an IMAP client or server, you need to understand the bits.

02:54.440 --> 02:58.200
There's like response codes, there's things called tags, there's lists, these are lists

02:58.200 --> 03:02.680
of atoms, there's responses, and unsolicited commands, it sucks.

03:02.680 --> 03:05.840
I mean, all protocols you have to learn how to deal with the protocol, but you want to

03:05.840 --> 03:10.000
know as few as possible, because every extra protocol is using up space in your brain

03:10.000 --> 03:12.960
you could be using to remember the names of monsters.

03:12.960 --> 03:17.360
So there's one really important property of IMAP, mostly you know, like I'm up as my

03:17.360 --> 03:20.000
mail, and I read my mail, that's mostly what you need to know.

03:20.000 --> 03:24.800
The really important thing is, this is called quick racing, and the top you see, it says

03:24.800 --> 03:29.760
quick racing, state 123, how do you know which one is the state, well, it's like a list

03:29.760 --> 03:34.320
of five items in the third one is always state, it's terrible, it's IMAP.

03:34.320 --> 03:38.600
So what happens is your client is saying, I've been online before, I've synchronized my

03:38.600 --> 03:42.440
mail, I got to state 123, what's good, what's new?

03:42.440 --> 03:47.280
And the server says, I'm at state 130, if you apply all these changes to your cash, you

03:47.280 --> 03:49.880
will be at 130, and then we will agree.

03:49.880 --> 03:53.920
This is super useful, it's why you can read your mail offline, it's why when you connect your

03:53.920 --> 03:58.440
mail client, it comes online really quickly, but it's really, really good.

03:58.440 --> 04:02.000
So the good stuff is great, but the bad stuff, but all these, let's go back.

04:02.000 --> 04:07.240
All this crap, it's a buzzkill, I don't want to deal with it.

04:07.240 --> 04:10.600
So we've got JNAF now, and JNAF gets rid of all of this.

04:10.600 --> 04:13.720
I'm not going to teach you how to use JNAF today, I only have 25 minutes, I'm already

04:13.720 --> 04:19.480
going real fast, I just want to show you how easy it is and how worthwhile it is to learn.

04:19.480 --> 04:25.480
So this is JNAF, start off, look at that, it's HTTP, that's good, that's like one protocol

04:25.480 --> 04:28.960
to rule them all, you know, that one, you're good, this take everything we have, stick

04:28.960 --> 04:34.120
at an HTTP, they're putting DNS and HTTP now, it's pretty good, okay.

04:34.120 --> 04:38.000
So this is just posting our requests, we say, I want to get some emails, which emails

04:38.000 --> 04:42.640
one, two and three, there's some more stuff in these little ellipses, and my previous talk,

04:42.640 --> 04:46.240
I talked about the AR, but there's no tricks, I promise it's not weird, it's just some

04:46.240 --> 04:49.200
stuff I couldn't fit on one slide and you'd be able to read it in the back.

04:49.200 --> 04:54.120
So you say, get me those emails, what do you get back, you get those emails, all right?

04:54.120 --> 04:57.960
It's just like, yeah, you said get emails, here they are, email one says, hi Brussels, you

04:57.960 --> 05:01.840
know, and then look at who's it from, it's a little bit of JSON, totally easy, no

05:01.840 --> 05:04.680
tricks, just works really good.

05:04.680 --> 05:09.960
Later you can say, hey, are there changes, the last thing I saw was state 616, this

05:09.960 --> 05:11.680
is quick recent again, right?

05:11.680 --> 05:16.960
I want to re-synchronize my offline cache, I had 616, and the server said, yeah, you bet, buddy,

05:16.960 --> 05:23.600
you had 616, if you re-fetched these items, you could be at state 717, and now you synchronize

05:23.600 --> 05:29.000
your offline cache, just as good as I'm up, I might say better.

05:29.000 --> 05:32.240
But doing it in this way, it makes things really, really simple.

05:32.240 --> 05:36.640
There's no remember in which element of which is what, there's no writing a custom protocol

05:36.640 --> 05:39.960
layer, it's just some JSON and HTTP.

05:39.960 --> 05:40.960
Okay.

05:40.960 --> 05:47.520
JMAP is really easy, all you really need is JSON and HTTP to get all your data, great.

05:47.520 --> 05:51.160
Offline sync is not trivial, but it's really easy.

05:51.160 --> 05:55.240
So then you've understand JMAP, at least the basics you need, for this, let's go back

05:55.240 --> 06:01.040
to Monster 0, this guy, this guy, this name, can you get a, you got to remember this,

06:01.040 --> 06:02.040
this guy is important.

06:02.040 --> 06:05.880
Now, the most, what's the most notable thing about this monster?

06:05.880 --> 06:06.880
Three heads, that's right.

06:06.880 --> 06:09.160
And what are the names of his heads?

06:09.160 --> 06:13.280
KARDDAV, CALDAV, and DAVDAV.

06:13.280 --> 06:14.280
Okay.

06:14.280 --> 06:20.680
These are the three things we need to slay to get more legacy protocols out of our lives.

06:20.680 --> 06:24.480
Let's look inside and see what these protocols look like.

06:24.480 --> 06:28.160
So this is us getting my calendars.

06:28.160 --> 06:29.160
It's just HTTP, right?

06:29.240 --> 06:30.160
Oh, that's fine.

06:30.160 --> 06:32.800
It's HTTP, Rick said HTTP would make everything good, right?

06:32.800 --> 06:35.400
What the hell is that?

06:35.400 --> 06:41.000
Like, okay, it's HTTP with the HTTP extensions for distributed application, versioning,

06:41.000 --> 06:43.800
or whatever, it's called, nobody knows how these work.

06:43.800 --> 06:46.560
I work with like the experts on this stuff, they don't know how it works.

06:46.560 --> 06:47.560
It's, it's trash.

06:47.560 --> 06:48.560
But let's find.

06:48.560 --> 06:49.560
Okay.

06:49.560 --> 06:50.560
Let's say it's not trash.

06:50.560 --> 06:54.400
You read the RFC, what better way to spend your time than reading RFCs, you move on

06:54.400 --> 06:55.400
with your life.

06:55.400 --> 06:59.120
I understand all these new verbs, there's prop find, there's report, whatever.

06:59.160 --> 07:01.040
Look, what's in the body, right?

07:01.040 --> 07:03.440
What's going to be in the body of this response?

07:03.440 --> 07:05.240
Oh, okay.

07:05.240 --> 07:09.880
XML, oh, first off, let's look at this, HTTP response code 207.

07:09.880 --> 07:15.880
I don't expect you to know all of them, but you probably don't know 207, multi-status

07:15.880 --> 07:16.880
with XML in it.

07:16.880 --> 07:17.880
What's this going to be?

07:17.880 --> 07:18.880
Let's look.

07:18.880 --> 07:19.880
Okay, here we go.

07:19.880 --> 07:26.040
It says, the multi-status, one response for this URL is a 200, okay.

07:26.040 --> 07:32.600
And this other one is, you're getting a bunch of responses inside a response wrapped in XML.

07:32.600 --> 07:34.360
This is why we need to destroy this monster.

07:34.360 --> 07:35.360
Okay.

07:35.360 --> 07:38.480
And you're like, okay, whatever, man, it's XML.

07:38.480 --> 07:42.960
I grew up coding in 2002, XML is my life's blood.

07:42.960 --> 07:46.720
So let's keep looking at this XML and what else we find in it?

07:46.720 --> 07:48.760
See how it stops like going in and out?

07:48.760 --> 07:51.720
It's because there's a C data in there.

07:51.720 --> 07:56.040
And what's inside the C data is this stuff?

07:56.040 --> 07:57.040
What is this?

07:57.040 --> 07:58.040
Let's zoom in.

07:58.040 --> 07:59.400
Enhanced.

07:59.400 --> 08:01.400
So this is eye calendar.

08:01.400 --> 08:04.480
It's like the little prize inside your box of XML.

08:04.480 --> 08:07.280
And here it looks like a bunch of, you know, like a bunch of hex or something.

08:07.280 --> 08:08.280
But you can break it apart.

08:08.280 --> 08:10.080
Yeah, somebody shouted out key value.

08:10.080 --> 08:12.960
First there's like, there's bracketing beginning and ending.

08:12.960 --> 08:14.560
And then there's these key value things.

08:14.560 --> 08:20.120
So inside my alarm, there's an alarm ID, an event ID, a trigger, and you can even break

08:20.120 --> 08:24.240
that down because I was a part of a key, but it's not really a part of the key.

08:24.240 --> 08:25.600
It's this value date time.

08:25.600 --> 08:27.520
And here's what we call these.

08:27.520 --> 08:28.920
The whole thing's a component.

08:28.920 --> 08:33.080
There's property names, property values, parameter names, and parameter values.

08:33.080 --> 08:36.640
And if you think you'd never get confused between which is a property in which is a parameter

08:36.640 --> 08:37.640
you're wrong.

08:37.640 --> 08:39.480
Anyway, it's one more thing you have to remember.

08:39.480 --> 08:43.320
And by the way, you're probably thinking, but at least there's not a bunch of weird

08:43.320 --> 08:47.040
value encodings of different ways to encode the value based on the parameters that are

08:47.040 --> 08:48.040
attached to your property.

08:48.040 --> 08:51.240
So you're wrong, it's a really fun format.

08:51.240 --> 08:52.240
Okay.

08:52.240 --> 08:58.920
So card dev is eye calendar, this is weird of format, embedded in XML, synchronized

08:58.920 --> 09:03.280
over dev, which is basically HTTP with a crayon up its nose.

09:03.280 --> 09:06.040
And that's calendars and contacts with the same thing.

09:06.040 --> 09:09.680
It's just using V card, which is a very similar format.

09:09.680 --> 09:15.520
And you work with this long enough, and you just want to destroy all monsters.

09:15.520 --> 09:16.520
So there is one more thing.

09:16.520 --> 09:18.880
I said, there's one good thing about, I'm not by one to talk about, there's one good

09:18.880 --> 09:21.240
thing about these dev protocols I want to talk about.

09:21.240 --> 09:22.240
That's this.

09:22.240 --> 09:24.040
This is your sync token.

09:24.040 --> 09:26.360
You get all your calendars, your contacts, you're writing disk.

09:26.360 --> 09:31.440
And that later, you say, I've got the sync token, please give me a report new HTTP method

09:31.440 --> 09:32.440
by the way.

09:32.440 --> 09:37.800
Give me a report, which is a sync report with the sync token that I used to use.

09:37.800 --> 09:40.680
And what happens, you get told just the stuff that you have to update.

09:40.680 --> 09:44.280
Nice, efficient, re-synchronization, that's what we want, don't throw that away.

09:44.280 --> 09:47.960
So you only get back what changed since last time, but of course, it's all wrapped in XML

09:47.960 --> 09:50.200
because that's the world we live in now.

09:50.200 --> 09:54.800
OK, so we go back to these guys, how are we going to fix this problem?

09:54.800 --> 09:57.680
Well, we're going to have JNAP for calendars.

09:57.680 --> 10:01.040
JNAP for contacts, and JNAP for file storage.

10:01.040 --> 10:05.120
These are the three weapons we will use against, can get around.

10:05.120 --> 10:07.120
So we can go back to JNAP.

10:07.120 --> 10:08.120
This was JNAP, right?

10:08.120 --> 10:09.120
We saw this one earlier.

10:09.120 --> 10:10.280
I want to get some email.

10:10.280 --> 10:13.120
And instead of saying, I want to get my email, we're going to say, I want to get my contact

10:13.200 --> 10:14.480
card.

10:14.480 --> 10:16.320
Absolutely the same.

10:16.320 --> 10:18.440
When we got our email, it looked like this.

10:18.440 --> 10:19.840
Here's the list of emails you wanted.

10:19.840 --> 10:21.360
This one has a subject.

10:21.360 --> 10:23.560
You get, here's the contact, Karz, you want it.

10:23.560 --> 10:25.720
This one has a name, it's a email address.

10:25.720 --> 10:26.840
Like, that's it.

10:26.840 --> 10:30.120
There's no weird parser, it's just like life is easy.

10:30.120 --> 10:34.640
You can write a 20 line little program in a cron job for whatever you want, dealing with

10:34.640 --> 10:38.720
this stuff without learning weird libraries because it's so easy.

10:38.720 --> 10:39.720
But changes, right?

10:39.720 --> 10:43.440
You want to synchronize your offline cache exactly the same.

10:43.440 --> 10:45.600
I want to synchronize my offline cache.

10:45.600 --> 10:48.400
They're not running at different ports, which are different paths.

10:48.400 --> 10:52.680
You can send, like, synchronize all my offline cache and you get all the responses back

10:52.680 --> 10:53.880
in one HTTP round trip.

10:53.880 --> 10:55.920
I'm not going to get into it, but it's awesome.

10:55.920 --> 10:56.920
Okay.

10:56.920 --> 11:01.080
So now that you know, JNAP for mail, you already know everything else.

11:01.080 --> 11:03.440
There's no protocol really to learn.

11:03.440 --> 11:05.960
All you really need to focus on learning is the data types.

11:05.960 --> 11:06.960
Those are different.

11:06.960 --> 11:07.960
Different properties.

11:07.960 --> 11:08.960
They have properties.

11:08.960 --> 11:14.280
If somebody told you, here's a calendar event, and the keyword list on it, it's an unseen

11:14.280 --> 11:15.280
calendar event.

11:15.280 --> 11:16.840
I don't know, maybe he's actually all work.

11:16.840 --> 11:17.840
Okay.

11:17.840 --> 11:18.840
I'll keep moving.

11:18.840 --> 11:20.120
There's just new data types.

11:20.120 --> 11:23.800
So in contacts, there's a data type for address books and cards.

11:23.800 --> 11:28.640
In calendars, there's a data type for calendars, events, and participant identities.

11:28.640 --> 11:31.280
Let's not talk about that one.

11:31.280 --> 11:34.040
If you're used to dev, this is the mapping.

11:34.040 --> 11:38.520
Order devs, collections, become address books, Caldav collections, become calendars,

11:38.520 --> 11:41.360
V-cards, become contact cards, V-events, become calendar events.

11:41.360 --> 11:42.360
That's it.

11:42.360 --> 11:43.360
This all maps.

11:43.360 --> 11:47.360
There's been an enormous amount of work to mean that you can use your JNAP stuff, on your

11:47.360 --> 11:51.640
old DAV data, and you can just port over without having to export everything and re-import

11:51.640 --> 11:53.000
it somewhere else.

11:53.000 --> 11:54.560
So let's look at the data types.

11:54.560 --> 11:56.200
Here's a contact card.

11:56.200 --> 12:02.040
It's an ID, and then like a name, addresses, phones, emails.

12:02.040 --> 12:04.760
I said I don't like having things hidden on the slides with these ellipsies.

12:04.760 --> 12:06.760
I want to show you what's really in that data.

12:06.760 --> 12:08.560
So let's look at that.

12:08.560 --> 12:11.640
Here's a name that we might have on our contact card.

12:11.640 --> 12:13.120
A name is an object.

12:13.120 --> 12:14.920
It's called a name object.

12:14.920 --> 12:16.360
It's got a full name sometimes.

12:16.360 --> 12:18.400
Here we've got one, King Gidara, and components.

12:18.400 --> 12:20.400
And what are the components of his name?

12:20.400 --> 12:23.480
He's got a title, and he's got a given name, which is useful to know.

12:23.480 --> 12:27.120
It tells us that it's not, you know, King of the Gidara House of Gidara.

12:27.120 --> 12:28.120
His first name is Gidara.

12:28.120 --> 12:29.120
I don't know his lineage.

12:29.120 --> 12:31.000
I'm sorry.

12:31.000 --> 12:33.240
Those things, by the way, come from Unicode.

12:33.240 --> 12:35.800
They're from Unicode Technical Report 35.

12:35.800 --> 12:39.320
This is interesting, or useful, because it means that if you're going to work with these,

12:39.320 --> 12:42.920
you don't have to figure out how do I take these and combine them in a culturally appropriate

12:42.920 --> 12:44.920
way for the language that I'm working in.

12:44.920 --> 12:46.520
There's libraries to do it.

12:46.520 --> 12:50.040
When you're working with contacts, when you're working with calendar events, you are

12:50.040 --> 12:53.720
dealing with horrible human weirdness to begin with.

12:53.720 --> 12:54.720
Calendars are weird.

12:54.720 --> 12:55.720
You can't fix that.

12:55.720 --> 12:57.680
The French tried it didn't work.

12:58.000 --> 12:59.480
Contacts are weird.

12:59.480 --> 13:00.880
Adresses are weird.

13:00.880 --> 13:02.840
You have to represent that complexity.

13:02.840 --> 13:07.720
And so anything you can do to not implement another way of fixing it is better.

13:07.720 --> 13:08.720
OK, keep going.

13:08.720 --> 13:09.880
We can do this guy, nicknames.

13:09.880 --> 13:11.080
He's got a nickname, how many?

13:11.080 --> 13:11.920
That one nickname.

13:11.920 --> 13:15.000
It's not actually a counter, which is the identifier for his nickname.

13:15.000 --> 13:17.240
And localizations, this one is really nice.

13:17.240 --> 13:22.040
It says, if you're trying to read the full part of his name in the Japanese language,

13:22.040 --> 13:23.720
use this text instead.

13:23.720 --> 13:25.920
You can localize almost everything you need to.

13:25.920 --> 13:28.760
And you start thinking, well, I don't like this slash in a key.

13:28.760 --> 13:29.960
Why is there a path?

13:29.960 --> 13:33.120
It is a little weird, but it's a core concept in J-Map.

13:33.120 --> 13:38.120
Anywhere in J-Map, you might be saying, I want to take this one part of an object

13:38.120 --> 13:39.000
and replace it.

13:39.000 --> 13:40.000
That's how you updates.

13:40.000 --> 13:42.240
They're partial, not complete.

13:42.240 --> 13:45.680
So this is just saying, if you're going to work with this card in Japanese, apply this

13:45.680 --> 13:47.280
update before you start doing stuff.

13:47.280 --> 13:52.280
Really, really elegant, and uses all the stuff you have to do for the basics of J-Map.

13:52.280 --> 13:53.440
Here's his address.

13:53.440 --> 13:54.960
So we've got one address in here.

13:55.000 --> 13:56.960
It's got a work context.

13:56.960 --> 13:57.840
It's got a preference.

13:57.840 --> 14:01.960
This is probably his most favorite address for you to use in contacting him at the office.

14:01.960 --> 14:03.440
And here's the actual address.

14:03.440 --> 14:05.280
Similarly, what kind of thing?

14:05.280 --> 14:07.800
That's a street address called the name of the address.

14:07.800 --> 14:09.880
And a locality, he's based in Tokyo.

14:09.880 --> 14:12.040
Not actually truly can get her as based in outer space, but I

14:12.040 --> 14:13.920
had to make this slide quickly.

14:13.920 --> 14:14.880
So there you go.

14:14.880 --> 14:15.760
That's how an address looks.

14:15.760 --> 14:17.520
Very easy to work with.

14:17.520 --> 14:19.160
Yeah, I did want to talk about this.

14:19.160 --> 14:21.360
So here's his addresses.

14:21.360 --> 14:23.200
And let's say that we want to fix his address.

14:23.200 --> 14:24.200
He's moved.

14:24.200 --> 14:25.200
He's changed jobs.

14:25.200 --> 14:26.200
And what do we want to do?

14:26.200 --> 14:28.200
We want to update one of these.

14:28.200 --> 14:29.200
Remove an address.

14:29.200 --> 14:31.200
And we're going to add a new address.

14:31.200 --> 14:35.480
Now, if we were doing this in Card Dev, what would happen is we'd read the entire Card

14:35.480 --> 14:38.640
Dev document, parse it into memory to some kind of data structure.

14:38.640 --> 14:42.920
Update the structure, change in the addresses, serialize it back into V card, and send

14:42.920 --> 14:43.920
that to the server.

14:43.920 --> 14:48.440
Now, it seems pretty simple, but the problem is everybody has their own weird little

14:48.440 --> 14:52.080
ways of reading the card into memory and writing cards back out into memory.

14:52.080 --> 14:56.800
So either you're loading it to memory and remembering all the literal parts, you did

14:56.800 --> 15:01.040
not need to update and deconstruct so that you could write them back precisely, which

15:01.040 --> 15:03.040
is what you should do.

15:03.040 --> 15:07.000
Or you load the whole data structure, you change the parts you want, you rewrite everything

15:07.000 --> 15:11.280
in your own particular idiom, and you post back to the server, and you just hope.

15:11.280 --> 15:15.800
You did not accidentally change anything that some other client was relying on.

15:15.800 --> 15:17.280
And you will.

15:17.280 --> 15:18.840
You will break this stuff.

15:18.840 --> 15:22.680
If you do this in JMAP, you compute the difference you want to make, and you tell the

15:22.680 --> 15:28.640
server, please apply this patch to the object on the server, and don't touch nothing else.

15:28.640 --> 15:33.520
And if it does touch something else, because you have a side effect, it tells you, I applied

15:33.520 --> 15:37.760
your patch, which also made this thing change, and your catcher means up to date.

15:37.760 --> 15:42.000
And if you need to, you can say, apply this patch, but only if nothing has changed in the

15:42.000 --> 15:44.720
meantime from when I started working.

15:44.720 --> 15:46.720
This stuff is going to save you a huge amount of time.

15:46.720 --> 15:51.000
And when I patch it to the address, you want to add one, change one, remove one, it looks

15:51.000 --> 15:52.800
like this.

15:52.800 --> 15:57.400
Change the preference, and the address known as address one, delete the address known as

15:57.400 --> 16:02.800
address XYZ, and add a new address, which is this whole address that you're adding.

16:02.800 --> 16:03.800
That's it.

16:03.800 --> 16:04.800
Really, really easy.

16:04.800 --> 16:08.040
Nothing weird to learn here, just some data structures to stick together.

16:08.040 --> 16:10.440
I have worked a lot of pain.

16:10.440 --> 16:11.440
Okay.

16:11.440 --> 16:12.440
That was contacts, right?

16:12.440 --> 16:16.320
What were the new things introduced by contacts, contact cards, and address books?

16:16.480 --> 16:22.680
I didn't talk about address books, and address book is like a name, and an ID, and is it

16:22.680 --> 16:23.680
your default?

16:23.680 --> 16:24.680
That's almost about it.

16:24.680 --> 16:28.920
There's nothing to say, contacts are obviously big and complicated, but it's all just

16:28.920 --> 16:34.320
the basic complexity of contacts, nothing about JS contact, the format for contacts and

16:34.320 --> 16:36.720
JMAP, nothing there is weird.

16:36.720 --> 16:40.240
It's just the complexity of the human weirdness.

16:40.240 --> 16:43.400
Calendars are also human weirdness, and we're going to talk about calendar events.

16:43.480 --> 16:46.720
Again, it's basically the whole source of complexity.

16:46.720 --> 16:47.720
Here's an event.

16:47.720 --> 16:53.920
We're going to on yesterday and two years, two days ago, but in two years, destroy Tokyo.

16:53.920 --> 16:55.560
Sounds great.

16:55.560 --> 16:57.520
Some people will be coming.

16:57.520 --> 16:59.480
There are going to be recurrence of this event.

16:59.480 --> 17:05.760
We're going to destroy Tokyo more than once, and some of these recurrences have overrides.

17:05.760 --> 17:09.200
That means not every event is exactly the same.

17:09.200 --> 17:10.440
Some of them have little tweaks.

17:10.480 --> 17:15.320
A common tweak you could imagine is Bob said he's not coming to lunch next week, but

17:15.320 --> 17:18.960
he will be at all the other lunches you have to override next week's plans.

17:18.960 --> 17:20.960
Again, don't like ellipses.

17:20.960 --> 17:22.280
Let's blow these guys up.

17:22.280 --> 17:25.720
Not Tokyo, but also Tokyo, but it's examples.

17:25.720 --> 17:31.640
recurrence rules are very simple, but my example here is quite simple.

17:31.640 --> 17:37.360
What's the recurrence yearly happens every year, July 20th, January 29th, we destroy Tokyo.

17:37.360 --> 17:39.960
Together ones are a little more complicated.

17:39.960 --> 17:41.600
Participants looks like this.

17:41.600 --> 17:43.000
Get that one key.

17:43.000 --> 17:45.640
It's just the participant here known as participant one.

17:45.640 --> 17:46.640
Means nothing.

17:46.640 --> 17:48.800
You just need it to address things.

17:48.800 --> 17:51.640
Just like we did with addresses in the contact.

17:51.640 --> 17:52.920
It's got some roles.

17:52.920 --> 17:54.720
This person will be attending.

17:54.720 --> 17:56.840
The mayor of Tokyo should be attending.

17:56.840 --> 17:58.840
But his status is actually delegated.

17:58.840 --> 18:00.520
He's asked someone else to come.

18:00.520 --> 18:03.480
You could also see Needs RSVP, things like that.

18:03.480 --> 18:04.480
Very, very simple.

18:04.480 --> 18:07.160
Again, boil down to about as simple as you could make that.

18:07.160 --> 18:09.560
Currence overall, it's also very simple.

18:09.560 --> 18:12.280
This is a set of patches against each recurrence.

18:12.280 --> 18:15.120
You say which occurrences being changed and how?

18:15.120 --> 18:17.480
Well, 2029, we're skipping it.

18:17.480 --> 18:21.160
2029, you've just been your first time rebuilding Tokyo.

18:21.160 --> 18:22.880
We're going to wait one more year.

18:22.880 --> 18:28.600
And then way off in 2038, we're going to have a long, long morning, sleep in a little

18:28.600 --> 18:29.600
bit.

18:29.600 --> 18:31.600
And we're going to destroy Tokyo five hours later than usual.

18:31.600 --> 18:33.160
These are recurrence overalls.

18:33.160 --> 18:36.640
Hunger patches, pointing at a particular event, can't get much easier.

18:36.880 --> 18:40.080
recurrence rules themselves are huge pain.

18:40.080 --> 18:41.760
I don't want to get too far into it.

18:41.760 --> 18:44.600
Just imagine this work through really briefly.

18:44.600 --> 18:45.400
You've gotten the event.

18:45.400 --> 18:49.360
It happens on the first Saturday in December every year,

18:49.360 --> 18:52.320
but also the day before that, which might be in December,

18:52.320 --> 18:54.240
but it might be in November.

18:54.240 --> 18:56.280
OK, this actually, that makes sense.

18:56.280 --> 18:57.040
It's easy.

18:57.040 --> 18:59.640
It looks like that.

18:59.640 --> 19:02.480
And in JS calendar, it looks like that.

19:02.480 --> 19:04.000
And you're going to chase on.

19:04.000 --> 19:04.640
I'm saved.

19:04.640 --> 19:05.640
No.

19:05.680 --> 19:07.560
All the complexity is still there.

19:07.560 --> 19:09.200
It's still sucks.

19:09.200 --> 19:11.800
Someone earlier said, when you use JNAP, it's

19:11.800 --> 19:13.800
sticking a bunch of complexity into the server.

19:13.800 --> 19:14.640
And that's true.

19:14.640 --> 19:15.640
And it's good.

19:15.640 --> 19:17.960
It means your client doesn't have to know anything.

19:17.960 --> 19:21.800
So if I don't want to think about this, and I don't,

19:21.800 --> 19:24.120
when I ask for an event, I think,

19:24.120 --> 19:26.880
called a query query is like, you saw, get or changes.

19:26.880 --> 19:27.840
Queries of search.

19:27.840 --> 19:28.840
This is search in my email.

19:28.840 --> 19:31.760
Find all the mail from me that's been flagged.

19:31.760 --> 19:33.520
And you get back a list of emails, right?

19:33.520 --> 19:35.200
Oh, these emails are the ones you want.

19:35.200 --> 19:36.440
And then you can either get them.

19:36.440 --> 19:38.640
If you need to, or read them from your cache.

19:38.640 --> 19:40.440
Same thing for calendar events.

19:40.440 --> 19:42.440
Query in my events between these dates,

19:42.440 --> 19:44.800
anything that says destroy in it, and you're

19:44.800 --> 19:48.040
going to get back that one event, the destroy Tokyo event.

19:48.040 --> 19:49.680
And then you have to take the recurrence rules

19:49.680 --> 19:51.160
and figure out all the ones that actually

19:51.160 --> 19:53.840
occur in here in your life sucks.

19:53.840 --> 19:57.920
But if you say expand recurrences, the server

19:57.920 --> 20:00.280
will compute all the recurrences for you.

20:00.280 --> 20:03.240
And it will tell you, here are magical IDs

20:03.240 --> 20:06.160
that you can fetch and get the pre-patched

20:06.160 --> 20:09.040
all the overrides in it properties of event,

20:09.040 --> 20:11.400
and that you can use to update and override

20:11.400 --> 20:12.600
things onto those events.

20:12.600 --> 20:14.360
And then your client can be stupid.

20:14.360 --> 20:17.360
And since most of the clients I write are like 100 line

20:17.360 --> 20:19.360
crong jobs or maintenance things,

20:19.360 --> 20:22.440
you want to be able to write stupid clients very good.

20:22.440 --> 20:24.040
OK.

20:24.040 --> 20:29.000
So these are the things that I've talked about.

20:29.000 --> 20:33.040
They are RFC 9610, which is where you find contacts.

20:33.040 --> 20:36.600
And JMAP counters 26 is a draft.

20:36.600 --> 20:38.800
It's basically done.

20:38.800 --> 20:40.840
But we've realized some things that we should probably

20:40.840 --> 20:43.280
fix before we really ship it.

20:43.280 --> 20:45.680
But it's real close to done.

20:45.680 --> 20:47.960
The other thing I can talk about is file storage.

20:47.960 --> 20:50.640
File storage is version 0 of a draft.

20:50.640 --> 20:53.360
So this gives you a sense of where it is.

20:53.360 --> 20:57.840
It's at a very early stage of development.

20:57.840 --> 21:01.560
But that's been using file storage for years.

21:01.560 --> 21:05.760
I'm going to guess like eight years or something via JMAP.

21:05.760 --> 21:06.760
Pretty good.

21:06.760 --> 21:07.760
Like it sits there.

21:07.760 --> 21:09.040
It works.

21:09.040 --> 21:10.800
Maybe we've changed some bits of the code that

21:10.800 --> 21:11.360
implemented.

21:11.360 --> 21:14.800
I don't think we've changed the API more than once or twice

21:14.800 --> 21:15.560
in those eight years.

21:15.560 --> 21:17.520
Like it just sits there and works.

21:17.520 --> 21:20.400
So we have some goals about how to make it robust enough

21:20.400 --> 21:22.680
to make it an internet standard.

21:22.680 --> 21:26.240
But basically, you could follow along and watch the mailing

21:26.240 --> 21:27.200
list and see where it goes.

21:27.200 --> 21:28.400
Mostly it's sitting there right now,

21:28.400 --> 21:31.400
while we're traveling around at conferences.

21:31.400 --> 21:33.040
Here's what it looks like.

21:33.040 --> 21:34.960
You get a file node object.

21:34.960 --> 21:38.760
In a file node, it just represents a directory entity,

21:38.760 --> 21:40.920
if you want to think about it in Unix terms.

21:40.920 --> 21:42.200
It's got an ID.

21:42.200 --> 21:45.280
It might have a parent ID because it's in a directory

21:45.280 --> 21:47.320
or it has a parent directory.

21:47.320 --> 21:49.000
It's got a blob ID.

21:49.000 --> 21:51.640
A blob ID is a whole bunch of bytes.

21:51.640 --> 21:54.960
If you think about an email, here in JMAP land,

21:54.960 --> 21:59.440
we try not to think about the RFC 5322 encoding

21:59.440 --> 22:01.080
of the email into a sequence of bytes

22:01.080 --> 22:03.320
that get center on the internet because they suck.

22:03.320 --> 22:05.360
We just think about these JSON objects

22:05.360 --> 22:07.680
that have like subject and from and parts

22:07.680 --> 22:08.960
because then your life is good.

22:08.960 --> 22:11.360
But under the hood, there is a pile of bytes

22:11.360 --> 22:12.640
that is this email document.

22:12.640 --> 22:13.960
That's the blob.

22:13.960 --> 22:17.120
Everything has a blob, including file nodes,

22:17.120 --> 22:19.040
which are mostly blob.

22:19.040 --> 22:20.040
It's got a blob ID.

22:20.040 --> 22:21.800
It's got a name, it's our file name.

22:21.800 --> 22:23.000
And some other properties like,

22:23.000 --> 22:24.680
is this an executable file?

22:24.680 --> 22:26.720
You can't ask JMAP to run this for you,

22:26.720 --> 22:28.680
but you can't ask it whether it could be run

22:28.680 --> 22:31.080
where it on your file system.

22:31.080 --> 22:34.440
If you want to put one of these onto your server,

22:34.440 --> 22:37.240
you do a JMAP upload, which is basically

22:37.240 --> 22:40.840
post to a URL that your told is where you send uploads.

22:40.840 --> 22:42.080
And then you make one of these.

22:42.080 --> 22:45.760
You say file node, set, create this blob,

22:45.760 --> 22:48.120
this name, this parent, there you go.

22:48.120 --> 22:50.360
You got a file.

22:50.360 --> 22:52.400
OK, right, winding up.

22:52.400 --> 22:55.240
This talk has mostly been really basic high level

22:55.240 --> 22:56.040
overview of this stuff.

22:56.040 --> 22:57.440
Like I said at the beginning,

22:57.440 --> 22:59.400
there's no way I was going to really teach you

22:59.400 --> 23:02.800
to use JMAP in 25 minutes.

23:02.800 --> 23:06.720
But I wanted to show you all the stuff that you can do with it.

23:06.720 --> 23:07.760
Why it's good?

23:07.760 --> 23:09.880
And we can just start with, because it's so,

23:09.880 --> 23:15.080
so much simpler than Card Dev, Cal Dev, and the Dev Dev.

23:15.080 --> 23:16.880
Because it gets sort of the weird HTTP,

23:16.880 --> 23:19.120
it gets sort of the XML, it gets sort of the V card,

23:19.120 --> 23:21.080
and I calendar formats.

23:21.080 --> 23:23.200
And it brings you back to working with stuff

23:23.200 --> 23:24.640
that you already know how to use.

23:24.640 --> 23:27.720
And by the way, all the APIs that you're

23:27.720 --> 23:29.440
probably using in your day-to-day life

23:29.440 --> 23:31.880
for like talking to this automated scale

23:31.880 --> 23:33.480
that pulls your weight down every morning,

23:33.480 --> 23:35.680
those are HTTP and JSON.

23:35.680 --> 23:37.400
That's the kind of simplicity you should have

23:37.400 --> 23:40.000
when dealing with the most important data in your life.

23:40.000 --> 23:43.920
You're to do list, your calendars, your contacts, your email.

23:43.920 --> 23:45.640
That's where the easiness should be.

23:45.640 --> 23:47.080
And that's where JMAP is putting it.

23:47.080 --> 23:48.880
Anyway, we talked about how it's so simple.

23:48.880 --> 23:50.280
It does work at scale.

23:50.280 --> 23:52.040
It's not just a little toy protocol.

23:52.040 --> 23:54.600
It is a very good protocol for doing all the big scale

23:54.600 --> 23:55.560
stuff you want.

23:55.560 --> 23:59.400
Fastmail runs almost entirely on JMAP internally.

23:59.400 --> 24:00.400
These are the documents.

24:00.400 --> 24:03.160
I'm not going to stop here, just here they are.

24:03.160 --> 24:04.760
You can find them in the slides later.

24:04.760 --> 24:06.600
You should expect to see some changes coming

24:06.600 --> 24:07.760
to JMAP for contacts.

24:07.760 --> 24:09.960
We've made some realizations after shipping it.

24:09.960 --> 24:12.040
A little stuff.

24:12.040 --> 24:13.560
These are the calendars ones.

24:13.560 --> 24:15.000
They will get standardized.

24:15.000 --> 24:16.840
Again, some little changes are coming.

24:16.840 --> 24:18.640
This is the file storage one.

24:18.640 --> 24:20.040
I'm sure there will be changes coming,

24:20.040 --> 24:21.960
and I have no idea what they're going to be.

24:21.960 --> 24:28.080
So everybody wants to use JMAP now.

24:28.080 --> 24:29.080
How do you use it?

24:29.080 --> 24:32.800
Well, you've heard about a bunch of different JMAP servers today.

24:32.800 --> 24:33.960
You can ask me about them later.

24:33.960 --> 24:35.960
You can ask other people who have talked about JMAP.

24:35.960 --> 24:38.160
Unsurprisingly, I'm going to say the easiest way

24:38.160 --> 24:41.960
is to be a fastmail customer, and go to our dev page

24:41.960 --> 24:44.240
and say I want to API token.

24:44.240 --> 24:45.240
It's there.

24:45.240 --> 24:46.240
It's good.

24:46.240 --> 24:48.880
We're going to be having contacts up for everybody to use

24:48.880 --> 24:50.120
in the next week or two.

24:50.120 --> 24:52.440
We're already on our beta platform.

24:52.440 --> 24:54.160
That's it.

24:54.160 --> 24:54.880
Any questions?

24:54.880 --> 24:57.880
APPLAUSE

24:57.880 --> 24:58.880
APPLAUSE

24:58.880 --> 25:03.280
So thank you, Rick.

25:03.280 --> 25:05.640
I think we have a strong contender for the candidate

25:05.640 --> 25:08.000
talk for a fighting most monsters at first time.

25:08.000 --> 25:12.360
But this is everybody winning and breaking up

25:12.360 --> 25:14.480
to challenge with our old professionals.

25:14.480 --> 25:18.880
I've defeated them all.

25:18.880 --> 25:20.120
Yeah.

25:20.120 --> 25:26.720
Is there any real world map clients that are trying to implement JMAP?

25:26.720 --> 25:29.280
Ben is raising his hand, Parulo, which was talked about earlier

25:29.280 --> 25:30.880
implement this.

25:30.880 --> 25:33.760
You can run fastmail on your desktop and an electron app,

25:33.760 --> 25:35.640
which runs very nicely on Mac OS.

25:35.640 --> 25:38.320
There's also one called Swiftmail, which I think

25:38.320 --> 25:39.920
might be out of development.

25:39.920 --> 25:43.840
There's a Swift, a JMAP client called MailTemi,

25:43.840 --> 25:45.360
which runs on iOS.

25:45.360 --> 25:46.360
There is.

25:46.360 --> 25:47.360
Yep.

25:47.360 --> 25:49.080
I saw you earlier and it left my head.

25:49.080 --> 25:50.680
You've got to go.

25:50.680 --> 25:53.320
I don't think that you can run on desktop yet.

25:53.320 --> 25:54.720
Yeah.

25:54.720 --> 25:56.000
So there are some coming.

25:56.000 --> 25:56.200
Yeah.

25:56.200 --> 25:57.400
It's good to see with our clients.

25:57.400 --> 25:57.600
Yeah.

25:57.600 --> 25:58.920
Thank you.

25:58.920 --> 25:59.760
Yes.

25:59.760 --> 26:02.560
What's the recommended JSON parser for this?

26:02.560 --> 26:05.760
What's the recommended JSON parser for this?

26:05.760 --> 26:07.760
I don't care.

26:07.760 --> 26:10.760
I feel like if your protocol has a recommended

26:10.760 --> 26:13.600
JSON parser, you have made a mistake.

26:13.640 --> 26:17.080
I'm sorry.

26:17.080 --> 26:18.240
What about CB?

26:18.240 --> 26:22.560
CB, well, if you want to find out what is the most reliable

26:22.560 --> 26:24.520
JSON parser for the language you're working in,

26:24.520 --> 26:26.280
I am not the person to ask.

26:26.280 --> 26:29.200
I am not an expert in particular libraries across these things.

26:29.200 --> 26:31.200
I can tell you that we use Json internally

26:31.200 --> 26:32.720
in our C implementation.

26:32.720 --> 26:35.040
Our Perl implementation uses JSON excess.

26:35.040 --> 26:35.560
And that's right.

26:35.560 --> 26:37.400
We use a lot of Perl.

26:37.400 --> 26:39.280
I'm sure there are some other JSON implementations

26:39.280 --> 26:40.240
in our ecosystem.

26:40.240 --> 26:41.760
But that's, I'm just not the expert for that.

26:44.520 --> 26:50.080
How does it become a way to encryption of data inside the JSON?

26:50.080 --> 26:54.200
Because if you can kill us, determination, and so on.

26:54.200 --> 26:56.840
So the question is, how does this work

26:56.840 --> 26:59.360
if you want to encrypt your mail, especially end-to-end?

26:59.360 --> 27:01.440
Is that all like specific headers?

27:01.440 --> 27:02.440
Yeah.

27:02.440 --> 27:09.240
So I would say the brief answer is, if you want fully

27:09.240 --> 27:12.000
or heavily encrypted communication, email

27:12.000 --> 27:13.840
is the wrong place to start.

27:13.840 --> 27:17.280
So you can encrypt your email.

27:17.280 --> 27:21.120
There are extensions for JMAP for dealing with encrypted email.

27:21.120 --> 27:24.760
They are largely for server-terminated encryption.

27:24.760 --> 27:29.520
If you want to have the email be fully end-to-end encrypted,

27:29.520 --> 27:33.120
the server can't process things like, give me the from,

27:33.120 --> 27:34.760
give me the subject.

27:34.760 --> 27:39.200
There are things for server protection,

27:39.200 --> 27:41.160
which means this particular header has been encrypted.

27:41.160 --> 27:42.800
So the extensions can handle that.

27:42.800 --> 27:44.720
I will tell you the vague advice.

27:44.720 --> 27:47.680
I would give someone implementing more end-to-end encryption

27:47.680 --> 27:49.520
would be synchronized the blobs,

27:49.520 --> 27:51.440
using entirely blobs synchronization,

27:51.440 --> 27:54.400
and run a JMAP proxy layer inside your browser,

27:54.400 --> 27:57.360
which, by the way, is how fast-mails offline client works.

27:57.360 --> 28:01.200
It runs a JMAP client and server in the browser,

28:01.200 --> 28:03.240
talking to itself for the sake of synchronization

28:03.240 --> 28:04.040
and offline work.

28:04.040 --> 28:05.440
I think I'm totally out of time.

28:05.440 --> 28:07.000
So we have to keep on procrastinating.

28:07.000 --> 28:08.160
Yeah, anybody else?

28:08.160 --> 28:10.520
Yeah.

28:10.520 --> 28:15.560
When will we release JMAP push?

28:15.560 --> 28:20.480
This is a man who knows the question to make me flee.

28:20.480 --> 28:23.560
So JMAP, not mentioned in this talk.

28:23.560 --> 28:28.000
JMAP has two mechanisms for doing server-side real-time streaming.

28:28.000 --> 28:29.680
One is you can get an event source,

28:29.680 --> 28:31.480
which is a long running HTTP connection

28:31.480 --> 28:34.200
that just keeps telling you, you could re-synchronize this type,

28:34.200 --> 28:35.600
you could re-synchronize this type,

28:35.600 --> 28:37.240
and it stays open, works really well,

28:37.240 --> 28:38.280
and you can reconnect.

28:38.280 --> 28:40.880
This is great if you're running app in the browser.

28:40.880 --> 28:43.600
The other is RFC 8030-style web push,

28:43.600 --> 28:45.440
where you tell the server, here is a mailbox

28:45.440 --> 28:46.720
to what you can post updates.

28:46.720 --> 28:48.240
That's what should go on to the know about.

28:48.240 --> 28:51.400
Fastmail doesn't implement that yet.

28:51.400 --> 28:52.320
I don't know the answer.

28:52.320 --> 28:53.240
We haven't working.

28:53.240 --> 28:54.840
There's just a lot of little bit of edge cases.

28:54.840 --> 28:58.440
So I would love to ship that as soon as possible,

28:58.440 --> 29:01.160
but I hope it will be this calendar year,

29:01.160 --> 29:04.880
and I don't think it's going to be before the middle of the year.

29:04.880 --> 29:07.080
This is what everybody has.

29:07.080 --> 29:09.080
I know, everybody wants it.

29:09.080 --> 29:09.880
All right.

29:09.880 --> 29:10.880
Thank you.

