 Good morning everybody. It's great to be here at DevCon. I hope everybody's having a great week My name is Rich. I work on a project called wireline and what I'm going to do this morning is demo a new kind of peer-to-peer platform for privacy preserving and censorship resistant applications And I'm going to show how easy it is to build these apps. These aren't dApps These are the kinds of apps that we could use ourselves to organize and manage our own decentralized projects But first I'm going to talk a little bit about what I think are some of the challenges and opportunities that we face together as a community So I used to work for Google. It's a large cloud company And I'm a distributed systems engineer I worked on cloud technologies for about 10 years and some of the technologies that go into Google Docs and Gmail now since the Cambridge Analytica crisis last year There's been a general Increase of awareness inside the general public about some of the dangers of big tech and obviously we know all about that But there's an elephant in the room Despite our passion for decentralization most of us are still using applications like Google Docs and G-suite and other kinds of centralized applications to manage our projects and In case you're feeling complacent we put the slide together this morning from certain things that have been happening over the last Couple of weeks including adobe banning users in Venezuela This is Gmail this was a revolutionary app when it launched on April the 1st 2004 In fact, it was so revolutionary people thought it was a joke thought it was an April Fool's joke And the reason for that is it offered free storage This is an unprecedented Kind of the business model at the time And the reason it was able to do that was through a technological breakthrough called big table that offered near Infinite scale storage and it's these breakthroughs that change the paradigm that it's been happening every 10 years or so over the last 40 years It's ultimately led to what we think of as the web today But Gmail was started by a small team and they were trying to do something that was more to build an apps That were more responsive to create better user experiences, and it's this More responsive UX that's become known as web 2-0 that drove the rapid adoption of these technologies But Gmo also introduced something else a new business model free and not open as in free software foundation But free meaning we'll figure out what the monetization strategy is later And so 15 years later, we've got a billion point two users on the Gmail platform But the app itself hasn't changed very much Gma email itself hasn't changed in the last 50 years Dominant companies resist change. They don't want to cannibalize their existing products In fact the strong incentives within the companies that growth is the only thing that matters and so innovation really tapers off And because it's a closed system, none of us can Change the functionality fix bugs add new features or even verify that the application is doing what it's supposed to be doing And if you're an independent software developer competing with a free business model is really difficult Unless your business model is to try to get acquired by Google so Gmail is part of a set of applications called the G suite and the G suite is a platform and platforms go through the same growth Cycle the ones that succeed. There's a large adoption curve at the beginning and then at a certain point The platform switches from being an innovator into a rent seeker And it is that point that they start to monetize the platform and often these monetization strategies conflict with our interests as users For developers as taxes imposed on the platform and restrictions on the kinds of applications that can be built and for users There are the obvious privacy issues So this should be a really big opportunity for us The the complacency of the dominant players Why aren't we seeing more widespread decentralized applications? Why aren't we seeing adoption of these kinds of technologies? Well, the truth is Building web scale applications is really difficult And there's been 15 years of innovation in the tools platforms frameworks and APIs that we have to build web applications We just don't have those today. So I thought what I'd do is quickly go through some of the elemental structures required to build web scale applications If we were editing a document together in this hall this morning It would make absolutely no sense for each of our keystrokes to be sent to a server in Mountain View or in Tokyo for that matter We think peer-to-peer is the obvious solution to this But we have to add additional infrastructure to make peer-to-peer work seamlessly in the browser We need stun servers and signaling servers so that the different peers can find each other And we have to do this in a way that doesn't reintroduce new centralized dependencies If we were building these apps on the cloud today We have dozens of different database solutions that we could use that give us the scale that we would like Now on the peer-to-peer side of things bit Torrent was the killer app and enabled this massive scale Replication of files, but it also had centralized dependencies for the index for where you actually found the files that were being shared But the bit Torrent technologies have evolved into different kinds of chain-linked Real-time data exchange protocols like secure scuttled up and that and we can start to use these to build replicated databases But real-time collaboration is still inherently a really difficult problem to solve in 2007 we're working on technologies at Google called operational transformations This was for a project called wave that some of you will remember and this is what enables different clients to interoperate At the same time across the internet, but again, this requires centralized infrastructure Most of compute today is done in the cloud and with layer 2 solutions solving some of the scalability bottlenecks bottlenecks for blockchain. We're gonna have more and more applications for blockchains But as a general principle of decentralization, we should be moving as much Compute as possible to the edges and that means doing more work in the browser Now we're also gonna need to have long-running processes so that for example if we wanted to index our documents So we could search them We would have to do that outside of the browser and we can adapt Technologies from the cloud like function as a service which has great scaling characteristics But the challenge is to make that work in a peer-to-peer environment and to make it as secure as possible and then finally identity there are many Places and times where anonymity is really important to us But we're social beings and so we need a mechanism to represent our identity and the identity of the services that we interact with online Now there are hundreds of identity providers today and some people use single sign-on as a Convenience to log into all of these different services But there's a danger there at any point that service provider could switch off our identity without any course of or repeal and They can track our movements across the web. So we have standards like Self-sovereign identity and verifiable credentials where users can control their identity with public-private key pairs But even if you're an expert in this technology It's still really cumbersome to use to do things like key management key rotation and key recovery We think the solution is going to be a hybrid of different technologies. So the cloud isn't going to go away It's a good cheap resource for high-scale computation and storage We're going to have more and more use cases for blockchain, especially with innovations like Ethereum 2.0 But what we've been focusing on is the missing middle tier the peer-to-peer tier and that's what we're going to demo this morning But suppose we could solve all of these technical problems Unless we can deliver user experiences that are as good as or better than the existing cloud Technologies today. We're not going to see widespread adoption of decentralized technology So that's something that we're going to show in the demo that we're going to do next So this is an application we built on the wireline platform. It's called launchpad It's kind of like an app app store or home screen. It's a place where users can discover search and install Peer-to-peer applications that don't require any centralized infrastructure. It uses the wireline naming service Which is a permissionless blockchain that lets any developer publish an application without any censorship without any taxes or other restrictions placed by the platform So I'm going to show a couple of example applications that have been built on the platform already So we have simple collaborative calendars spreadsheet There's a planning tool which is a kind of Kanban and even the slides that I was presenting were written with an Application that was built on this platform. So we're eating our own dog food. We've also got a map application and I'm going to create here a simple text document and As I mentioned earlier, one of the most difficult things to do with collaborative applications is the real-time interaction between different users, especially when you don't have any cloud infrastructure So what I'm going to do here is invite some of my colleagues who are here on the front row to join me in editing this document, so I'm going to send them an invite and They that should enable their peers to swarm and connect to my peer on on the stage here And we can collaboratively edit the document So I'll just demo first of all that we're completely offline here if I do a web search It's not going to get resolved and I should see if I open the debug panel that Salar and Ashwin joined this what we call a party. This is a collaborative space where these documents live and We can see that they're Typing along I can type at the same time This looks good including the type of and So we've got this technology now like operational transformations where we can collaborate in real-time across all of these different applications It uses a technology called CRDT Which is a very early-stage experimental technology that has some limitations in terms of scale But we're working to improve some of those things. You can see Salar has been learning Japanese One of the other properties about applications on the platform is that these applications are all modular And even though they've been built by different third-party developers, we can combine them together in interesting ways So for example, we could insert a spreadsheet into this document I see Salar has done that here and I could create for example Let me insert our trip map into this document and you can see this is live These different applications have access to this replicated database that is securely replicated between The colleagues that I've invited into this shared environment So at this point we're going to change gears and quickly in five minutes to build an application from scratch so What I'm going to do is use the wireline SDK and I'm going to fork an existing project So it's using the CLI which is called wire. So wirepad create will create a new application I'm going to open up the code here and look at that in VS code and Just take a quick look at there's a definitions file and there's a pad The pad is a simple react component So we're trying to make the SDK as simple as possible and as natural as possible to existing web developers so what I'm going to do here is Register the pad with the wireline naming service so wirepad register and Then I'm going to build it and with that out of the way the launch pad here in debug mode should see that the Application has been registered with the chain and now it shows the new tasks application Which was the application that we forked. So we're going to create a new instance of that And write some tasks down here and out of order. So I've done that Haven't done any of these And because the framework is naturally collaborative and Ashwin is currently inside this party I can see that without me doing any more coding. He's able to Interoperate with this interact with this this new pad. Okay, so we're going to do something different We're going to change this pad and we're going to build we usually do chess as an example But since we're in Japan, we're going to build a shogi game, which is Japanese chess so The first thing I do is change the render method And we've got some of the code already in place So we're using a standard react components that we found on MPM that has a shogi board and We're going to just we can get rid of most of these code here So we've got a simple render function and we're going to set the initial state Here and then just save the pad and then going to definitions. I'm going to change the icon I'm going to change the name of the act to shogi and The database name here and we should see the pad update once it's rebuilt And now we can see our shogi board Okay, so we have the starting points of a new game. I can move pieces But obviously if I reset the browser at this point We're going to lose the state because we're not writing that to the database anywhere So that's the next thing I'm going to do There's a common react idiom called a higher order components that and we're using that to inject the peer-to-peer database into this react control so what I'm going to do here is I'm going to add a Handler and what I'm doing here is I'm getting the event for the actual drop of the piece I'm going to validate that that's actually a legal move and then if it is I'm going to append that move Onto the replicated database log. That's this view property that's been inserted into the control Now to handle The moves coming in from other peers on the network. I am going to add in another piece of code here which Takes the log I'm going to iterate through it and then update the state of the game and then set that as the state property in the application And so now if I go into the chat room once the app is reloaded. I can say hey, Ashwin. Are you there? Apologies for this the typo Let's play Shogi And so here I'm creating a new game from our kind of slack application our chat application and if I click on the link here, it should take me into the game and Just because Ashwin and I now swarming on the same node on this peer-to-peer network That should allow his peer to dynamically load this application. So now if I make a move Let's see if Ashwin can can play. Okay, so I'll just move my kaku bishop over here and take his piece And we have the beginning of a collaborative game again without having to do having to manage any of that replicated state So I've got a minute and 16 seconds left. That should be plenty of time to create a super ai that is going to play shogi with me so We're going to use the wireline SDK again. I'm going to say wire bot create again forking an existing project now bots are these asynchronous Autonomous agents that live on the peer-to-peer network and They're modeled after simple lambda or function as a service function. So they're really easy to develop Open up the code here and There's a Definition file. There's the bot code and there's a Configuration file. So the first thing I'm going to do is change the name of this to shogi bot I'm going to change the definitions to use the same database table that I set up for the pad so that they can Interoperate with each other and then I'm going to use the same standard library That we used on the pad so I'm going to Hear I don't know if you can see this but I'm going to iterate through the log of moves that have been replicated to this peer and update the state so now if I Go into the terminal and I'm going to do the same thing here wire bot register and so this is registering the spot with the blockchain and we have a full blockchain node running here on this peer and Wire bot run this will run the bot in a debug mode So I can see that it started here And now the bot has its own identity So if I open up the sidebar here, I can go here and query the blockchain I find the bot registered there and I can invite it to the party and so I can see here both Ashwin and the bot are now part of this collaborative space And we can see that the bot has logged the current state of this shogi game If you see if I move a piece then this piece gets updated here. So last thing I'm going to do really quickly We're going to do the AI piece so I guess we'll keep that simple we're going to Get a list of valid moves and pick one at random and then post that move to the feed and see if the replication happens So if I save that it should restart the bot and if I now create a new game and I make the first move We should see that shogi bot is now alive. So we've built a complete peer-to-peer application in Just a few minutes So I'll finish off here We see the web evolving into a hybrid of different decentralized systems The wireline naming service is a permissionless blockchain and it's the registry for all the applications that run on the peer-to-peer network It's the source of truth. It's also a mechanism that enables payments to work between the different applications and users on the network We've got wire compute which is a decentralized Computation process platform for long-running processors and then we've got wire PTP, which is our peer-to-peer network Now we've been working on these technologies for the last 12 months We're getting ready for our public beta and our testnet launch in Q1 of next year and we're starting to work with some independent software companies to build and individual contributors to build out the infrastructure and to build some of the Applications on this platform. If you're interested in any of these technologies or you'd like to come and collaborate with us The team is here this week. Please come and approach us and we'd love to talk to you and thanks very much for taking a first look at wireline