The three core engineering modules of IPFS

The three core engineering modules of IPFS

Professionalism and focus, win-win cooperation
The purpose of learning is to improve your cognition, and the purpose of improving cognition is to make the right choices. The right choices will not make you waste your life and money, but will enrich your life and achieve wealth growth.

 
As a distributed hypermedia transmission protocol, IPFS has three extremely important engineering module libraries among its many features, which almost complete many features of IPFS. Today, Lingdong Community will tell you what Multiformat, Libp2p and IPLD are respectively?
 
It is worth noting that these three module libraries are designed as a lightly coupled stack model, that is, the modules cooperate with each other while ensuring a certain degree of independence.

As I told you before, IPFS and Filecoin can complement and enrich each other, while also being able to develop independently.
 

Multi-Format
Self-describing format protocol library

Multi, as a prefix of English words, means many or variety, while Format means format or formatting.

As a self-describing format protocol component in IPFS, Multi-Format was created to solve the problem of difficulty in distinguishing various programming languages ​​and data types in detail. Multi-Format can improve the readability of data. Currently, Multi-Format supports five protocols:

  • Multi-Hash

  • multi-Base

  • multi-Addr

  • multi-Codec

  • multi-Stream


①Multi-Hash self-describing hash protocol

Its purpose is to solve many troubles in dealing with hash algorithms during system upgrades, such as prompting users that certain hash values ​​are unsafe, simplifying hash algorithm updates, and not requiring additional tools to check hashes. In short, it makes hash algorithms more secure.


②Multi-Base self-describing basic compilation protocol

It is used to save data and describe how the data is encoded. Because it can freely choose the encoding type of input and output, it can reduce the complexity of developing code.


③Multi-Addr Self-Describing Network Address Protocol

In order to add self-describing information to the address data, two versions are included: one is the readable UDF-8 encoding, which is used to display the address to users; the other is the hexadecimal version that is convenient for network transmission.


④Multi-Codec self-describing serialization protocol

A codec that allows the database to be more compact and self-describing. It can define multiple information types and is compatible with other protocols.


⑤Multi-Stream self-describing coding stream protocol
A bit string used to implement self-description, mainly used in network transmission.
 

Libp2p
P2P network protocol module library

Lib as a prefix means "library", and p2p stands for peer to peer, that is, point-to-point, person to person.

Libp2p is a network communication library that can help us connect various device nodes. To put it bluntly, it can connect any two nodes no matter where they are, in what environment, running what operating system, or whether they are behind NAT.

As long as they can be physically connected, Libp2p will help you complete the connection. Moreover, Lib2p2 itself is a tool library. Doesn’t it feel powerful?

Why is Libp2p so important?

Because when IPFS was first developed, the official encountered a large number of heterogeneous devices, and these devices ran different operating systems, hardware, and network environments.

In order to have a robust network layer software infrastructure for the operation of IPFS and Filecoin, Libp2p was born, shouldering the important mission of heterogeneous unification.

We can see this from some of the features of Libp2p, such as link reuse, NAT traversal (especially in China), ID exchange, DHT discovery, relay function, RTT statistics, etc.

Libp2p is a multi-module, easily extensible network stack library designed specifically for P2P applications. It is mainly used in the Internet of Things, blockchain, distributed messaging and file transfer.

So Libp2p is not a blockchain, and IPFS itself is not a blockchain project. Filecoin is the blockchain project. This must be made clear.
 

IPLD
Data structure model library

IPLD is an abstract layer based on the content-addressed data model. Since many network systems are incompatible with each other and cannot work together, IPLD aims to achieve cross-system and protocol references and unify such data structures.

To put it simply, in the past, when you searched for certain information, you had a path address.

For example, when you send a courier, you need to write No. ZZZ, Unit 3, Building 3, YY Community, XX Street, Chaoyang District, Beijing. But with IPLD, you don’t need to write your name directly, and that’s it. Is it that simple? !

It has a feature called Content Identifier (CID), which is a self-describing content addressing identifier that uses hashing to implement content addressing.

Each CIDv1 consists of 4 parts: the multibase type prefix code, the cid version number, the multicodec content identifier and the complete multihash.

So, writing just a name as mentioned above actually includes the above four types of information.

The difference between IPFS and HTTP lies here. Based on content addressing, when you search for something on the Internet, each item has a complete network address path starting with HTTP, but with IPFS, it directly searches for content.

"Key component is replace Location Addressing(URLs) with Content Addressing (CID URLs)"

The general idea is to use content-based addressing instead of path-based (location) addressing, which is one of the reasons why IPFS is considered to be able to obtain HTTP.
 

To sum up

  • Multiformat is designed to make various programming languages, hash algorithms, and encoding methods compatible with each other on IPFS.


  • Libp2p is designed to completely separate the network layer file transfer and communication required by IPFS.


  • IPLD is designed to connect various content-addressed data structures.




So, if you still don't understand something, go back to the beginning of the article and read it again.
 




<<:  Filecoin Interpretation | Please give it enough time and patience

>>:  Clearing 2.5 million SUSHI, Sushi founder says he will focus on technology development

Recommend

The face of a woman you must not marry

The face of a woman you must not marry Nowadays g...

Triangular lines on the palm

The lines on our palms are complex and varied, an...

What kind of face is lazy?

There are all kinds of people in this world. Just...

A man was cheated of 10 bitcoins by a fake Musk and lost $750,000

A German man was scammed out of 10 Bitcoins — cur...

Why blockchain deserves attention: Non-financial uses of blockchain technology

Artificial intelligence, robotics, 3D printing, b...

What are the facial features of a naturally strong and powerful woman?

If a type of woman is naturally strong, then she ...

You won't be happy if you marry a greedy and lustful man.

If a man is greedy for money and lustful at the s...

What does a birthmark on the leg indicate?

There are many types of birthmarks, also known as...

Marriage line with wealthy people

Marriage line with wealthy people A short line fr...

In 2018, a new MLM coin was created every two days on average!

The original intention of the blockchain was to c...

Different nose shapes lead to different fortunes

The nose represents the "Palace of Wealth&qu...

Is it good to have double wisdom lines? How is your career luck?

The wisdom line symbolizes a person's brain a...