INTRODUCTION 

IPFS is a protocol, a peer-to-peer network, and a distributed file system. IPFS is an ambitious project which could potentially change the way the Internet operates. Comparing IPFS and HTTP helps you understand its basics. but to see how it compares to the Web, we have to understand its final goal.

Protocol Labs launched the IPFS project in 2015 to revolutionize global information transmission across the globe and lead to a more resilient, distributed web. In addition to disintermediating the music industry, IPFS is easing weather risk mitigation for agribusiness and improving information management for a wide range of industries. Among the projects Protocol Labs develops are IPFS, the modular protocols necessary to support it, and Filecoin, among others. They both serve thousands of organizations and millions of people.

The IPFS network operates as a distributed system that stores and serves data, websites, applications, and files. As IPFS (Internet File System) has rules that govern how data and content move across networks, IPFS is transport layer agnostic and can communicate using various transport protocols, including Transmission Control Protocol (TCP), uTP, UDT, QUIC, TOR, and even Bluetooth. This approach works similarly to Kademlia., An entirely client-side browser can completely run distributed websites with this file system layer.

Developers primarily build web applications using HTTP and HTTPS protocols.These application protocols are the applications through which you get access to data communication for your own use in the world. For example, if Emma goes to a website, like a content from Amazon Web Services, her Web browser is going to send her the content to the hosting server.

MORE TYPES OF SERVER

AWS hosts a large number of websites, but Their content doesn’t remain permanent because centralized servers maintain and control it. Additionally, a large portion of the Internet can be rendered unavailable if their server goes down for any reason.

The IPFS protocol, in contrast, allows for the creation of a permanent and distributed Web, in which any kind of digital content can be stored and shared. Whereas HTTP communications rely on a specific server to deliver content, IPFS communications incorporate the content itself.

IPFS allows Emma to ask the distributed network “who can provide me with this content?” instead of directly using the AWS server. Through IPFS, she will get a quick respond from the closest peers.

Depending on implementation, IPFS could have several advantages over HTTP including resistance to censorship, data integrity, reduced costs, improved performance and security. A cryptographic hash is like a fingerprint which uniquely identifies a file and its blocks.

Low incentives result in a small number of peers in the network, which is one limitation. Files may become inaccessible when only a few nodes remain active and those nodes go offline. Limited adoption makes it harder for files to be permanently available.

 How its Work

  • A cryptographic hash acts like a fingerprint that uniquely identifies a file and its blocks.

  • The IPFS protocol eliminates duplication across the p2p network.
  • In a network, each node stores information that is relevant to itself, plus some indexing information to help determine what is stored where.
  • The network must find the nodes storing the contents behind the hash of a file in order to display or download it.
  • Thankfully, you won’t have to remember the hash — IPNS is a decentralized system that lets you search for files by their human-readable names.

 

The IPFS Object model

An IPFS object is a data structure with two fields: the name and the location of the object. IPFS is a peer-to-peer system for retrieving and exchanging IPFS objects.

  • This is unstructured binary data of 256 kB size grouped into a blob.
  • There is an array of Links, which serve as links to other IPFS objects.

There are three data fields in a Link structure:

  • Name:  The Link’s name.
  • Hash: An IPFS linked object’s hash.
  • Size: Link size, including following its links, is the cumulative size of the linked IPFS object.

The blockchain

IPFS can be used to store these results in a distributed database. Blockchains are naturally structured in a DAG, as the hashing of old blocks is always linked to those of the present. Blockchains with more sophistication, like the Ethereum blockchain, have an associated state database that is modeled on the Merkle-Patricia tree structure and can also be emulated with IPFS objects.

The following data would appear in each block of a blockchain if it were simplified:

  1. A list of transaction objects
  2. A link to the previous block
  3. The hash of a state tree/database