by wolfgang42 · 8y ago · 0 comments
1. You add the files to your own node. This is how content gets added, but obviously it only lasts as long as your node is connected to the Internet, just like an ordinary HTTP server.
2. Someone views your content using their node. This causes their node to cache the content temporarily (IIRC for 30 minutes by default) and publish it to other nodes. In theory, if your content got at least one view every half hour it could live on in the users' caches forever.
3. Someone tells their node to pin your content. The node will then keep it permanently (until they unpin it) and serve it whenever it's connected to the Internet. Generally they would do this if they believe it's valuable--either because they want to keep it themselves, or as a public service to make it available to others (for example, pinning the Turkish Wikipedia to help evade censorship).
There are also several pinning services, which you can pay to have them pin your content on their node, in much the same way as you'd pay a hosting provider to serve your content.
The 30 minute interval would apply to the IPFS gateway that someone else would use to download your content (generally a standalone process though I believe there are efforts to make a browser with an embedded gateway). IPFS nodes automatically publish their cache, effectively making an autoscaling distributed CDN. However they will only cache content that they have gotten on behalf of their user; they won't go out and pull random content from the network to host it.
That's just the Go implementation though, there's an implementation entirely in JavaScript, and it would be more than plausible to bake the service into a browser bundle so it works like you describe. However, I believe there's strength in separation personally. The acts of hosting an IPFS gateway, and accessing IPFS content through a gateway, are separate.
From what I've read I could just run the ipfs-daemon on my VPS/hosting server, but is there a user friendly way where I don't have to manually add every file everytime? How easy is it to host a web page with it?
How will does IPFS handle NAT? Could I host my own pinning server on a Raspberry Pi on my home network?
The IPFS daemon handles NAT in much the same way that BitTorrent does: NATed peers will dial out to un-NATed ones to establish a connection. I'm not sure if it also handles UPnP and the like to automatically forward ports if possible.
Either way, that was the most glaring shortcoming I saw in my brief foray into IPFS. There's lots of talk about pinning services and paying, not much talk about hosting your own pinning service, which was shocking to me since the idea of IPFS is to be decentralized, especially when most of the traditional bandwidth concerns of hosting your own content are mitigated by the P2P aspects.
Personally I believe IPFS to be far superior. BitTorrent has already shown that P2P works great. We don't need tokens for this.
For example, imagine someone has a blog, for which they've paid the network some number of tokens to host. I find one of their articles to be particularly useful, so I pin it on my own node (perhaps with a bandwidth limit if I don't want to get flooded should it become popular) and thus donate a small amount of hosting to the owner of the blog.
The other content could be academic and an alternative to information akin to the old Usenet (pre binaries) and things like Gopher and BBS.
The major demand for a system like this, I'd wager, is pirated content. That is, if its better than the current models. The two big models currently being used for piracy are:
1) Usenet/NZB
* Centralized. Only a handful large networks with long retention. Rest are resellers.
* Usenet servers adhere to DMCA; indexers generally don't
* Pseudonymous, potentially anonymous
* Doesn't require upload; provided quick download speeds
* Based on open source and open standards
* Pretty much requires payment for payserver & indexer
* Little bit rougher on resources due to PAR2 and quick downloading/unpacking of large files has I/O impact. Nothing huge on recent desktop systems.
* Requires a bit more software for everything to work though nowadays there are all in one packages doing the dirty work for you.
2) BitTorrent
* Decentralized.
* Not anonymous. Requires at least VPN, who likely log, even though they claim they don't.
* Free as in beer
* Requires upload
* Based on open source and open standards
* Self-hosted. Some indexers adhere to DMCA; generally they don't
* Private indexers ("trackers") have a reputation system requiring more than 1:1 download/upload.
* Doesn't work at all with DSLite (native IPv6 + IPv4 behind NAT).
* BitTorrent, like Usenet, also has abstraction software (full stack) to make life easier.
BitTorrent is far better known among the general public but I regard BitTorrent as a poor man's Usenet. If it ain't on Highwinds, it ain't anywhere (of course not completely true given DMCA but still, they got 3,3k days retention).
With Usenet you pay for a sub to a payserver & indexer, with BitTorrent you pay by uploading and VPN.
Now, my question is, where does IPFS belong in this list? Can it compete with these 2 technologies?