5 July 2018

By: Tony Marston, Director, Research & Development, Geoprise Technologies Licensing

Ever since I added blockchain capabilities into an ERP application (refer to Adding Blockchain to an ERP System for details) I have been monitoring the Internet to see how others are dealing with this opportunity, and I am quite amazed at what I have read. Some think that blockchain is nothing but Bitcoin, some don't understand how blockchain can be used outside the cryptocurrency field, some think that a blockchain database will replace the relational database, while others think that blockchain will totally replace an ERP system. This tells me that a lot of people are still in the dark about what blockchain is and how it can be used.

I recently had a conversation with someone from the academic world who thought that integrating blockchain into business applications such as ERP systems would involve nothing more than the transfer of financial data, and that conversation prompted me to write this article in the hope that I can shine a light into the darkness. I shall stick to high level facts and avoid the low level details.

What is blockchain?

Here is the most simple of definitions that excludes any techy buzzwords:

Blockchain is a tamper-proof system for logging messages chronologically. A message sent to one node in a blockchain network will be replicated across all nodes in that network.

Here are some deeper explanations:

  • A blockchain consists of a two or more nodes in a network. Less than two nodes would not constitute a network and would be pretty useless.
  • Blockchain software passes messages between nodes. In its most basic form, it does not generate messages nor process them, it just passes them around as if they were sealed packets. Additionally, some blockchains can process messages using logic contained in smart contracts which may be applied to those messages.
  • Each node has blockchain software and its associated data store, plus an external application (a separate piece of software) which handles the generation and processing of these messages.
  • When a message is sent to a node by this external application the blockchain software will add that message to its own data store, then send it to all the other nodes in that network who then add it to their copies of the data store.
  • There is no central copy of the blockchain data or central control of this data. The data store at each node is an exact duplicate of every other node’s data store.
  • There is some under-the-hood verification processing which causes each message to be authenticated before it is accepted as a valid message.
  • When a message is received at a node the blockchain software will send it to the external application which processes it as it sees fit.
  • The data store at each node is tamper-proof as it allows messages to be written and read, but never updated or deleted. This data store is actually a chain of blocks (hence the name ‘blockchain’) where each block of data has a unique key derived from the transactions it contains, and also the unique key of its predecessor on the chain. For this reason, new blocks can only ever be added to the end of the chain.

Aren’t Bitcoin and blockchain the same thing?

No. Bitcoin is an implementation of blockchain, but it is not the only implementation. It would be like saying “chalk is a rock, therefore all rocks are chalk”. Bitcoin, and all other cryptocurrencies, are distinguished by the contents of the messages that they pass between nodes, such as “Take X amount of funds from account Y and put it into account Z”.

There may be other implementations out there, but their capabilities will be limited by the structure of the messages that they send and receive.

What are the main types of blockchain?

Blockchains fall into two major categories:

  • Public, permissionless and untrusted

    Anyone can join without the need for an invitation and can send and receive messages immediately. The lack of trust requires that each message goes through a complex and expensive validation process. For Bitcoin and many other cryptocurrencies, validation or mining uses a proof of work protocol. Cryptocurrencies such as Bitcoin are prime examples of this type of blockchain.

  • Private, permissioned and trusted
    An organization creates a blockchain and invites other organizations to join that chain so that they can exchange information in the form of electronic documents. After joining they are given a set of permissions, such as being able to read messages but not send them. It is not possible for uninvited or unauthorized parties to break into the blockchain and read messages or send messages of their own. Due to these access restrictions the method of validating or ‘mining’ each new block can be far less expensive and time-consuming than a proof of work protocol. The product provided by MultiChain is an example of this type of blockchain.

Can blockchain be used for more than financial transactions?

Most certainly. A lot of people read the term distributed ledger in the description of blockchain and automatically associate the word “ledger” with an accounting system, which then leads them to believe that blockchain can only be used by accounting or financial systems. The correct term should be “distributed message store” as each node maintains its own copy of every message sent across that blockchain.

Notice that I did not use the term distributed database as the data store at each node is nowhere as sophisticated as a fully-fledged relational database (RDBMS). All it does is store packets of information without knowing the contents of each package.

Will a blockchain database replace a relational database?

Definitely not. A relational database holds data which is arranged into tables and columns with primary keys, unique keys, indexes and relationships. Its associated application allows particular pieces of information to be inserted, viewed and modified in sophisticated ways. A blockchain data store has no structure apart from a chain of blocks each of which holds a message. Each message holds a packet of data, but the structure of that data is unknown to the blockchain.

Will blockchain replace ERP applications?

Definitely not. ERP applications will continue to exist either with or without blockchain technology. However, if an organization wishes to exchange information with other organizations it can utilize a blockchain in order to perform this exchange in a more secure manner. It can create a private blockchain, invite specific organizations to become nodes, then exchange information with those nodes sure in the knowledge that no-one can break into that blockchain and either read private messages or send bad messages of their own.

The type of information which can be exchanged is unlimited. The MultiChain software allows messages of up to 64MB in size with no particular format, which means that I can send whatever data I want in whatever format I want. I can send text files or I can send binary files such as images, videos, spreadsheets or PDF documents. The GM-X ERP application has a relational database containing hundreds of tables coupled with thousands of Web forms which allow an enormous volume and variety of data to be input, maintained and viewed. Each discrete set of data can be considered as an electronic document where each document, be it a purchase order, sales order, shipment, invoice or inventory item, consists of data which is held in one or more records in one or more tables in that relational database. A relational database is infinitely customizable, therefore the number and type of electronic document that it may hold is also infinite.

The blockchain data store, on the other hand, is not infinitely customizable and it can only deal with things called messages. It has no concept of columns, tables and relationships, just packets of information known as messages. It is up to the external application to extract the data for a particular document, such as ‘Purchase Order #27’ or ‘Invoice #301’ or ‘Shipment #1024’, put that data into a single message, then send that message to the local blockchain software which will then send it to all the other nodes in the network.

If the message does not have a fixed structure then how can the receiving node possibly process it? The structure of each message is not known to the blockchain software, but it is (or should be) known to the external software which both constructs and deconstructs each message. The trick is to use a message format which can preserve the structure of the data as it resides in the application database with its tables, columns and relationships, so that when the data is deconstructed by the receiving node it puts that data into the correct columns of the correct tables in its own database. Fortunately such a format has existed for decades, and it is called XML. Although each XML document is a file containing human-readable text, it is possible to embed binary data into this text using a method of binary-to-text encoding. It is therefore possible for an XML document to contain an image as well as metadata which describes that image. That image could be a picture of an item, or a document that contains someone's signature. The possibilities are endless.

References

Tags: