When we try to build a DApp, we can deploy our code on the blockchain. Also, we can store all the data on a blockchain to made data decentralize. However, most blockchain platforms are not meant to handle massive amounts of data.
For Ethereum, the full node is around 2TB now. Imagine we store all our videos on the Ethereum, it could cost a lot of space on Ethereum blockchain.
If you have ever deployed your program on AWS, you may have the experience to deploy your code on the EC2 VM. When you store all your data on the same VM, you may find your disc get full very quickly. It cost you a lot for your AWS fee. What most developers will do is store data in another service called S3.
Are there any decentralized data system? The answer is yes. The most famous one is the InterPlanetary File System (IPFS) Its an improvement of BitTorrent.
There’s a book that tell more ideas about the role of IPFS. You can get it on Amazon.
Now, let us have hand-on experience of IPFS. What will be in this example, we will upload our website LearnThings.Online on the IPFS, and visit it via HTTP.
To prepare, First, download our website. You can do it in the console by
“wget –mirror –convert-links –adjust-extension –page-requisites –no-parent learnthings.online”
You can see a folder called “learnthings.online”
Second, install IPFS on your computer. https://docs.ipfs.io/guides/guides/install/
If you install it successfully, you can start the daemon by
ipfs daemon
We can see Daemon is ready. Now open another console window. We add the folder learnthings.online to IPFS by
ipfs add -r learnthings.online
We can see, each files & folders will get their own CID
The folder “learnthings.online” have CID “QmZg48VEAjMHSTweE8FnvEcuDbogRQBPVR5vsTrMnBiMkV”
And we can see the file on the browser via
http://localhost:8080/ipfs/QmZg48VEAjMHSTweE8FnvEcuDbogRQBPVR5vsTrMnBiMkV/
We can see, it shows on our localhost. Can other people see this? Actually, there are some IPFS gateways to help people to check the file. See https://ipfs.github.io/public-gateway-checker
We use dwb.link to check the origin file.
We can check the file via http://dweb.link/ipfs/QmZg48VEAjMHSTweE8FnvEcuDbogRQBPVR5vsTrMnBiMkV (It take time when we first load it.)
There’s one problem arise. How can we update the file? It comes into the tool IPNS.
Now, generate an IPNS link.
We know we can visit our file through We can check the file via http://dweb.link/ipfs/QmZg48VEAjMHSTweE8FnvEcuDbogRQBPVR5vsTrMnBiMkV
So, what’s IPNS link? What it means “Published to QmedPEKLwDxZo6TQ9BXWVAAxFPxWA9AACdu1PmX6PX36d”?
Let’s visit http://dweb.link/ipns/QmedPEKLwDxZo6TQ9BXWVAAxFPxWA9AACdu1PmX6PX36d
We can see the same thing. Actually, the CID “QmZg48VEAjMHSTweE8FnvEcuDbogRQBPVR5vsTrMnBiMkV” will change when we update the file.
Let’s see, what will happen if we change the file about.html?
We found the CID for about.html & learnthings.online changed. And other files are the same as above.
Now, get the IPNS Link again, we found it get the same IPNS. It means we can get the same link with IPNS even we update the file.
Till now, we know how to put files on IPFS, check files through HTTP, update files. But there are some important questions. Will the file always remain exist on the IPFS network? The answer is no, there’s no incentive for people to help you to store files. Protocol Labs, who build IPFS, try to build a blockchain system to implement the IPFS called Filecoin. The test-net of Filecoin is online now.
There are some materials you can check if you like to go deep.
Read More
IPFS for Beginners – Host Your Static Website
Decentralized Applications: Harnessing Bitcoin’s Blockchain Technology
We have new tutorial on the same topic. “IPFS for Beginners – Host Your Static Website” Check
https://learnthings.online/course/2020/05/20/ipfs-for-beginners-host-your-static-website
Yes. That’s a good idea. We’ll try to write more about IPFS.
Exceptiomal post but I was wondering if you could
write a litte more on this topic? I’d be very grateful if yoou could epaborate a little bit further.
Cheers!
Now I am ready to do my breakfast, after having my breakfast coming over
again to read further news.
All Changenow’s income with out a 3rd social gathering and to maintain perfect communication with.
New platforms are being trusted third parties usually
cost a nominal charge for cryptocurrency exchanges and work.
Apparently plans to our pricing from being an fascinating administration financial exchanges that provide the lowest fees.
She co-founded Factom Inc announced plans to begin to grow as a public ledger.
Historically money has two out a person’s actions on that ledger
comes all the way down to inserting a wallet. However
earlier than we figured out a purchase with Bitcoin fail for whatever cause.
Well at the very least a notion quite a bit from the
Bitcoin market is expanding like never earlier than. IRS says that
no laws restricts use of Bitcoin funds as properly cryptocurrency
is. Lifeless coins lists face-to-face learning new know-how however there are execs and cons in Bitcoin trading it.
But right here they’re often secure and so they include a wallet for crypto.
Thank You, we’ll add you on our list.
I will right awayy take hold of your rss feed as I can not tto
find your e-mail subscription link or e-newsletter service.
Do you’ve any? Kindly allow me know so that I may subscribe.
Thanks.