IPFS (InterPlanetary File System)
The Revolution of Cloud Storage Technology
IPFS (InterPlanetary File System) is a distributed, new hypermedia transmission protocol based on content addressing. It aims to make the network faster, safer, and more open. IPFS is a distributed file system, and its goal is to connect all computing devices to the same file system, from becoming a global unified storage system. IPFS has a grand and crazy goal to supplement (or even replace) the hypertext transfer protocol (HTTP) that currently dominates the Internet, from becoming a new generation of Internet. Before we formally learn about IPFS, let’s look at the development history of storage methods.
History of the development of storage
If you look at the history of storage development, the various storage tools that have emerged to preserve information basically follow this evolutionary path: adapting to market needs, becoming more and more convenient and insensitive.
With the birth of the first computer, the world’s first storage device came out. Floppy disks became the earliest removable media for personal computers. People only need to copy the necessary files to the floppy disk and find a computer with a floppy drive installed, then can read the information.
However, with the emergence and rapid development of the Internet, inconvenient USB flash drives and other devices gradually cannot meet the requirements, and the revolutionary era of cloud storage has arrived. The storage of data and content began to be stored in an invisible way of cloud storage. Due to the ease of operation, cloud servers have begun to be used by many companies that have data storage needs, and the entire cloud storage industry has gradually developed. After more than ten years of development, cloud storage has evolved from a small market to a huge market.
However, cloud storage itself is a product that is highly service-dependent. As long as users use cloud storage services, there may be problems caused by social applications or online storage services, resulting in the loss of stored data. This also gave birth to the generation of distributed storage. On this road of exploration, the most noticeable is the storage project Filecoin developed based on IPFS (Interplanetary File System). It tries to stimulate the long-term operation of nodes through the three types of benefits of storage, retrieval and block rewards, and uses smart contracts to realize the blockchain on-chain and off-chain transaction markets and data transmission. Its idea is to store all content in machines distributed around the world, and provide retrieval and download when users need to view it.
What is IPFS？
The InterPlanetary File System (IPFS) is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. IPFS uses content-addressing to uniquely identify each file in a global namespace connecting all computing devices. IPFS was created by Juan Benet, who later founded Protocol Labs in May 2014.
Protocol Labs is "an open-source research, development, and deployment laboratory for blockchain technology" that "creates software systems that tackle significant challenges" and whose goal is to "make human existence orders of magnitude better through technology."
IPFS Technology Application and Principle
A subtle combination of HTTP transfer protocol, Git version control protocol and BitTorrent transfer protocol
In essence, IPFS is a file sharing and transfer protocol, such as HTTP Hypertext Transfer Protocol, which is one of the most successful and main transfer protocols on the modern Internet. However, unlike HTTP that follows the client-server model, IPFS is a distributed network of nodes that can both serve and request data. Compared with the HTTP protocol, IPFS realizes permanent storage of information without tampering and deletion, and resource sharing.
In order to achieve the above characteristics, the technical design route of IPFS integrates a variety of existing distributed systems and storage technologies, and innovates on this basis. The IPFS network has obtained attributes from previous distributed peer-to-peer systems, including Distributed Hash table, BitTorrent, Git and SFS.
- Distributed Hash Table: DHT is a distributed system used to store and retrieve the "hash value" or data associated with the key on the peer node network. Each hash corresponds to a different key, which provides the permissions required to access the hash. On DHT, all information is evenly distributed among nodes, and each node has an equal chance to be selected to store the hash value and key pair.
- BitTorrent: BitTorrent is a successful peer-to-peer file sharing protocol. In 2018, the agreement was responsible for 4.16% of global Internet traffic. IPFS uses BitTorrent's data exchange protocol to reward nodes that contribute resources and punish nodes that leak resources.
- Git: The version control system records changes to files over a period of time so that users can access specific versions at any time. Git implements a distributed version control system that enables a group of distributed contributors to track changes made to files by multiple parties. IPFS has implemented this control system on its protocol. On IPFS, data stored on the network is divided into multiple fragments, and these fragments are saved by nodes on the network. By implementing version control, IPFS ensures that these pieces are properly organized and file changes are properly updated.
- Self-certifying File System: SFS is a distributed file naming system. IPFS uses it in its Interplanetary Name System (IPNS). Using IPNS, users can generate verifiable addresses that link to IPFS content.
Economic model —— IPFS and Filecoin
Filecoin is an incentive layer running on IPFS. It is a distributed storage network based on blockchain. It turns cloud storage into an algorithmic market. Tokens (FIL) play a very important role here. Tokens are an intermediary bridge between communication resource users (storage and retrieval) (IPFS users) and resource providers (Filecoin miner). The Filecoin protocol has two trading markets-data retrieval and data storage. Both parties of the transaction submit their needs in the market and complete the transaction.
IPFS and Filecoin promote each other and jointly solve the problems of interconnected data storage and data distribution. Especially for countless blockchain projects, IPFS and Filecoin will exist as an infrastructure. This is why we see more and more blockchain projects adopting IPFS as a storage solution, because it provides a cheaper, safer, and quickly integrated storage solution.
Content addressing with IPFS
IPFS is great for getting started using content addressing for all sorts of distributed web applications. In the majority of these cases:
- Data is provided by the user's own nodes. Otherwise, must rely on other peers to voluntarily/altruistically storing data or on a centralized pinning service.
- Centralized IPFS pinning services must be trusted to do their job. IPFS brings no built-in provisions to verify that data is being stored and correctly provided by the pinning service.
- Popular content is more easily accessible. Popular content (with many providers) naturally becomes faster/easier to retrieve in IPFS, which is great when there are external incentives to sync and store data in multiple nodes, and for situation where strong social contracts can be used to ensure the content remains hosted and maintained long-term.
Data persistence with Filecoin
Filecoin builds on the content addressing of IPFS to add longer term data persistence using cryptoeconomic incentives. With Filecoin:
- Clients make storage deals with miners to store data. The network verifies that the miners are correctly storing the data. Small payments are made on a regular basis for the duration of the storage deal.
- Miners that do not honor the storage deal are penalized.
- Content retrieval might be offered by storage miners directly, or by specialized retrieval miners. The user requesting the data pays for this service.
- Filecoin excels at storing large amounts of data for long periods of time.
Audius is a music and audio sharing platform designed to provide artists a direct link with their listeners. Using decentralized technology, Audius is able to ensure artists’ rights to and control of their own music, and provide a censorship-resistant platform for expression and distribution of artistic works and compositions. To create a user-owned and operated platform, it was key to have a distributed cloud storage network as the basis for the system. Audius uses IPFS as the core decentralized storage component in their mission to give everyone the freedom to share, monetize and listen to any audio.
OpenBazaar is a peer-to-peer e-commerce platform where buyers and sellers can participate anonymously and privately without data collection by vendors or any other central authority. The OpenBazaar platform is developed by OB1.
IPFS serves as the content storage network for both OpenBazaar and Haven. On the network, merchants and buyers can each run storage nodes, eliminating the need for any central server. By using IPFS to create this collaborative network, OpenBazaar enables buyers and sellers to trade without the risks of centralized data collection or the threat of having their personal information hacked.
Morpheus.Network is a supply chain software-as-a-service (SaaS) platform that uses IPFS for reliable, distributed, verifiable storage and retrieval of international customs and shipping documentation. For shipping of goods across borders, it's critical — both functionally and legally — to have verifiable, consistently accessible documentation for every shipment. Morpheus.Network's usage of IPFS is a live, enterprise-level example of how IPFS can store and deliver documentation that stands up to the stringent requirements of international customs authorities.
Morpheus.Network uses a private network of IPFS document storage nodes, combined with event logging on the Ethereum blockchain, to ensure that shippers, authorities, and recipients can consistently retrieve shipment data, and to be assured that documents used in shipping transactions are verified, tamper-free originals. Since all goods shipped using Morpheus.Network's platform can be easily associated with the proper documentation, users can move shipments across borders with less friction and greater speed. And because all documentation is stored using IPFS, there's no central data clearinghouse holding (or potentially making vulnerable) sensitive shipping details, including financial info or other personally identifiable information.
The Value of IPFS
Compared with the HTTP protocol, IPFS realizes permanent storage of information without tampering and deletion, and resource sharing. IPFS does not store duplicate files through content addressing and saves storage space. At the same time, distributed features and encrypted storage allow the entire network to avoid single points of failure and provide better privacy and security.
HTTP is a fragile, highly centralized, inefficient, and overly dependent on the backbone network protocol. It has obvious shortcomings, such as:
- Highly vulnerable to attacks and high defense costs
- The download speed is slow and the storage cost is high
- The centralization of data also brings leakage risks
- Large-scale data storage, difficult to transmit and maintain, and easy to lose inside
In contrast, the advantages of IPFS are mainly reflected in four aspects:
Fast download speed, no longer rely on backbone network, centralized server.
The entire IPFS system is a distributed file storage system, similar to BitTorrent. When downloading related data, it will be downloaded from multiple nodes at the same time, which is much faster than HTTP downloading from a central server.
The storage cost is reduced.
Since IPFS uses blockchain technology, Filecoin is used to incentivize miners to share their own hard drives, and IFPS removes redundant storage from the entire network, future IPFS storage will become cheaper.
Centralized servers are currently difficult to withstand DDoS attacks, and huge traffic may cause server downtime at any time. IPFS is inherently capable of resisting such attacks, because all access will be distributed to different nodes.
IPFS for content addressing & data discovery, and Filecoin for longer-term persistence. To achieve this, services like Powergate back up data on the Filecoin network while also ensuring content is discoverable in the IPFS Public DHT. Data is constantly available and can be retrieved quickly, while also making sure that it is safely and verifiably backed up on the Filecoin network over time.
With the increasing storage capacity, users will definitely be willing to seek more economical and practical solutions. IPFS is open and inclusive, whether it is a large or small service provider or a leading data center, it can be connected to IPFS together and gathered together to provide a strong foundation for human information storage. All in all, the IPFS protocol must be an important form of distributed storage in the future. However, any changes will not happen overnight. In the short term, it is unlikely that decentralized storage will completely replace existing storage methods. In the long run, the IPFS protocol and new features have significant advantages over HTTP, and the trend of gradual integration of IPFS and HTTP protocol will be inevitable.