Skip to content

Comment on Using BitTorrent with Amazon S3

Comments

I'm currently using this to build a decentralized distribution system to ship relatively big database files to iOS clients without having to go through S3 all the time. It works quite well but some providers throttle the bittorrent traffic (or worse, throw in RST packets) so I'm not sure how well this will work in practice. Also note that the S3 default seeders only upload at around 80kb/s, so you'll always need at least one external seed to get good performance.

May I ask how you're doing torrent on iOS? The reason for my interest is that I recently ported ipfs (http://ipfs.io) to iOS and am interested in any experience you've had with running these styles of protocols on iOS clients in the field ..

It's just libtorrent packaged up as iOS8 framework + a convenience API, available here: https://bitbucket.org/jberkel/torrada. Still WIP and not used in a production app, but hopefully soon.

It works well if you're on a non-throttled network and has support for local peer discovery which is great for testing (install from a local torrent seed, or another device). Apart from bandwidth saving it's also very convenient to let libtorrent handle consistency checks and resuming of transfers.

ipfs looks interesting, have you published your port?

Thanks for the details about torrada, I'll check it out!

Seems that for peer apps on mobile, we need to make it easy for the user to understand their bandwidth-usage - indeed in my testing I never run the app where I don't have solid, unlimited Wifi. For these classes of apps, I think the presentation of this problem to the user is going to be important.

ipfs port

Its more of a harness than a port - basically, its possible to use Go on iOS, and so I have a project set up to include Go, cross the bridge between Obj-C and Go runtimes, and so on .. and, then I've built a Go app with ipfs, running on iOS. There aren't any features yet - but the harness is done, so, TODO: write Go, use ipfs framework, interface with iOS-GUI normatives, etc.

When I get actual ipfs functionality coded, I'll put it up on a repo .. too much futzing around is required right now to see anything actually functioning.

Ah, I had a look at goios, I can imagine that it is a lot of work, the integration looks quite complicated and far from being finished, good luck.

About sharing bandwidth, was thinking about only enabling when the user is on wifi, but I think I'll use torrent more as a distributed mirror network than a "real" P2P system, which is difficult in a mobile context. People can easily "donate" bandwidth by seeding the data files needed for the app (using a separate torrent client though, not the app itself).

Actually, I got everything working, and can build and include an ipfs project in the iOS bundle .. I just don't have a UI to wire it up to the Go-side functionality. But in case you're interested you can have a look here:

https://github.com/seclorum/ios-go-ipfs.git

Might have to change a few paths in the build-script, but it'll give you an idea (if you're interested) how to go about building Go apps on iOS. Turns out its not that hard! :)

Sharing bandwidth

Yes, I see the same sort of conclusion from my perspective of wanting to put ipfs on iOS - its really only as a way of committing content to the mesh when the User wants to serve - i.e. idle times connected/charging on local Wifi .. I think my next step will be to wire up the camera and a few fields to be used to create a publishable set of content ..

Anyway, pull requests welcome!

RST should be easy to avoid by prefering UDP where possible, but in general i understand why ISPs would try to hamstring bittorrent with dramatic upstream overprovisioning that they've got.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.