Swarm and IPFS

Before looking at how we can make use of each of the two alternatives for decentralized storage in detail, we'll first briefly look at their main similarities and differences.

The aim of each project is to provide both a general decentralized storage layer and a content delivery protocol. To do so, both technologies use peer-to-peer networks composed of client nodes, which are able to store and retrieve content. The files that are stored on each of the platforms are addressed by the hashes of their content.

A result of being able to store files is that both IPFS and Swarm are able to store and serve the HTML, CSS, and JavaScript of applications built on top of them, and can therefore take the place of traditional server backends.

For files that are too large to be stored whole, both projects offer a model whereby larger files can be served in chunks, much the same as in the BitTorrent protocol. One of the main issues with the BitTorrent protocol is that users are not incentivized to host, or seed, content, creating a one-sided system in which many downloaders feed from a few hosts.

To mitigate similar issues, IPFS and Swarm are able to incentivize users to run clients by way of monetary rewards. For Swarm, the incentives are built in, as Swarm must be run in conjunction with an Ethereum Geth client.

For IPFS, a separate incentive layer must be applied, in the form of Filecoin (see http://filecoin.io).

Although the two platforms are similar in many ways, there are also differences. Firstly—and perhaps most importantly, from the perspective of a developer—the IPFS project is more mature, and has a higher level of adoption, despite Swarm's more integral position in the Ethereum ecosystem.

Further differences mainly involve the technologies from which each platform is built. For example, Swarm uses a content-addressed chunkstore, rather than the distributed hash table (DHT) used by IPFS. A further example is that, due to its close association with the rest of the Ethereum stack, Swarm is able to make use of Ethereum's DevP2P protocol (https://github.com/ethereum/wiki/wiki/%C3%90%CE%9EVp2p-Wire-Protocol), whereas IPFS uses the more generic libp2p network layer (https://github.com/libp2p).

For the purposes of our discussion, these comparisons should be sufficient. A much more detailed comparison can be found online, at https://github.com/ethersphere/go-ethereum/wiki/IPFS-&-SWARM.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset