good morning everybody it's great to be
here at DEFCON 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 gonna
show how easy it is to build these apps
these aren't doubts these are the kinds
of apps that we could use ourselves to
organize and manage your own
decentralized projects but first thing
when I 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 analytical
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 this 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 the
unprecedented kind of business model at
the time and the reason it was able to
do that was through a technological
breakthrough called BigTable that
offered near infinite scale storage and
it's these breakthroughs that changed
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 jima was
started by a small team and they were
trying to do something that was more to
build 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 the Gmail 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 jima 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 fixed 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's 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 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
api's that we have to build web
applications and we just don't have
those today so I thought what I 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 makes 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 BitTorrent 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 BitTorrent technologies have
evolved into different kinds of
chain-linked real time data exchange
protocols like secure scuttle des 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 two solutions
solving some of the scalability
bottlenecks bottlenecks for blockchain
we're going to have more and more
applications for blog chains 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 going to need to have long-running
processes so that for example
if we wanted to index our documents so
we could search them we'd 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
there were hundreds of identity
providers today and some people use
single sign-on as a convenience to login
to 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 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 gonna have
more and more use cases for blockchain
especially with innovations like
aetherium 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's
App Store or home screen it's a place
where users can discover a search and
install peer-to-peer applications that
don't require any centralized
infrastructure it uses the Y line 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 gonna 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 the Salar
and ashwin have 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 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
CR DT 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 Solara 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 solarz done that here and
I could create for example let me insert
our trip mount 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 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
the CLI which is called wire
so why iPad 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 it's there's
a definition style 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
gonna do here is register the pad with
the Waialae naming service so why a pad
and register and then I'm gonna 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 with
me doing any more coding he's able to
interoperate with this interact with
this this new pad okay so we're gonna do
something different we gonna change this
pad and we're gonna build we usually do
chess as an example but since we're in
Japan we're gonna 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 NPM 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
States here and then just save the pad
and then going to definitions I'm going
to change the icon I'm gonna change the
name of the app to shogi and the
database name here and we should see the
pad update once it's rebuilt and now we
can see our show keyboard okay so we
have the starting point 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 gonna add a handler and
what I'm doing here is I'm getting the
event for the actual drop of the piece
I'm gonna validate that that's actually
a legal move and then if it is I'm gonna
append that move onto the replicated
database log that's this view property
that's been inserted into the control
now it's a handle the moves coming in
from other peers on the network I'm
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 the typo let's play shogi
and so here I'm creating a new game from
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 the action and I know
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 that
see if a shrinkin 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
that'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've set up for the pad so
that they can interoperate with each
other and then I'm gonna use the same
standard library that we used on the pad
so I'm gonna here 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 gonna do
the same thing here why are not 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 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 side by
here I can go here and query the
blockchain I finally bought registered
there and I can invite it to the party
and so I can see here both Ashwin and
the bots 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 the
piece then this piece gets updated here
so the 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 rules 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 show he bought 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
while a 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 processes and
then we've got wire p2p which is a
peer-to-peer network now we've been
working on these technologies for the
last 12 months we're getting ready for a
public beta and our test net launched in
q1 of next year and we're starting to
work with some independent software
companies
to build an 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 that 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 Thanks
[Applause]
you