IPFS: The Future of Internet and Document Management

IPFS - Future of Document Management

I sometimes hope to get time to rest and absorb new tendencies, but unfortunately the pace with which technology evolves today keeps rocketing so no time for a break; as Innovation Lead at Xpertdoc, I need to be prepared.

A notable innovation which I want to talk about is IPFS – InterPlanetary File System – as a potential replacement for the current Internet and more. If we look at our Internet which has been going on for quite some years now, we immediately notice its biggest shortcoming: its location-based nature where information is centrally managed by servers that can fail or be overloaded, where the governments can easily enforce censure.

As an alternative, IPFS is content-based, meaning that objects such as files are given a unique reference by using their content to calculate a so-called “hash value”. Files are referred to using the hash and it doesn’t matter where exactly the data is located. The system is built on existing proven concepts:

  • Distributed hash tables, like a distributed ledger on blockchain, where key/value records link hash values ​​to peer locations.
  • BitTorrent as a peer-to-peer protocol for storing data on nodes within a large network, and ensuring that data supply and demand are optimal.
  • Git for data authorization and version management.
  • Self-certified file system to build a large file system on top of all participating nodes with a universal way of addressing.
  • Merkle trees to segment messages and objects and ensure reliability of data exchange.

Let us look at a possible scenario for Xpertdoc, where we use IPFS as a kind of document management system. In Europe, the protection of personal data through GDPR requires the signature of a processing agreement between the controller and the processor. Xpertdoc, a provider of document generation solutions that process personal customer data, has prepared an agreement template for this purpose. Every customer or partner is invited to complete the document and return it for signature.

Suppose we use IPFS, how do we proceed? First, we must be part of the network of nodes. This can be done by installing the required software from ipfs.io, for example on a docker image hosted in Microsoft Azure. After installation we initiate our node and start a daemon to connect.

In addition to the command line option, the solution has a number of web interfaces through which you can get information on status, files, peers, etc. For example, the interface below shows how big the network you are connected to is. In our case, the network counts 772 peers.

Now that we are part of the network, we can start writing our agreement. We use Microsoft Word and security options to prevent unauthorized opening/editing.

Once the document is saved, it is ready to be added to the IPFS file system. We can do this technically via program code, as in the example below where we used the .NET toolkit.

But it is much easier to do this manually via IPFS’ web interface.

Each node has its personal file system, completely separated from the operating system, in which you can create folders and add objects. Creating folders and adding objects result in a certain state; hash values are used to represent this state. The hash value of a parent folder at a specific moment is also directly linked to the content. It is therefore possible to use the hash value of a folder in combination with the names of sub-folders and files. State is immutable and traceable.

The image above shows that the root folder of our node currently has a hash value ending with “T1”. The value of the hash can be retrieved via the menu option “Copy Hash”.

As mentioned earlier, we can use the hash value to make a link to the document; this link is then included in an email to our customers and partners. By using a so-called “gateway”, anyone who is not part of the IPFS network can retrieve files. The most used gateway is https://ipfs.io/ipfs.

If we remove the name of the document from the link, this allows us to pass a folder structure that includes additional content like a presentation or a marketing brochure.

We can send the link to multiple customers and partners; each recipient can download the document, modify it locally, and send it back via email. Here, the downside is that the link will always refer to a certain version of the document (“DPA.docx” file) and that the folder will only show the additional content (“xpertdoc.com-The Power of Better Documents Faster.pdf” brochure). What we want is to be able to update the document, prevent the use of any old version, and add new content to the folder as needed.

Luckily, IPFS meets us here with IPNS (InterPlanetary Name System), which can be used to build a site reference per node and where objects you want to link to this site reference can be specified via a publishing instruction.

Our instruction is “ipfs name publish {hash to object or folder}” and can be used as often as desired.

This instruction uses the hash ending with “FPD” as a reference object (folder/file). The site id is the return value ending with “aZc”.

IPNS is distinct from the original IPFS address; both can be used alongside each other. That is why the addressing using IPNS is slightly different from our first method. Specifically, a site reference can be called via https://ipfs.io/ipns/{site hash}.

It is also possible to convert the site hash to a more readable name via a DNS record such as https://xpertdoc.com/documents/.

In the image below, the result looks similar to what we previously showed, except that there is now more updating possibilities.

And again below, the proof that a site can suddenly point to something very different without sub-folder, that is, a plain json file.

Of course, this is just an example. IPFS is a powerful innovation that we will definitely continue to hear about. Four years after its introduction, there are still big challenges to overcome; everything revolves around the number of participating nodes and the associated reliable storage. Perhaps the initiative of filecoin.io provides a solution for storage space that can be offered via blockchain technology for a small fee.

Worth following…

For more insights on new technologies and innovations, follow us on Twitter: @xpertdoc, @vvdlinden

Share
Facebook
LinkedIn
Twitter
Google+
Pinterest