Live data from Hacker News

Serverless Sync in Web Apps Using Bit Torrent

paul.kinlan.me

41–50 of 57 posts

Re: Serverless Sync in Web Apps Using Bit Torrent

#41
post #25

It's great to share data, however, how can a torrent solution support services like web API?

Well, one way I did it was by creating fake torrents with an unlikely info_hash (if you see the all-0xaa's hash on bittorrent crashing your client a few weeks ago, that's me).

In this way, I can get use public WebTorrent signalling servers to establish the WebRTC connections between my (non-bittorrent) clients.

You can distinguish between clients and servers (if you don't want a P2P model) by having clients claim to need this unlikely info_hash, and servers seed it. In this way, WebTorrent's websockets server won't link clients to other clients.

Re: Serverless Sync in Web Apps Using Bit Torrent

#43

Earlier quoted context omitted.

From what you've described, it seems like i2p would satisfy the requirements of your first paragraph and Freenet would satisfy the requirements of the second. Both of these networks have been around for over a decade, so they're not as in vogue as newer projects.

I have only slightly looked at i2p, but sadly appears the only impl requires a JVM. I have researched freenet and it does not appear to provide plausible deniability for public data (sorry on mobile and can't link easily).

It does provide plausible deniability, since you have no control over what files go to your node (files are spread as people request them) and they are encrypted, hence you can't easily know what they contain.

Re: Serverless Sync in Web Apps Using Bit Torrent

#44

Earlier quoted context omitted.

Seems js-ipfs[0] is not quite ready for prime time (though it's close) and the author had a requirement to do everything from a browser. https://github.com/ipfs/js-ipfs/

Unfortunately it looks like WebRTC support and DHT support isn't planned for this current release of js-ipfs according to their roadmap [1], both of which could be a giant leap forward in enabling truly decentralized apps. Bittorrent DHT doesn't actually run in the browser yet either [2], so WebTorrent in the browser currently only has access to the tracker infrastructure, and thus isn't as decentralized as one might…

(IPFS dev here)

We've been working hard to get js-ipfs to a working level and just last week announced it's ready. While it's still early days and we have plenty to do to make it even more robust, we have it fully working with WebRTC support as of today.

We've developed some apps and demos that essentially enable you to create dynamic content and apps on IPFS, purely in the browser. We do have to currently rely on a centralized Pubsub (in a similar fashion to torrent trackers) but we're working on to provide a decentralized pubsub mechanisms as part of IPFS.

Regarding persistency: js-ipfs and the main ipfs (native go-ipfs) networks are not yet connected but we're very close to having that. Once they all communicate in the same network, we can provide a lot better persistency as users don't have to keep the tabs open in the browser.

Take a look at some of the examples of what can be done today with js-ipfs, that is fully in the browser:

https://github.com/haadcode/orbit (specifically https://github.com/haadcode/orbit/tree/js-ipfs)

https://github.com/ipfs/paperhub

https://github.com/haadcode/orbit-db

https://github.com/haadcode/proto2

Re: Serverless Sync in Web Apps Using Bit Torrent

#45
The app is quite interesting and I was amazed until I realized the play button doesn't display the circular progress indicator on time. It has an ugly lag. This is why web apps are not quite there yet. And yet it is amazing they can record, store and sync audio like that. Almost like real apps.

Re: Serverless Sync in Web Apps Using Bit Torrent

#46
post #45

The app is quite interesting and I was amazed until I realized the play button doesn't display the circular progress indicator on time. It has an ugly lag. This is why web apps are not quite there yet. And yet it is amazing they can record, store and sync audio like that. Almost like real apps.

That is me being lazy and showing a demo/concept experience, not because the web platform can't do this.

Re: Serverless Sync in Web Apps Using Bit Torrent

#47
post #42

If there wasn't a 'cloud' in the picture how seeding is done I'd even believe it's serverless. Sorry for being a cynic, but what if there is no tracker available?

It's a very fair point, I chose the word serverless to imply no traditional back-end. One extension that I am looking forward to seeing is the use of DHT in to the WebTorrent that (at least in my head) can eliminate the need for trackers.

The important point in my head is that I can distribute audio files to anyone who is seeding client-to-client rather than pass through a traditional server that I would host.

Re: Serverless Sync in Web Apps Using Bit Torrent

#49

Earlier quoted context omitted.

Seems js-ipfs[0] is not quite ready for prime time (though it's close) and the author had a requirement to do everything from a browser. https://github.com/ipfs/js-ipfs/

Unfortunately it looks like WebRTC support and DHT support isn't planned for this current release of js-ipfs according to their roadmap [1], both of which could be a giant leap forward in enabling truly decentralized apps. Bittorrent DHT doesn't actually run in the browser yet either [2], so WebTorrent in the browser currently only has access to the tracker infrastructure, and thus isn't as decentralized as one might…

Hi! (Another IPFS dev here :))

IPFS supports today WebRTC, TCP, uTP and WebSockets, thanks to the multi transport approach libp2p[0] offers. In fact, that is how Orbit works, a chat app build completely in JS, using IPFS, on the browser without any plugins. Check:

- http://orbit.libp2p.io/ - https://github.com/haadcode/orbit

The js-ipfs DHT is underdevelopment, in fact, we have an implementation, but it is not compatible with go-ipfs so we are not rolling it out, yet.

To check the latest updates on the project and learn whats next, check our log https://github.com/ipfs/js-ipfs/issues/30#issuecomment-22604...

[0] - libp2p is the network stack of IPFS, also a standalone project https://github.com/ipfs/specs/tree/master/libp2p

Re: Serverless Sync in Web Apps Using Bit Torrent

#50

Earlier quoted context omitted.

From what you've described, it seems like i2p would satisfy the requirements of your first paragraph and Freenet would satisfy the requirements of the second. Both of these networks have been around for over a decade, so they're not as in vogue as newer projects.

I have only slightly looked at i2p, but sadly appears the only impl requires a JVM. I have researched freenet and it does not appear to provide plausible deniability for public data (sorry on mobile and can't link easily).

If you feel brave, you could try the C++ implementation of the i2p router, purplei2p[1] (aka i2pd[2]). Last time I tried, there were a few rough edges, but it is now over two years old, so it has probably improved (or you may even improve it yourself!).

[1] https://purplei2p.github.io/ [2] https://github.com/PurpleI2P/i2pd

Post reply on HN