7 ms·
This is the #1 thing I see people confused about with IPFS. Basically, there's 3 ways for content to become available: 1. You add the files to your own node. T
by wolfgang42 9y ago
This is the #1 thing I see people confused about with IPFS. Basically, there's 3 ways for content to become available:
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.
- robto 9y agoIn this case, it appears the node is in your browser, right? Does it go away when you close your tab? In which case your link will survive for 30 minutes, or is it just gone?
- wolfgang42 9y agoIt looks like ipfs-dropzone is running an in-browser node, which would go away as soon as you close the tab (since it's just a web page like any other). Content on IPFS stays available for as long as there's at least one node which has it and is connected to the network, so how long the link would survive for depends on whether other nodes have it and how long they will keep it for. If nothing else has downloaded the content then it will go away; on the other hand, if someone has pinned it then it will stay forever (or until they unpin it or go away). 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.
- roland-s 9y agoMan, I typed a whole reply saying basically the same thing but you beat me to it! To expand a bit further, in this demo app, the "Save" button calls an API of a pinning service (Eternum), which pins the file on an external node so it will stay there as long as it's being paid for. Right now most pinning services require that you pay them to host your file, but the plan for IPFS is to use something like Filecoin to incentivize pinning. With Filecoin, instead of paying a single service to host your content, you would put out an order to the Filecoin network which says "anyone who hosts my file gets $x per GB per second", along with some settings (e.g. I want minimum 5x copies of my file on the network). Then, anyone hosting a Filecoin node will automatically fulfill requests by hosting content in exchange for a cryptocurrency payout. So, instead of a single hosting service, you are paying the entire network to automatically host your file in many places at once.
- bringtheaction 9y agoWait, I thought IPFS was P2P. What's this with the payment stuff?
- prophesi 9y agoTo compare it with torrenting: The only incentives to "seed" a torrent file is usually just good will, or to build a reputation to get into invite-only sites. We lose the latter incentive with IPFS, and so Filecoin is replaced as the new incentive to give up storage space for the P2P network. You can still put your content up on IPFS for free, it's just that only your IPFS node will be hosting the content, and thereby won't be truly decentralized. You're the only "seeder", so to speak.
- bringtheaction 9y agoThanks. I went to the Filecoin site to see more but it said the same has ended and to not fall for scam sites. How do I obtain filecoin? When will I be able to earn filecoin from hosting content for others? Is hosting content the way that it is mined? Or is mining it something else?
- zeta0134 9y agoIt depends on the setup; if you're running go-ipfs, the node is a program that runs on your computer and becomes available in your browser, either through its IP address (yours, optionally public with proper network setup) or through the ipfs.io domain, which access the entire network and can pull from any node that's connected, which includes your own. 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.
- toomuchtodo 9y agoAny recommended pinning services? It'd be swank if all CDNs supported this functionality, but in the interim...
- StavrosK 9y agoI can recommend https://www.eternum.io https://www.eternum.io, because it's the best (also I built it, so I'd know).
- toomuchtodo 9y agoWin win, as I'm a huge fan of your work.
- StavrosK 9y ago<3
- sharemywin 9y agois there a group pinning option for individual files in case $.15 per gig per month is too expensive...
- StavrosK 9y agoHow do you mean? The price is for your whole account, not individual files. Plus, too expensive compared to what? :P
- sharemywin 9y agosay ten people wanted to pin the same gigabyte file they could pay .015 instead of .15
- StavrosK 9y agoOh, right. I don't see how this could realistically work for a service like Eternum, since there's no way to know how much data the IPFS node is actually using for a hash at any time. Can these ten people not just share a single Eternum account?
- amelius 9y agoWhat prevents someone from changing that 30 minutes into 0 minutes? Iow, what do they gain by not doing this?
- placeybordeaux 9y agoThey only lose the caching effect.
- amelius 9y agoHow can ipfs thrive then, without an incentive to seed?
- wolfgang42 9y agoWell, even if nobody else seeds you're still no worse off than you would be with just an HTTP server. At present the main incentive is generosity, which works pretty well for a lot of things; for example a lot of people started pinning the Turkish Wikipedia mirror when it was announced purely as a stand against censorship. In addition, you can also pay a pinning service. In the longer run the IPFS developers are also working on Filecoin, which is a cryptocurrency that adds a payments layer on top of IPFS so you can pay to have someone else serve your content.
- Fnoord 9y agoEthical/moral interest in the content, for one (wolfgang42 gave an example of that). That's a pretty small market though. 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?
- bringtheaction 9y agoHow do others here feel about IPFS compared to systems that charge tokens for similar functionality? Personally I believe IPFS to be far superior. BitTorrent has already shown that P2P works great. We don't need tokens for this.
- wolfgang42 9y agoI think it makes the most sense to put tokens as a separate layer on top of the raw storage/communication layer. (If I understand correctly, this is what Filecoin is intended to do.) The same content may be stored and served by both donated and charged-for nodes cooperating. 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.
- pythonaut_16 9y agoIs there an nginx/Apache equivalent that can be used for hosting one's own content? 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?
- wolfgang42 9y agoI wish there was an easy way to just point it at a folder, but at the moment it seems that you have to manually handle adding the content. If anyone knows of such a solution I'd love to hear about it. 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.
- pythonaut_16 9y agoYou could probably write a script to add content from a folder, maybe as part of the deploy process? 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.
- AgentME 9y agoYou can add a folder.
- yjftsjthsd-h 9y agoBut you still have to do so, either by hand or script.
- AgentME 9y ago