Live data from Hacker News

Serverless Sync in Web Apps Using Bit Torrent

paul.kinlan.me

31–40 of 57 posts

Re: Serverless Sync in Web Apps Using Bit Torrent

#32
post #11
post #10

Earlier quoted context omitted.

S3 can serve over the Bittorrent protocol though. In fact, there are several viable configurations to bridge between WebTorrent, Bittorrent, and S3. For example, you can have S3 directly serve over Bittorrent and use Amazon as a tracker; or you can have the HTTP URL to S3 serve as a BEP19 webseed, which is now supported in recent WebTorrent.

/me runs to learn more.

Check this: https://medium.com/@diegorbaquero/how-to-create-a-swarm-cdn-...

Re: Serverless Sync in Web Apps Using Bit Torrent

#33
post #12

So I only kind of understand magnet links. But it seems like I could create a Chrome plugin that took every page I visited and turned the assets into magnet links and started request/seeding them on pageload. Is that analogous to what they're doing?

You need access to the Blob data to seed that. You could get that by making HTTP requests to each of the resources on the page and then to seed that (however, as soon as you navigate away from the page there are no more seeders so the data is no longer available)

Well plugins are powerful things - I bet you could cache blobs in the browser for a bit as long as it was still open.

Re: Serverless Sync in Web Apps Using Bit Torrent

#34
post #15

Why not use IPFS, which is specifically designed for this sort of usage and will be more resilient?

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 think.

[1] https://github.com/ipfs/js-ipfs/blob/master/ROADMAP.md

[2] https://github.com/feross/webtorrent/issues/288

Re: Serverless Sync in Web Apps Using Bit Torrent

#35

Earlier quoted context omitted.

You mean something like this? :) https://zeronet.io/

Where is the anonymity? It is unreasonable to use TOR in my opinion because despite being only a few exit nodes, it's not truly P2P then (and therefore can be slow). Tribler tried something similar. Someone needs to build an onion router of peers without defined relays or exit nodes (think of it as everyone-is-a-relay TOR, it's one of my future ideas[0]). This will speed things up substantially and can definitely wor…

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.

Re: Serverless Sync in Web Apps Using Bit Torrent

#37
post #2

Neat use of web torrent. Now if only we could do it with live data instead of persistent data, have built in encryption, and anonymize the peers we'd have the perfect decentralized internet :-)

Feross is awesome, I've met him several times and WebTorrent is driving the future forward. I have a complementary Open Source project ( https://github.com/amark/gun ) for live data sync - it is already decentralized and anonymous by default (other than a session-ID). Adding encryption is pretty easy, now with WebCrypto! The future is looking exciting, between WebTorrent, IPFS, and other projects!

Against what threat models does Gun protect peer anonymity?

Re: Serverless Sync in Web Apps Using Bit Torrent

#38

Earlier quoted context omitted.

Where is the anonymity? It is unreasonable to use TOR in my opinion because despite being only a few exit nodes, it's not truly P2P then (and therefore can be slow). Tribler tried something similar. Someone needs to build an onion router of peers without defined relays or exit nodes (think of it as everyone-is-a-relay TOR, it's one of my future ideas[0]). This will speed things up substantially and can definitely wor…

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).

Re: Serverless Sync in Web Apps Using Bit Torrent

#39

Earlier quoted context omitted.

Feross is awesome, I've met him several times and WebTorrent is driving the future forward. I have a complementary Open Source project ( https://github.com/amark/gun ) for live data sync - it is already decentralized and anonymous by default (other than a session-ID). Adding encryption is pretty easy, now with WebCrypto! The future is looking exciting, between WebTorrent, IPFS, and other projects!

Against what threat models does Gun protect peer anonymity?

None in particular since you still have to connect to a traditional HTTP or WebSocket (although WebRTC is coming soon) servers. So if you connect to a malicious peer they can get your IP can get leaked. But the messaging algorithm is very ad-hoc mesh-networky and UDP-ish. At its core, messages only contain a message ID and a body, these are then daisy chained throughout the servers and clients (they're all peers). Meaning that just because a peer sent you something does not mean they are the originator. However, nothing stops peers from broadcasting their session ID or IP or X-Forwarded-For header. But the counter is also true, the messaging system still works even without that information - which if there are enough peers preserves anonymity. I of course should say the usual disclaimers that small peer groups can be attacked, and larger networks if you have enough intelligently placed peers you can probably calculate triangulation and stuff like that. When you get down to the actual "physics" of stuff, there are lots of tricks/hacks to break any network based on timing and patterns alone.

Re: Serverless Sync in Web Apps Using Bit Torrent

#40
post #25

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

I think these services would compliment a torrent solution, e.g. in a video hosting site web-api gives you the metadata (and perhaps the first 5 buffered seconds of the video), and torrent gives you the video.
Post reply on HN