Imagine This: A Web Without Servers – Tara Vancil – JSConf EU 2018


Written by:

Well, if you think it’s bad that they made
you stand up, can you believe they’re making me stand up here for this whole talk! Hi, everyone, my tame is Tara. Today, I will ask you to use your imagination,
to think about the web in a way you never have before. What I’m going to ask you to imagine is a
web without servers. If your immediate reaction is confusion or
scepticism, that’s okay, because it doesn’t make much sense in the way the web works today. If I tell but my background and what I work
on now, it will all start to come together. My name is Tara Vancil, and I’m a web developer. For me, it means that I spend most of my time
thinking about the web or building things on the web. I’m really interested in peer-to-peer protocols
and I love anything to do with nails. If you have an interest in nail art, or nail
polish, we should definitely talk later. The web is a huge part of my life now, but
that wasn’t always the case. I actually didn’t grow up online. My family didn’t have a computer and we lived
in a rural area with spotty internet. My only access to computers was at school
where we mostly used them for learning how to type. I did get on to Facebook, MySpace, and Sparknotes
in my teenage years, but my object line experiences were mostly about consuming things. I was pretty much looking at pictures of my
crush and catching up on the book I didn’t read for English class. It wasn’t until much, much later when I learned
about the existence of HTML, JavaScript, and CSS that I realised that I could build things
on the web. This was just something I had never considered
before. I assumed that building websites was reserved
for super talented programmers. This was a really, really exciting moment
for me. Because it totally changed my conception of
what the web was, and how I could participate on it. But I eventually realised, after learning
how to put together a web page with HTML, there was an important question that I needed
to answer which was: how do I share the things that I’m building? Thankfully, the answer to that question is
really simple. You just install webpack with MPM, set up
your local web server and SSH into a server you’ve already set up on AWS. Okay, so it is actually not that simple. Now, to be clear, I’m poking fun at webpack. I don’t think that tools are complex and bad,
I think tools are awesome because they help us build things, and it doesn’t really matter
which tool you pick, as long as it helps you build something that a browser can understand. Whether you write a simple HTML file or build
something more complex, your choice is valid. The point is that composing web pages is flexible
and forgiving. There is room for the most beginner-beginner
and the most expert-expert to build something meaningful which is what makes the web such
an awesome tool set. When I was a beginner, it was actually kind
of burden some to build and share things on the web. I can tell you it wasn’t the tools that made
me feel that way. It was servers. Now, I mean this in the nicest way possible,
but servers suck. I think I feel this way because I started
building things on the web in this sweet spot period when GeoCities had already been shut
down but tools like Netlify and Glitch didn’t exist yet. GitHub pages were around but I wasn’t comfortable
working with git at that point. As far as I could tell, the best option for
me to share the websites I was making was to set up a server. This was frustrating because I didn’t have
the time, expertise been or money to do that. Really, who does? There is like a super tiny sliver of the human
population who knows how to set up a server, and, let alone enjoys doing it. I can set up servers now, and there are days
when I’m in the mood to play with engine X but most of the time it is the very last thing
I want to do. I’m sure some people in this room are good
at running servers but I don’t think it is fair to expect the rest of the world to be. There are three billion people on the internet
today, and that number is only going to grow. They are using tools like Facebook, Instagram,
and WeChat to welcoming. That is awesome. We are seeing human connection at a scale
once unimaginable. But I think it is fair to say that the vast
majority of these people are never going to participate in the web outside of the bounds
of these tools. The post tweets, the share life updates on
Facebook, or show pictures of Berlin street cats on Instagram, but they will never craft
an HTML page, never make a fan site for their favourite band. They will never get to experience the creative
joy of building something on the web that is truly theirs. I think we have to sit with that and think
really hard about whether or not that’s okay. Maybe it is. Maybe not everybody wants to learn how to
build websites. But I think we should be certain that the
web itself doesn’t get in the way of those who do. Personally, I’m afraid that it does. I’m afraid afraid that publishing on the web
is a bottleneck. That something as simple as sending an HTML
file to a friend is far too complicated. I mean, think about it: if you knew the web,
you could spend months and months wrapping your head around how to write an HTML page,
vertically centre divs or navigate the latest JavaScript frameworks. After all of that, you gained your bearings,
you have some confidence, and maybe built something you’re proud of. You still have to figure out servers. And I just think the web can do better. In fact, I think it is essential that the
web do better. Because of the barrier to entry remains — if
the barrier to entry remains this high, I hate to think about what the web looks like
in ten or 20 years. Remember, the web has only been around since
1990, and we are already seeing the early stages of what happens when most people use
a handful of platforms to participate. So how does this play out for the long-term? What does it look like if 28 years from today,
most people are still using a tool like Facebook, or WeChat, or Instagram. Will it still be the web or will the providers
have shaped it into something entirely different? I don’t know, but it seems plausible, but
I don’t think that’s a risk we should be willing to take. The web is too precious. It is this weird social experiment where we’ve
built a global language for building things. How cool is that? At the very least, I think a web like this
looks kind of boring to me. If you were here last year, you might remember
one of our emcees, Rachel White made a talk called Keep the Web Weird. I interpreted it as a love letter to the kind
of creativity the web inspires when communities are nice and tools are accessible. She called back to the days of GeoCities and
Angel Fire, when there were several tools available for folks just to jump into a browser,
write HTML, and publish a website for free. But you might know that GeoCities was shut
down in 2009 and took 38 million sites with it. The archive put up a valiant effort to save
those sites and saved the precious gifts that came out of the GeoCities era but not able
to save all the 38 million sites. They’re gone. I think the coming and going of GeoCities
and the rise of Neocities and Glitch tells us something about the web and what is missing
from it. I think that it tells us setting up a server
is so far out of reach for most people that they simply can’t do it and they instead have
to rely on tools like this. Now, I love Neocities, I love Glitch, in fact,
which I think they’re doing some of the most important work on the web right now. We’ve been here before 3 Neocities and Glitch
help us circumvent the fact that publishing on the web is difficult, but I think we should
be asking why is it so damned difficult in the first place? What can we do to make it easier in a way
that has the kind of longevity we expect out of the web platform? I think we can make it easier, and I want
to share with you my vision of what that might look like. I want to ask what if we just didn’t need
servers to share a website? What if we could press a button in our browser,
and, with one click, create a new web page? That would certainly be nice but how in the
world could we pull that off? We have these pretty powerful devices. We have we have our phones, our laptops, right? Maybe we could just turn them into servers? Sadly, it’s not that easy. There is a lot that is wrong with this idea,
but to put it simply, our personal devices are just not built to be servers. First of all, we shut them off sometimes,
whether it is because we’ve gone to sleep or the battery’s dead. They don’t always have a dedicated IP address,
and they’re simply not built to handle the kind of traffic that servers do. Imagine publishing a video from your personal
computer and having it go viral. Your computer would be flooded with millions
of requests, and your home network would probably fall over in a few minutes. So, if this idea of one-click publishing is
going to work, we have to think outside of the server box, because, again, our personal
devices just are not servers. Luckily, some smart people flipped this problem
on its head and have found a way for regular devices to do the sorts of things that servers
do without actually needing to be a server. BitTorrent was created in the early 2000s
and what you call a peer-to-peer network. The key innovation was to ask what if, instead
of one computer, a server, handling all of the responsibility for hosting files, what
if we split up that responsibility across a network of a bunch of different computers
so that any device could hop on to the network and contribute some bandwidth? Maybe some of those devices are server-like
devices that live up in the cloud and surely sometimes some devices will go offline, but
the big idea is that regular devices can help contribute resources to hosting files on a
network? And this was a really big deal. Now, I’m sure most of you know BitTorrent
because of its infamy. It was used largely for downloading movies
and music and other media illegally, but I want to point out it’s a really incredible
innovation that has tons of legal and other legitimate use cases. Most importantly being that it made it possible
for regular people with regular devices to be able to host files, and I just think that’s
so cool. So what if we took this approach and we applied
it to the web? Websites are just files after all. If a website is just a collection of files,
then what a if we could use a peer-to-peer networks to get a website from one computer
to another? It turns out you can, and I’m really excited
to tell you more about that. I work with these two guys — P Frazee and
Macintosh. They’re both here today. Together, the three of us work on a project
called the Beaker browser. Beaker is an experimental browser which means
that we don’t always follow web standards. But it is not because we don’t think they’re
important, it’s just that we have a few experiments in mind that we wanted to run, and we think
they’re worthwhile to run, even though they’re not standards-compliant. The core experiment we are running is what
happens when you take one of these peer-to-peer networks and you put it inside of a browser? So, we wanted to keep the web mostly the same,
keep the browser pretty familiar, but make it peer to peer. We’re in a really lucky position to be able
to do this experiment. Because Macintosh is the core developer of
a peer-to-peer protocol called Dat which is similar to BitTorrent but has key improvements
that make it really well suited for the kinds of things we do on the web. We took it and put it into the browser, put
it into Beaker, and found out some really interesting things happened, like enabling
one-click publishing, giving view source cool new capabilities, and making it possible to
provide new web APIs to developers. Why don’t I show you? Okay. This is Beaker. I apologise that the tabs and the URL bar
are small. I will try to point out what is important. In first glance, it probably looks spectacular
to any browser that you are familiar with. So it is not remarkable in that regard. Before showing you anything exciting, let
me show you what a peer-to-peer website looks like. This is my website, and you might notice that,
instead of HTTPS, the protocol in the URL is DAT. It is really small but that is what it says. It looks like what you would expect a website
to look like — links work just like you would expect to, images work just the same
as they do in other browsers, and so does CSS. This was an intention al choice on our part. We didn’t want to up end the web, we wanted
to see what happened what would if we put a peer-to-peer network in it. [Sound feed distorted]. We did literally treat this device kind of
like a server but not actually. So I’m going to jump to Beaker’s main menu,
and click this button that says Create New. I will click the website template. You can make an empty project or import an
existing one. I will import this template for the sake of
time. What happened here is that Beaker minted a
brand new website. It has got information about how to get started,
change the background colour here, nothing too fancy. What I think is exciting to point out is that
this website has its own URL. I could share this URL with any of you. If you were to open it in Beaker, because
we’re the only ones that support it, you can download the website from my computer. There’s no server involved here. Now, this URL’s not very pretty. You couldn’t remember it. Just like IP addresses are tricky to remember
as well. How might a URL like this work with the domain-name
system? Turns out it works out pretty nicely. I set up a website to show you how that works. This is the JSConf EU subdomain on my website. I was able to get this nice time by using
a txt record. I set this up with my domain registrar — Google
— and I pointed the subdomain to the long ugly URL, and that’s all it took. I didn’t have to fuss with any servers to
get that nice URL. I promised you I would show you view source,
so let’s look what that is like in beak Beck. What we are seeing here is all of the files
that compose the website we were just looking at. You can see the favicon here, we can take
a look at the styles, and, of course, we can see the HTML that we were just looking at. These files live on my computer. If they live on my computer, should I not
be able to edit them? Yes, you can. We made it possible to actually edit files
inside of view source, so I can click in button right here. I’m going to add a few exclamation points
to this heading. When I save it and go back to that tab, we
will see those changes just like that. [Applause]. Okay, that’s pretty cool, but we are all developers,
and we probably have preferences about our editing environments, right? Some of us like Sublime, some like DS Code. Again, these files are on my computer, so
I can open them up in my preferred editor. Before I do that, I want to turn on a cool
little feature we have — library loading — and I’m going to jump over —
I want to jump over to the view source tool again. I’m going to copy the path to where those
files are in my computer. And open those files up. I want to open the index.html file, and I’m
going to say “Hello from Sublime”. As soon as I hit save and head over to the
tab, we can see the change without needing to refresh. [Applause]. That’s a fun little tool. So I
showed you one-click publishing, I showed you some of the new things we enabled in view
source but I haven’t told you about the new web APIs yet. Before I do that, I want to give a backstory
why we thought this was necessary. When we first started building Beaker, we
were happy with the fact that we would could pull off one-click publishing but we realised
that the web is not a collection of static websites, although it might be a nicer place
if it were. We thought is there any way we can recreate
the behaviour that apps on the web use using a pee-to-peer network? Can we make it problem to do user profiles,
databases, or anything like that? The answer is yes. If you think about it, a database, or a user
profile is typically represented with just files, right? And, if websites are also just files, then
maybe we can represent user data and user profiles inside of websites. That’s exactly what we and other people were
building on these tool sets are experimenting with. This is a profile.json file. This is a profile I use on a peer-to-peer
social media site. You can see the properties are my name, bio,
and avatar. I think it would be easier if I show this
later to make it sink in. If we’re going to make it possible for developers
to build peer-to-peer apps to use user data, we need to make sure they can read and rye
write the data. The new web APIs look a little bit like this. Again, it is easier if I just show you. I’m going to jump into the console on this
website here. Let’s see. I’m going to start up by getting an object
that represents this Dat website that we’re on. I’m going to use this, do this using the Dat
archive APIs that we have, and Beaker. Do window.location. We now this this object, and we can do a lot
with it. I want to show you one thing that we can write
a new HTML file to this website. We will have a website writing to itself. Okay, so website.writefile and called it api.html
and write simple markup to it. We’ve written the file, and now, if we go
to api.ptml, we can see that we’ve created a new HTML file. [Applause]. It might not be totally intuitive at first
what this enables, but it enables a lot. We have a whole social media application using
these APIs to write user profiles. It’s looks a bit like Twitter, you might have
noticed, and that was intentional. We wanted to see if we could replicate a lot
of the behaviour that Twitter provides, so we have a feed, we can look at people’s posts,
we can like post and reply to them of course. I think I will actually say “Hello from JSConf”,
and anybody who is following me will sync these changes from my profile. —- sync these changes.” I want —
I want to show you by what I mean by putting user data in user profiles into websites. These are all of my posts. The object that represent my posts are pretty
simple: text and a timestamp. If this were a reply, it would also contain
information about who I was replying to. I think this is so cool. Interesting things happen when you separate
user data from the application layer. The application layer in this case is just
sort of a view on top of my profile. And over the top of all my friends’ profiles. This means that the app and the data are no
longer tied together, so, I can actually customise the app with little consequence, so, let’s
just do that, and let’s see how that would work. I’m going to open this up in ViewSource. I don’t only this website, so I can’t just
edit them. I have to make a copy. I’m going to go ahead and make a copy. I don’t like that fritter. This app has round buttons. I’m going to make it square. I’m going to jump into the CSS file here,
and search for the button class. Here is the border radius that I want to get
rid of. We will save it. We’re going to see an entirely new social
media application. And we can see that the buttons are now square. [Applause]. I haven’t given this specific instance of
app permission to write to my profile which is why it looks a bit different, but if I
were to select my profile and load everything up, I wouldn’t lose any of my friends. I wouldn’t lose my network or content or anything. Even though this change I made was kind of
trivial, you can imagine being in a situation on social media where a change you would like
to make is not trivial. Maybe you would like to have some say over
how the colour scheme works because you are colour-blind, or maybe you want better moderation
tools. You’re empowered to do that with this model,
and I think that’s just fantastic. Now, I’m not going to make any promises that
this type of model, a peer-to-peer web is going to fix everything that is wrong with
the web, and I’m not going to promise that an app like Fritter is ever going to become
as popular as Facebook or Twitter because they’re already pretty darned popular, but
I can promise that a peer-to-peer web does make apps like this possible, and I can say
this with confidence because I use Fritter every single day, and so do a lot of my friends. If you want to learn more about Beaker, please
talk to me afterwards, I’m excited to share about it. You can visit these links to learn more. I wanted to end with this and say fundamentally,
a peer-to-peer web is a more fun web, that, no matter what your technical expertise is,
it’s a web you can contribute, build, and share. I think that makes it a worthwhile experiment
to run, not just in Beaker, but in every single browser. Thank you so much for imagining with me. [Applause]. [Cheering and Applause]

33 Replies to “Imagine This: A Web Without Servers – Tara Vancil – JSConf EU 2018”

  1. Hammad Mustafa says:

    interesting concept.

  2. Startuper belge says:

    great talk

  3. Jordan Diamante says:

    cool… looks like piedpiper new internet

  4. John Snow says:

    Very nice concept but the question is; what's the file size footprint going to be on the p2p devices. I definitely don't want to host truck load of files and how are you managing the private login data? The authentication/authorization and verification without the servers. You can't expect the users all over the internet hold bits and pieces of your private data. Right?

  5. Jaroslav Polakovič says:

    How do I know some of the assets that are now stored on my PC are not illegal to share? Imagine someone receives illegal material from my computer over dat:// – from the legal standpoint I'm the one that distributes that material. With BitTorrent, people usually have a good idea about what exactly they share. With websites, it's very simple to hide illegal data (e.g. invisible assets) in the websites' source files, it seems. I'd like to participate and share, but how do I protect myself?

  6. TOMYSSHADOW says:

    Okay but, when the site owner edits the site they own, if it's P2P, it will take a long time to update as you are the only person out of who knows how many with the most recent copy… beyond that, wouldn't this take a lot of space, to share every website you visit?

    Still an interesting experiment though. I love the idea.

  7. FuZZbaLLbee says:

    Cool, if you add something like meta mask, we can create a full Dapp

  8. Matthew says:

    I met Tara once at jsla about a year ago, she was super cool and actually tried to explain this to me briefly. I didn't understand the project until now. The idea has an incredible amount of potential. This just gives any one more freedom in how one wants to experience and publish to the web. It just removes these pesky little boundaries to share. I don't think dedicated servers are going away anytime soon, but this just expands so many possibilities for so many people! Looking forward to see how this grows.

  9. Jacob Woods says:

    This is so cool!

  10. slapusillydawg says:

    This is so cool.

  11. R.E. g. says:

    Very cool. I like the concept and hope it is adopted.

  12. Pat Patisserie says:

    Exciting stuff. Great to see IPFS, DAT etc taking off. See also MaidSafe's SAFE Network and other stuff at the Decentralized Web Summit next week (anyone going?)

  13. Sapan Bodiwala says:

    Loved the talk. Very interesting concept. Great job!

  14. peq42_ says:

    I understand that you can make private login to accounts a thing something like an ID(that Key pair that was said in a comment), but what about those 2 cases:
    – I'm trying to login from a different machine into my account. The ID/Key pair, If I understood it correctly, would be different, so how can I make a secure login system(Even though I've an idea for that, which I use in a project of mine, it still wouldn't be as safe as things are with the current way that web works)?
    -I've a data base which contains information from all users. How can I safely storage data in it, and allow those I want to to have acess, if its informations are going to be on all devices that acess my website?

  15. krasserTerror says:

    Looks good. I am generally not a fan of cryptocurrencies, but I think in this case it would be a good idea to combine it with one. So you can have a network of well connected and fast servers that cache the pages.

  16. Fun Faction says:

    the new Tor

  17. Tomás Ramírez Gómez says:

    All devices together can be the most powerful server ever built

  18. Brett says:

    Very exciting… I'm curious about 1) How privacy works; if privacy can be employed, will private messages work when a message is only shared between two people and that other person is now offline; 2) how origins work (e.g., if IndexedDB, localStorage, etc., is shared across all sites, and if one can scope things there for privacy too);

  19. Ryosuke Minami says:

    This looks incredibly promising.

  20. Ass Whole says:

    How secure is dat compared to https? Is everything sent in the clear or is it encrypted?

  21. Acts2:38Project says:

    This is interesting, encouraging, easy to understand and a bit of fresh air 🙂 I especially appreciate Tara sharing her background. Sounds like she would have really loved and benefitted from being introduced to more possibilities as a student and is interested in seeing that happen for future young people. That is super neat and worthwhile.

  22. Sand Man says:

    How would you implement websocket connections between users (like chats for instance) using this protocol?

  23. Jesse Okeya says:

    interesting concept.

  24. Curtis Rock says:

    Very nice. Digging into the details

  25. Toxic Desire says:

    Can someone explain to me where it would make sense to use p2p web, compared to conventional server-client model?

  26. Daniel Casmir says:

    this is kind of brilliant.

  27. Bep Kororoti says:

    That's genuinely great, I've always wanted something like this, I didn't think of building a custom browser, though 😂

  28. ElectronSz Inc says:

    Great great idea. I'm afraid it will take time. Maybe if Google adopt it

  29. Fillype Farias says:

    For sure this tool is also nice for iot right now

  30. Ferdinando Coluccelli says:

    you are great Tara! kudos!!

  31. Vivek Kaushik says:

    Silicon Valley 'New Internet' anyone?

  32. keo kawasaki says:

    amazing Idea! I have a thing for retro design and I think this can totally rock it!

  33. Bruce Armstrong says:

    I had to learn servers too.. And server sucks!!

Leave a Reply

Your email address will not be published. Required fields are marked *