Skip to content
Dave Whiffin edited this page Jan 20, 2020 · 1 revision

Why IPFS?

https://docs-beta.ipfs.io/concepts/what-is-ipfs/

IPFS is a distributed system for storing and accessing files, websites, applications, and data.

When selling the same products which are sold in other shops it makes sense to have a common location to store product metadata and images. Different shops could share this instead of hosting their own. IPFS provides a decentralised solution so that the data is more available and reliable (see link above for more on IPFS).

For instance: If you were sold a product and it turns out that it does not do what you were told, you may need to refer back to that original product information for proof. If the information was hosted on a typical web URL, the content may well have been changed since you saw it and therefore your proof might be gone. IPFS addresses are created from the content. If the content has been changed then the address is different. Providing you have the Ipfs address to the original content it can not have been changed and therefore you can safely reference it into the future.

Pinning

See https://docs.ipfs.io/guides/concepts/pinning/.

IPFS nodes treat the data they store like a cache, meaning that there is no guarantee that the data will continue to be stored. Pinning a CID tells an IPFS server that the data is important and mustn’t be thrown away.

As a POC for the shop we were considering a book shop. Whilst importing books as prospective products for the shop we need to make sure the images for the books are permanently available, therefore we pin them.

Ipfs Libraries

Within Nethereum we have used two good .Net libraries for Ipfs.

** Ipfs.Http.Client ** (the one we're using here) https://github.com/richardschneider/net-ipfs-http-client

Richard Schneider's library was chosen for the eShop as an older version of his library had already been used within another sample project. The library is well documented and current.

** net-ipfs-api ** https://github.com/jeremy-ellis-tech/net-ipfs-http-client

Jeremy Ellis's library has been used successfully in other older Nethereum samples.