Webtorrent: Model for a hybrid web and native decentralized network

Just came across Webtorrent yesterday, which includes a pure-JavaScript distributed hash table implementation and according to this talk, their web implementation is interoperable with native clients.
I believe a similar network is possible with the SAFE network.

7 Likes

Here is a working demo:

http://instant.io/

1 Like

Ok, so I started watching the video and there was too much tech terminology for me to really grasp what he had done.

What are the implications of something like this?

What on earth is this? It’s wicked fast…

If you watch the video starting at the 20:00 mark, he explains it.

Basically, this technology allows users to connect to each other through their web browsers. They don’t use a “server” middleman relay or third party application. Rather, they use a connection site/location on the Net to send and receive data.

Here’s a primitive diagram of what I’m trying to say.

Traditional Server/Client Relay
(FB User A) <~> (FB Server) <~> (FB User B)

  • The Server relays what is sent and received.
  • The Server can copy what is sent and received.
  • The Server can stop the traffic, and or shut down your site, blog, post at any time.
  • Both users have to be using the same application, in this case, it’s Facebook’s web interface.

WebRTC
(Firefox Browser) <~> (Bridge Connection Site URL) <~> (Chrome Browser)

At 31:00 he explains how the web connection works.

  • Because the connection is more direct, traditional server limitations are removed from the equation.
  • It’s the difference between playing a laggy game on WOW (World of Warcraft) and a super fast Halo LAN party.
  • The controlling server is replaced with any connection site. Both users just need to tell each other where to meet on the Internet via URL address.

This is similar to my proposed idea to use a seamless web interface for different functions. I customize the sites reaction to your MPID. They customize the functionality based on the site they agree to meet-up.

The biggest advantage is a better user experience, faster data transfers, less restrictions, single click use, etc. There could also be an infinite number of other advantages we haven’t discovered yet.

2 Likes

@dyamanaka Wow! Thats really cool!

So there is something called PeerCDN based on this technology which uses the caches of a website which have been downloaded by peers to “seed” in a bittorent to other people who access the website, allowing lower bandwidth costs.

However, the company was acquired by Yahoo and so it appears to be off the open market for the foreseeable future.

But thats a cool potential.

See my proposal for an implementation in JS of the Safe librairies and the idea of having bridges between the native network and the web-based one. The existence of a working implementation of bittorrent using web technologies shows it is possible, and since it is based on a similar XOR-based Distributed Hash Table implementation there is probably a fair amount of code from webtorrent that can be reused.

In both cases, a web-based implementation allows non-technical users to use the technology without having to install anything on their computer. They can participate simply by visiting a link in their browser. It removes any friction in the deployment of the technology.

@dyamanaka: I just discovered node-webkit which combines Chromium, the open source part of the Chrome browser, and node, the JS-based runtime, to write cross platform applications using web technologies, extended with the capabilities of the node librairies, that go beyond the current API available in web browsers.

It means we could have a web-based client node for new users, and a native application that would act both as a web-based client and a native client, therefore bridging both network. Finally, we could have nodes (without a UI) for farmers to deploy on many machines. By exposing the SAFE librairies to nodeJS, we could use JavaScript as a scripting language in all cases, which would allow a lot more developers to create mashups for any or all of these implementations.

3 Likes

I was also a bit disappointed PeerCDN got sold out to Yahoo, but given the numerous open source contributions of feross towards decentralizing the web, even after they got sold, it might actually be a good thing for everyone that he has a stable source of income which enables him to contribute to all these things.

Yes, this is a very easy way to introduce non-tech people to the SAFE Network.

I love this idea!

1 Like

Small point on UX.

I guess the WebRTC version will be a plugin that will “visit” the URL automatically when the browser starts, so the node bootstraps without user intervention.

So UX becomes:

  • search for plugin
  • click install
  • optional: tweak plugin settings
    Done - whenever browser running the node is active

Alternative is just to visit a URL and leave the page displayed as long as you want your node running. This is simpler, but not convenient.