Learn how to use IPFS to store data on the ultimate decentralised/distributed file system!
In this brief tutorial we will cover
Why IPFS is needed,
What it is, Who should use it
and How to get started!
Note: if you are already familiar with Internet History and IPFS, feel free to skim/skip and go straight to the "How?"
The Internet was designed to be decentralised network that could survive and continue functioning in the event of a natural or man-made disaster destroying part of the network.
While the Network is distributed and thus resilient to failure, the vast majority of content is still served by centralised servers. The founders/creators of the Interned designed the Network and protocols for routing requests across the network, but they did not create a means of distributing and serving content from multiple nodes.
Over the last 20 years we have seen a "winner takes all" accumulation of power and control on the Internet
From the earliest days of the World Wide Web, content hubs emerged as the default way people found information, created content and communicated online. Several of these hubs still exist in some form today (including AOL, Yahoo and MSN.com) however many others are confined to history (e.g: GeoCities, Lycos, Tripod.com & BBS).
After the "Dotcom Crash of 2001" came the resurgence of the web with "Web 2.0", a new era of web-based applications.
More recently new platforms for creating and sharing content have emerged in "Web 2.0"
https://en.wikipedia.org/wiki/Block_of_Wikipedia_in_Turkey
This tutorial will take you through the basics of creating content and publishing it on IPFS, but first we need a bit of background knowledge/recap.
In a centralised network there is a central node that controls communication between all nodes. A decentralised network is a series of interconnected hubs. If one hub goes down only the nodes connected to that hub will be affected, the rest of the network will still continue to function. The internet is an example of a decentralised network. It is resilient against failure of several hubs.
If the central node in a centralised network goes offline, all communication is disrupted. In a decentralised network, one "hub" can be offline and the rest of the network can still communicate.
A distributed network is the most resilient type or "topology". In a distributed network any single node can completely fail and the remaining nodes will still be able to communicate.
People on the bleeding edge who can deal with "changing spec", "breaking changes" or "bugs".
For now, your best "first lesson" is proto.school If you get "stuck" going through the examples, see: #5 (comment)
To install IPFS you can visit https://docs.ipfs.io/introduction/install/ or you can use one of the following scripts...
- curl https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_darwin-amd64.tar.gz --output go-ipfs.tar.gz
- tar xvfz go-ipfs.tar.gz
- cd go-ipfs
- sudo ./install.sh
- curl https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_linux-386.tar.gz --output go-ipfs.tar.gz
- tar xvfz go-ipfs.tar.gz
- cd go-ipfs
- sudo ./install.sh
This Linux script can be included in your .travis.yml
file if you need to
IPFS functions in your testing environment.
My biggest question regarding placing files on a distributed file system
which I have no control over is how do I DELETE
a file?
Read:
- https://www.reddit.com/r/dtube/comments/8zt165/wait_so_illegal_content_can_be_uploaded_and_never/
- https://news.ycombinator.com/item?id=16481112
When IPFS was first doing the rounds on Hacker News the slogan was "The Permanent Web".
This has been de-emphasized on the IPFS home page lately, but is still viewable on early press:
The question is: what if someone posts content onto IPFS
that they later want to DELETE
... how is that done?
And if it's not possible to delete content permanently (and reliably), is that at odds with the law? https://en.wikipedia.org/wiki/Right_to_be_forgotten
At present there is zero guarantee that files uploaded to the IPFS filesystem/network will still be there in a few weeks/months time when you need them. You are relying on the "benevolence" of the people running IPFS nodes on the network to host our data. Which as this forum thread notes is currently not reliable: https://discuss.ipfs.io/t/error-merkledag-not-found-lost-file/3279
The proposed solution to file storage guarantees is a micro payment system called FileCoin. https://filecoin.io
At present Protocol Labs has not started (implementation) work on FileCoin. However the team has written plenty of "foundational" code for the protocols that will be used by File Coin so it's "coming" ... but for now it's very much Vaporware.
If you want to understand how FileCoin is going to work read the "white paper": https://filecoin.io/filecoin.pdf
The analysis Filecoin doesn’t want you to read: https://tokeneconomy.co/the-analysis-filecoin-doesnt-want-you-to-read-e60d5243f17c
Related questions:
- How do I know that something I have uploaded will not disappear?
- Do I need to maintain an IPFS node for my content?
For example "DTube" uses IPFS and appears to be a promising distributed alternative to YouTube, but until the reliability of content storage is solved, it won't gain "mainstream" adoption.
LBRY ("library") https://lbry.io is suggested in the comment ...
Sadly, "LBRY" clearly state on their home page that the software can be used for sharing "Hollywood films" ... so while it might be a good (Non-IPFS) distributed file system, they are basically inviting a copyright infringement lawsuit!
- Internet Wikipedia article is great place to start your journey of understanding the Internet. The article is comprehensive and well-maintained: https://en.wikipedia.org/wiki/Internet ... the beauty of reading the Wikipedia article is that whenever you don't understand a term, you can click or search for it's definition on the web. If you're reading this offline, you know exactly why the distributed web is necessary!
- Internet history: https://en.wikipedia.org/wiki/History_of_the_Internet
- History of the World Wide Web: https://en.wikipedia.org/wiki/History_of_the_World_Wide_Web
- Good Summary of IPFS, IPLD and FileCoin: https://achainofblocks.com/2018/10/05/ipfs-interplanetary-file-system-simply-explained/
- Introducing Cloudflare’s IPFS Gateway:
https://blog.cloudflare.com/distributed-web-gateway/
- Discussion thread: https://news.ycombinator.com/item?id=18005488
- A Beginner’s Guide to IPFS: https://hackernoon.com/a-beginners-guide-to-ipfs-20673fedd3f (good overview, but not practical)
- Stanford Seminar - IPFS and the Permanent Web (Juan Benet co-founder of Protocol Labs): https://youtu.be/HUVmypx9HGI
- IPFS - Simply Explained (Savjee): https://youtu.be/5Uj6uR3fp-U
- IPFS - A revolution in file storage and distribution (DataDash): https://youtu.be/i5Obv_BTjv0 (non-technical explanation)