IPFS - InterPlanetary File System
Introduction to IPFS
It was originally released in 2015, and is developed by Protocol Labs.
Location based addressing vs Content Addressing:
There are two approaches to how we can identify data. The first is location based addressing, and the second is content based addressing.
Location based addressing is how we identify data in Web2 on the centralized web
Content Addressing
It provides us a unique, content-based identifier for the data, which we can use to fetch the data from a variety of sources. Given the ISBN number, you can find it at a bookstore, on Amazon, as an eBook, or wherever you want.
what is IPFS and How it works ?
IPFS is a distributed system for storing and accessing files, websites, applications, and data.
How blockhain and IPFS and decentralized storage coreleated ?
when the image/file uploaded to IPFS -- > IPFS -> SHA256 (64 character hexadecimal string) -->And the hash of image is stored in Ethereum Blockchain
How IPFS network works ? Information from IPFS is retrieved through a process called content addressing. This means that instead of using a traditional URL or IP address to locate a file, IPFS uses the file's unique cryptographic hash as its address.
When a user wants to access a file on IPFS, they send a request to the network containing the file's hash. The request is then propagated through the network, and is routed to the closest peer that has the file. The peer then sends the file back to the user, along with the hashes of all of the blocks within it.
If the peer doesn't have the entire file, it can use the block hashes to find other peers that have the missing pieces and retrieve them. This allows for faster, more efficient retrieval of files, as well as increased fault tolerance and robustness.
Understanding differences - HTTP vs IPFS
HTTP uses Location based addressing uses location URL on server to retrieve the data , while IPFS uses content addressing
Whenever we upload to IPFS it gets stored in any one of the node system cache memory it will have garbage collection mechanism and it will periodically clean the cache memory.
Files on IPFS are content addressed, and each file is identified based on it's content hash. This content hash is referred to as a CID - a Content ID
. You will often hear the term "IPFS CID" when working with IPFS.
One important thing to note however is that data on IPFS is immutable, which means it cannot be updated. Since files are represented by their CIDs, those files cannot be modified after being uploaded. You can upload a new, modified version, but that version would have a different CID than the original due to the uniqueness property of hash functions.
IPFS providers : Running your own IPFS node may seem like a stretch. Similar to how not a lot of dApp builders run their own Ethereum nodes ,you can also use node providers for IPFS.
Eg: Pinata and Textile are some of the popular IPFS node providers. Similar to Ethereum node providers, you can create an account on these platforms to get access to an IPFS node to store and retrieve data stored on the network.
Subscribe to my newsletter
Read articles from Ashok Vanga directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Ashok Vanga
Ashok Vanga
Golang Developer and Blockchain certified professional