The Path to Peer-to-Peer Matrix
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
Title of Series | ||
Number of Parts | 490 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/47310 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 2020395 / 490
4
7
9
10
14
15
16
25
26
29
31
33
34
35
37
40
41
42
43
45
46
47
50
51
52
53
54
58
60
64
65
66
67
70
71
72
74
75
76
77
78
82
83
84
86
89
90
93
94
95
96
98
100
101
105
106
109
110
116
118
123
124
130
135
137
141
142
144
146
151
154
157
159
164
166
167
169
172
174
178
182
184
185
186
187
189
190
191
192
193
194
195
200
202
203
204
205
206
207
208
211
212
214
218
222
225
228
230
232
233
235
236
240
242
244
249
250
251
253
254
258
261
262
266
267
268
271
273
274
275
278
280
281
282
283
284
285
286
288
289
290
291
293
295
296
297
298
301
302
303
305
306
307
310
311
315
317
318
319
328
333
350
353
354
356
359
360
361
370
372
373
374
375
379
380
381
383
385
386
387
388
391
393
394
395
397
398
399
401
409
410
411
414
420
421
422
423
424
425
427
429
430
434
438
439
444
449
450
454
457
458
459
460
461
464
465
466
468
469
470
471
472
480
484
486
487
489
490
00:00
Matrix (mathematics)Direct numerical simulationPeer-to-peerSharewareMatrix (mathematics)Projective planeSharewareSlide ruleOpen setPeer-to-peerComputer animation
01:20
Matrix (mathematics)TelecommunicationComputer networkComputing platformInternet der DingePoint (geometry)Information and communications technologyPlane (geometry)Web 2.0TelecommunicationInternettelefonieMatrix (mathematics)Computer animation
01:45
Matrix (mathematics)Bridging (networking)StrömungsdrosselPoint (geometry)Cartesian coordinate systemDifferential (mechanical device)Server (computing)Data conversionComputer animation
02:10
Matrix (mathematics)Computer architectureClient (computing)Local GroupEncryptionRule of inferenceServer (computing)Content (media)Repository (publishing)Address spaceIdentity managementNumberEmailGroup actionServer (computing)Data conversionQuicksortComputer animation
02:40
Matrix (mathematics)Beta functionMatrix (mathematics)Server (computing)Android (robot)Mobile appMultiplication signClient (computing)Computer animation
03:13
Matrix (mathematics)Game theoryServer (computing)Matrix (mathematics)Term (mathematics)Computer animationDiagram
03:42
Matrix (mathematics)Message passingServer (computing)Matrix (mathematics)1 (number)Message passingCountingServer (computing)Total S.A.Structural loadSoftwareBuildingProjective planeComputer animation
04:55
Matrix (mathematics)Server (computing)InternetworkingMilitary operationClient (computing)Software developerForceRoutingIdentity managementHuman migrationPeer-to-peerRight angleOperator (mathematics)Multiplication signBand matrixServer (computing)Message passingRobotBridging (networking)Service (economics)Matrix (mathematics)Perspective (visual)TelecommunicationBitCommunications protocolSoftware developerModul <Datentyp>MultihomingGame controllerClient (computing)Mobile appMoment (mathematics)MetadataPoint cloudTerm (mathematics)Single-precision floating-point formatLine (geometry)CodeGeneric programmingGoodness of fitPoint (geometry)Computer animation
08:01
EncryptionSlide ruleMetadataPoint (geometry)Bridging (networking)CryptographyMatrix (mathematics)MereologyComputer animation
08:33
Matrix (mathematics)Chemical equationServer (computing)Group actionBridging (networking)MetadataLeakServer (computing)Multiplication signMessage passingMobile appComputer animation
09:03
Information privacyLocal GroupMessage passingEncryptionClient (computing)Service (economics)RoutingMessage passingPattern languageOrder (biology)Service (economics)Client (computing)Computer animation
09:25
Computer networkArchitectureMatrix (mathematics)Information privacySurjective functionClient (computing)Service (economics)Message passingStrategy gameMatrix (mathematics)Server (computing)Service (economics)Data storage deviceClient (computing)Computer animation
09:51
Matrix (mathematics)DiagramModule (mathematics)Client (computing)Matrix (mathematics)Server (computing)DemonProcess (computing)Peer-to-peerExtension (kinesiology)EncryptionPhysical systemComputer animation
11:00
Matrix (mathematics)Proxy serverOverlay-NetzComputer networkData managementPhysical systemDirect numerical simulationEncryptionSpacetimeRoutingHyperbolischer RaumGraph (mathematics)Overlay-NetzSet (mathematics)Peer-to-peerMatrix (mathematics)Computer architectureNetwork topologyRoutingMultiplication signBand matrixProxy serverEncryptionComputer animation
12:11
Video gameSpanning treeMatrix (mathematics)Video gameNetwork topologyServer (computing)Client (computing)Keyboard shortcutRootDifferent (Kate Ryan album)Computer animation
12:45
Matrix (mathematics)Sanitary sewerInstallable File SystemComputer networkStack (abstract data type)Modul <Datentyp>Different (Kate Ryan album)Public-key cryptographyProjective planePeer-to-peerSpacetimeServer (computing)Software developerModule (mathematics)Software maintenanceImplementationMechanism designMessage passingFormal languageConnected spaceElectric generatorSubsetQuicksortBitSoftwareComputer animation
14:55
Instance (computer science)QR codeRight angleSoftwareInstallation art
15:47
SharewareGastropod shellElectronic visual displayView (database)WindowEmailMatrix (mathematics)Bulletin board systemAddress spaceDatabase transactionLogicPhysical systemDatabaseServer (computing)Process (computing)LogarithmNetwork socketAsynchronous Transfer ModeError messageDialectSoftwareDifferent (Kate Ryan album)Public-key cryptographyNormal (geometry)Source codeComputer animation
16:27
Server (computing)Asynchronous Transfer ModeError messageDialectView (database)Gastropod shellWindowExecution unitOnline helpSyntaxbaumInformation managementSign (mathematics)Pointer (computer programming)Computer iconLocal ringComputer animationSource code
16:53
View (database)PredictabilityRight angleSoftwareComputer animation
17:17
Moving averageOnline helpView (database)Public-key cryptographyDirectory serviceProgram flowchart
17:39
Plane (geometry)Client (computing)SynchronizationGastropod shellView (database)Error messageDialectDirectory serviceServer (computing)GodSoftwareSharewareSource codeComputer animation
17:59
HTTP cookieNormed vector spaceOnline helpSynchronizationGastropod shellError messageSoftware testingServer (computing)Exception handlingComputer animationSource code
18:22
Error messageIntelDreizehnGraphical user interface9K33 OsaDirectory serviceServer (computing)Online helpWindowMessage passingSource codeComputer animation
18:42
Local ringSign (mathematics)HoaxGastropod shellDependent and independent variablesDigital filterAddress spaceAsynchronous Transfer ModeSharewareClient (computing)SynchronizationPressureComputer animationSource code
19:00
Client (computing)SynchronizationGastropod shellComputer animationSource code
19:19
Online helpView (database)Flock (web browser)Normed vector spaceInclusion mapMIDIPlane (geometry)Gastropod shellDirectory serviceMultiplication signRow (database)Computer animationSource code
19:42
Gastropod shellMatrix (mathematics)Execution unitMaxima and minimaIRIS-TSharewareServer (computing)Web browserSource codeComputer animation
20:04
Matrix (mathematics)Web browserCompilerImplementationDevice driverService (economics)Web browserDevice driverMobile appComputer animation
20:23
Matrix (mathematics)Service (economics)Web browserExecution unitServer (computing)WindowNormed vector spaceDevice driverBitSharewareComputer animation
20:44
SynchronizationStreaming mediaGastropod shellOnline helpClient (computing)Error messageDaylight saving timeAreaVector spaceMatrix (mathematics)Context awarenessRoundingPrice indexModul <Datentyp>BuildingModulo (jargon)Module (mathematics)Web 2.0Vector spaceComputer architectureSource codeComputer animation
21:05
Structural equation modelingService (economics)Web browserFormal grammarComputer fileFree variables and bound variablesBitSharewareEntire functionComputer animation
21:32
Gastropod shellMatrix (mathematics)Modul <Datentyp>Vector spaceComputer iconFunktorPrice indexWindowView (database)EmailOnline helpAddress spaceAsynchronous Transfer ModeError messageDialectMobile WebModulo (jargon)Normed vector spaceGodSharewareSource codeComputer animation
21:54
WindowView (database)Execution unitService (economics)Different (Kate Ryan album)IP addressMultiplication signSource code
22:14
Execution unitConvex hullTelephone number mappingWindowMenu (computing)Normal (geometry)Online helpGodSharewareBitSource codeComputer animation
22:33
View (database)Normed vector spaceWindowPrice indexVector spaceComputer iconBuildingModul <Datentyp>Function (mathematics)Content (media)Menu (computing)Execution unitSharewareService (economics)Network socketImage registrationTable (information)Web 2.0Source codeComputer animation
23:11
SineWindowTelephone number mappingFluidTable (information)DatabaseOrder (biology)Computer clusterRight angleSource codeComputer animation
23:33
Service (economics)Web browserInclusion mapMatrix (mathematics)EncryptionDefault (computer science)Computer fileFerry CorstenEncryptionMultiplication signDocument management systemComputer animation
24:18
Point cloudOpen source
Transcript: English(auto-generated)
00:08
Okay. Am I allowed to start? Okay. Hi, everybody. I'm Matthew. I'm the tech lead for the matrix and projects. I'm here to talk to you about the path, both the past and future of peer-to-peer
00:21
matrix. I guess that most people know what matrix is by now. Anybody not know what matrix is? Three people. That is absolutely hilarious and magnifying. Very, very quickly, I'll try to rattle through basically the normal slides that we have to try to explain what matrix is. If you haven't seen this QR code, scan it now if you want to try
00:43
to do a live demo that will go catastrophically wrong. Question? Well, that's good stuff. Well, what about that URL? matrix.org tailed Matthew p2p-demo.html. Does that work? Oh, yeah. Remove
01:07
the demo. Yeah, I remember now. I was trying to make it shorter and then forgot to update the thing. Okay. Well, remove the dash demo, everybody, and go and try grabbing some Docker stuff slowly over the next 10 minutes. So, whilst we do that, matrix, open network, real-time,
01:23
communication, decentralized. Use it for chat, VoIP, VR, AR, IoT. The whole point is to be the missing communication layer of the web. Sucks that the web never got real-time communication. You have amazing things like WebRTC for doing all of your VoIP and media, but there's no signaling plane. There's no way to actually set up those communications in a decentralized
01:43
manner. Matrix tries to be it. You can have a bunch of existing solos. Matrix sits in the middle, gluing them together using the bridges. If people saw half-shots bridging talk earlier in the real-time comms room, you can see it's a real thing. And the big differentiator is that there's just no single point where your conversations gather.
02:04
It's replicated over all of the servers. There is never a choke point unless everybody's on the same server, but we'll ignore that. Architecturally, you have your servers, application servers, clients, and we still have these wretched identity servers, which are the bane of our life, which go and map email addresses and phone numbers through to matrix IDs,
02:22
which we're going to somehow find a way to decentralize in the near future, I hope. And then the spec gives you conversation history, group messaging, E2E encryption, VoIP, all sorts of server-side fun and stuff, decentralized content, repository, unread counts, account data, et cetera. The ecosystem is the spec, the clients, the servers.
02:45
Third-party clients contributed from the wider community, third-party bridges, bots, integrations, and other server implementations, and it's growing all the time. Riot X is coming very soon on Android out of beta as a complete rewrite of the Android app. If you aren't using Riot X already, please start playing with it.
03:05
We'll basically be announcing the path to 1.0 in the big K auditorium talk at 4 p.m. today, and that's probably what you want to know about matrix. In terms of uptake, this is the daily active users that we're seeing on the matrix.org server over the last couple of years. You can see it started off in 2016,
03:26
pretty miserable, grew relatively well. We had a bunch of problems in the summer of 2018, but since then, it's been hockey-sticking its way up in a way which is quite scary in terms of handling the scalability, fun and games on Synapse that results in that.
03:42
Community-wise, if you literally look for distinct MX IDs, you get 13.5 million. On the matrix.org, in fact, across the network that phones home, we see about 5 million messages a day. If you select count star of rooms on the matrix.org server, it's about 4.5 million chat rooms.
04:01
We can see about 20,000 servers phoning home, so we roughly double that. There's a bunch, don't phone home, which gives us 40,000 total. On the matrix.org home server, it's about 35 in a second, about 3,500 a second messages out. Loads of projects building on matrix, lots of companies, including some really big scary ones building on matrix,
04:22
lovely ones who we appreciate building on top of matrix, and also some even bigger lovely governments building on top of matrix, too. I'm sure you know that France deployed matrix across the entire public sector over the course of the last year and a half. Also, Germany has announced at Christmas that the Bundeswehr,
04:42
the Ministry of Defense, has a matrix trial running. Also, there are .gov servers in the US running on matrix, and the fourth one is possibly, hopefully, the UK. So, that's enough boring stuff about generic matrix. Can everyone hear me, by the way?
05:01
Good. I thought I should chat. Peer-to-peer matrix. Why? Matrix is great, but obviously today we have home servers. And if you want to have full autonomy of your conversations, you have to run your own server, which is great for us a lot, because probably at least two-thirds of the room are professional citizens. We're all feeling a bit smug and elitist and thinking,
05:22
wow, this is amazing, I can run my own server. For everybody else, they're screwed. They have to go and trust somebody else to run the server for them. The whole point was to give autonomy for people to give back control of communication to the users, and yet the users are a bit lost. So, that's one massive reason to look at P2P.
05:40
Separately, we also get some better onboarding, frankly, from a selfish, riot-style app developer perspective. It's a pain in the ass to have to tell people, hey, which server do you want to connect to? Do you want to use matrix.org or something from modular.io or use something else? And instead, how about you just start off peer-to-peer and just join the big global peer-to-peer network?
06:01
Really cool would also be internetless operation. Now, if you're going hiking, if you're in a plane, if you're hypothetically in the Eurostar coming over from London, wouldn't it be nice to be able to communicate locally? Also, a big deal is metadata, because at the moment metadata pools on your home server. You can see every message in terms of who sent it
06:22
and when they sent it, where they sent it from. And as I'm sure we all know, metadata is in many ways more useful from an intelligence perspective than the actual data itself. Also, it lets us run client-side bridges a bit more easily. That would be really nice for protocols not thinking of,
06:41
I don't know, WhatsApp by name, which don't like you bridging in from a kind of bridge service provider. You can run it yourself as a user. If you want to give your WhatsApp credentials to a third-party client like a matrix bridge, no, it's kind of your problem. And then finally, honestly, it raises the bar for development. So it forces us to do multi-homed accounts,
07:02
because if I'm going peer-to-peer and I've got my account running on my phone and on my laptop, I obviously want my same identity to be on two devices. But if each device is a home server, that also gives us the ability to port accounts between home servers and account migration. It also forces the home servers to get smaller.
07:21
It also forces us to do smarter routing algorithms, because if everybody here was running their own home server on their phone right now, the idea of having to do 296 concurrent HTTP hits every time you send a message is going to be nuts. Also forces us to do low bandwidth transport, because you don't want to be chattering away on HTTP all the time, because that's just going to chew your battery and bandwidth.
07:44
The nicest thing, though, and the really, really, really exciting thing about this, is that the clients and the bots and the bridges stay absolutely identical. Not a single line of code needed to be changed, because we're just swapping out a home server that runs somewhere in the cloud and putting it on your phone.
08:01
So, very quick flashback to 2015. You can tell we're in 2015, because we've gone 4 to 3 aspect ratio. And I gave a talk at a conference called Janda Entrepic in Rennes, where we announced our end-to-end encryption for the very first time. It was pre-mega-OM, it was OM, and it was a really cool cryptography conference. And as part of announcing OM,
08:21
I wrote a bunch of slides to try to avoid getting crucified for the fact that we weren't protecting metadata at that point. And it went like this. Matrix is all about creating bridges. You can't bridge without having metadata leaks, because the bridge is an unavoidable metadata leak. However, we also expose metadata on home servers. You have the same DAG that builds up
08:41
on all the different servers for the same room. Can we do better? And we looked at Pond. Who knows Pond? Interestingly few people, about 10 people. Pond was a really cool, really early metadata-resistant messaging app written by Adam Langley, I think, from Google. He was the guy who, I think, ran the TLS team at Google at the time.
09:01
And basically, it works like this. You had Tor, you had hidden services in Tor, and you had a messaging client that would route messages by storing forward hidden services, as well as doing traffic pattern resistance, so you couldn't see who was talking to who when. The disadvantage is that it took about 15 minutes to send a message, because it was deliberately delaying things
09:21
in order to avoid the traffic patterns being visible. But we did the same Ford experiment, so back in 2015, saying, well, Matrix is meant to evolve to support this, and I'm sure it will happen real soon now. Could we do something similar? Yeah, put home servers on the client, use hidden services of some kind to store and forward, and incrementally migrate or bridge from classic DAG.
09:43
So it would look like that. You'd have a home server running on your little gray client, and the client is still sitting there connecting to it, and then it's bouncing off Tor. So back to the present day, almost. 2018, came up with this diagram was noodling about where Matrix could go in future.
10:02
Today, you end up with server-server, client, end-to-end encryption sitting in the client. What if in the future, you had a kind of Matrix daemon that ran on your kind of operating system as a Unix daemon that would offload your own, and then you don't have to keep implementing E2E everywhere?
10:21
Then what would happen if you actually put that guy as a reusable module into your client cross-platform? And perhaps that guy could evolve into a full peer-to-peer home server if you went and put a home server in it, and you could even offload the E2E into it. And hang on a second, why not actually embed that in the client too, to the extent that you end up with a client with a home server in it?
10:41
And the fun thing is that we've actually built this now. It's called Pantalimon. Talk about it later on today. We're also just in the process of looking at rewriting Pantalimon from Python into Rust and using it as an embeddable engine that can go into arbitrary clients. But meanwhile, what's happening over here? Back to the actual present day.
11:02
We've got three experiments where we've been playing in P2P. The first one isn't actually Wii. It's done by Timothy. Are you out here anywhere? There he is. Who reached out probably, what, nine months ago or something, or a year ago to say, hey, I'm doing a bachelor's project. Can I do something with peer-to-peer matrix? At which point, I think I basically gave this talk to him very quickly
11:21
and said, hey, go wild. And he looked at putting matrix over CoAP, his low bandwidth protocol, using Egdradzil as the overall PCP overlay network. Who knows what Egdradzil is? OK, about 20% of the room. It's really cool. Experimental peer-to-peer, end-to-end encrypted overlay network
11:42
basically creates a big spanning tree over a set of manually defined peerings. But once the spanning tree is up and running, you can go and route to people end-to-end encrypted across this thing. So what he did was to go and take Synapse, originally Dendrite, but Dendrite wasn't working at the time. So he took Synapse and did a proxy
12:01
that would take HTTP and do CoAP over Egdradzil. Very similar to the talk that we gave last year of CoAP proxy, and basically has a similar architecture. That's literally a picture of Egdradzil, the spanning tree of life. And it's literally a spanning tree with a root in the middle. And you can do shortcuts once you've discovered nodes in different places,
12:22
but you go and discover them via ADHD, and then you go and navigate the spanning tree to actually have the routing to go and find somebody. So if you're familiar with spanning tree protocol, this is just it for the internet. Architecturally, home server sitting locally. Our client isn't shown, but you have a client talking to a home server,
12:41
goes through a proxy, goes over Egdradzil and out the other side. And I'm really assured, I haven't tried it myself, but I'm hoping this is a real screenshot of actually working of two riots on different ports going over Egdradzil. So that was a very, very cool project. And we started to build a little peer-to-peer
13:01
secret community of different people like Neil Alexander, who is the maintainer, the maintainer, one of the maintainers? Yes. Of Egdradzil and myself, and also Keegan, who wrote Dendrite originally, one of the guys who wrote Dendrite originally, going and sort of playing in the space. So the next experiment we did
13:21
started in, I think, November or December also, where we took Dendrite, which many will know is our next generation Golang home server that has been stuck in development hell of various flavors for about two years. And what if you just swapped out its HTTP transport for its Go and libp2p equivalent? Who knows what libp2p is?
13:40
Surprisingly few people. Okay, libp2p is the networking layer for IPFS, and it's a separate module. It's pretty cool. It gives you a whole bunch of different mechanisms for discovery, different transports, different implementations and different languages. Theoretically, it's very, very nice. In practice, it's still a little rough
14:00
around the edges, but it's enough to play with. And what you can do is to basically say, hey, libp2p, give me a DHT. And you then go, and I've got my 10-minute warning, which means I have to totally change the tempo of this talk. So you go and say, libp2p, give me a Kadamia DHT,
14:20
and then I want a connection between some public keys. So everything is identified by their public keys. So first of all, we had to make Dendrite work again, which it does now for federation, at least for the subset we need for this demo. But then we needed to make it work a bit more with, say, messages support to actually have scroll back. So ironically,
14:41
despite being the maintainer for Yggdrasil, Neil Alexander has come along to work on libp2p stuff for now. So sorry for that. But either way, we've now got Dendrite talking slash messages. You then just swap out one listener for the other listener, and step four is to try to demo this live with everybody in the room. What can possibly go wrong? So if anybody actually followed the,
15:02
oh, that had the right QR code on it, that's something. I'm going to go and create an ad-hoc network right now. It's going to be called Bicephalus, which is the name of this laptop, on channel 11. And don't all try to join it at once, because it'll probably just fall over. In fact, I haven't even been able to create it.
15:21
Oh, no, I have created it. So Neil, are you able to jump on this? I will give it a try. Okay, so I'm going to run the command switch around that URL. I'm going to start off with Docker, which is setting up a Postgres install instance. And then I'm going to send a Dendrite running locally on top somewhere.
15:40
There it is. So this is invisible. It's invisible. No, thank you for telling me. Okay, this is what you're meant to be seeing. In fact, let me just mirror quickly. This is going to be very painful. Okay, so that was,
16:02
I went and set a Postgres running in a Docker there, and I've got Dendrite running here. It's found zero rooms, it's advertised zero rooms, but critically, you can see that it has gone and fired up a public key with a node ID on a whole bunch of different listeners, one of which is 169 network on the ad hoc Wi-Fi I just created.
16:20
The reason we're using ad hoc Wi-Fi is that Fosdom is filtering multicast this year. Otherwise, we'd just be on multicast on the normal Fosdom network. I've now discovered one other libp2p pair, which is very reassuring, and I'm hoping it's nil. Cool. I'm going to then fire up a port in 8082.
16:42
Okay. Don't make icons up with my desktop. So here I am, on a brand new Dendrite running locally. I'm going to create an account for myself there. Predictable. All right. Fine.
17:05
And here I am. So I'm going to explore. No. Okay. So that's what happens if there are no rooms on the network. Okay. I shall create a room quickly. As a room, testing, public room.
17:21
You can see it's got a beautiful host name here, which is the public key on libp2p, and I've gone and created it as such. I think I even remembered to advertise it on the directory. Now, can you see that, Neil? Have you published the room? I might not have. If I'm not, I'm an idiot. Let's see.
17:40
No, I haven't published the room in the directory. So the directory here is publishing it into the libp2p DHT server. In theory, other people on the network can see it. Come on, demo gods. Everybody pray. Found zero rooms. It's advertised a room. It's found a peer, so you should be able to see it now. I've not seen it yet. Well, I can see it here.
18:01
So if I go to the library, go to my new home server with this amazing name, I can see testing there with one person in it, except I'm already in it. Anybody else want to try? Anybody else actually installed the Docker rig and able to roam onto my network? No, it might be, but I'm really surprised.
18:20
Given I can see you on the plus side, I can send messages in Dendrite. Isn't that amazing, everyone? Perhaps I can fake it and try to log on to it just locally. So I'll go and
18:42
spin up another riot, except it's not going to be, it's just going to be talking to my local one. So that's just going to tell us the CS API. Restart the Dendrite, you reckon? Five minutes, right? No pressure.
19:00
Okay, it's restarted. Any better? It's found one room. It's advertised one room. It's discovered one other libp2pp. How about you restart your Dendrite? Oh, you got, you made a room.
19:26
Now I only see one room directory here. So you've managed to connect to the ad hoc. Cool. Yeah. No joy, Neil? Ah, we tested this like six times in a row
19:41
and obviously. You tested it 20 minutes ago. The weird thing is that it's, I'm seeing it appear okay. Okay, I'm going to leave this running in the background and hastily go to another demo, even though I've only got like two minutes left, which is the third experiment. So experiment two was this today, going through to this in future.
20:03
However, what would be really awesome would be if we actually put Dendrite in the browser and compiled it to Wasm, swapped out the HTTP transport in Go for a JavaScript app one, switched out the SQL driver layer for one in JavaScript two. You put it in a service worker and you can just intercept the outbound traffic from Riot
20:21
and say, actually, put it into Wasm instead. And that architecturally looks like this. So we've gone and written a SQLite driver for Go, which talks through to JavaScript. We've written an HTTP driver for Go that talks through to JavaScript also. And it looks a bit like this, hopefully.
20:41
So ironically, this is going to clash with my Dendrite demo. I assume the other one isn't working, right? Annoying. Okay, let me get rid of that. And instead, I'm going to kill that off and quickly go to vector web P2P and do yarn run start.
21:01
And what this is is Riot Web, which has literally got the architecture that we're looking at here. It pulls in Dendrite as a Wasm dependency. It goes and links through to the other members here. And in theory, it should be the best demo in the world. However, this one deliberately doesn't work because once we got this bit to work
21:20
and that bit to work, Dendrite is still talking to Postgres rather than SQLite. And it turns out that rewriting Dendrite's entire schema to use SQLite rather than Postgres is non-trivial. So at the moment, this has got a placeholder in the middle. And so that's fired up now. And I should be able to go, I think, to this guy here.
21:42
And if the demo gods were at all smiling at me, let me just check what port this is. Then we have a service worker here running in the background, although it's actually not the one
22:01
that was just deployed. In fact, this is going horribly wrong. Let me try on a totally different IP address. I'm almost out of time here, presumably. This is looking a bit more promising, perhaps. Lots and lots of stuff in here.
22:22
God, the demo gods are not with me today. So what it should be doing, I wonder if I'm just on the wrong port. No. It's showing a Dendrite. Oh, hang on. What port is this on?
22:42
This is where the demo is going. Ah, 8083, obviously. Okay. So here, hopefully, service worker. Oh, thank God for that. It's a demo that's working, everybody. So service worker registration. So it's gone and registered service worker. It's opened up a DB. It's created a table called ping,
23:00
which is our fake Dendrite because we don't have a real Dendrite. Then it's firing up a libp2p thing, which is talking through to a web socket start rendezvous service. It's then looking for other people on it. And if I went and set this going in another tab on another port, then the two nodes will hopefully discover one another over libp2p and even start, there we go,
23:21
pinging each other via HTTP, which so the two Dendrites are now sending pings back and forth, and they're even going and updating the ping table in the database in order to have storage. So that's basically where we're at right now. It's not fully working as a full Dendrite, but it's pretty close. And so there we go.
23:40
The two right-hand things, a Dendrite in Go or Dendrite in JS. Going forwards, libp2p or a Jadzil or something else. Who knows? Lots of other questions. What's next in general? E3 encryption going on for DMs today. Cross-lining support today. Riot X and a whole bunch of other stuff too. Thank you very much.
24:06
Unfortunately, we have no time for questions. Please exit through that door. A lot of people are waiting. And after the dust has settled, please push into the middle. Thank you.