Wednesday, 12 July 2017

Blockchain Technology Explained (Part 2 - Distributed Database)

Hey, good to see you again. Let's complete our discussion on The Blockchain Technology. Recall that in Part 1-The Estate, we gave a simple analogy on how the concept of blockchain applies to real life using an estate of block of apartments. You can read it up: Blockchain Technology Explained(Part 1 - The Estate). The explanation was so simple so as to allow everyone to understand the concept.
What is Blockchain? Subset of the Internet
A blockchain is a network of nodes(also computing devices) that work together to manage data and transactions on those data. This is the same way the internet is made up of computers that share information.
Now, since blockchain is based on the Internet, we can see it as a more powerful and secure subset of the Internet. 

Unlike the internet which contains all manner of junk, the blockchain holds highly sensitive financial records(ledger) which have been described a incorruptible(we'll come to that in a moment).

How Does It Work
A unit of data in a blockchain is called block. So the blockchain is an inter-network of all the blocks. Transactions are carried out on by those nodes. Transactions can be requested by user just like you and me. Transactions are what the name is, just like 'bank transactions' which includes opening a new account, making a withdrawal, paying into the account and so on.

How Blockchain Works
Figure 1: How Blockchain Works - Part 2

The Life Cycle of a transaction in a Blockchain is show in Figure 1 from when a user requests for a transaction to when the transaction is complete. I would now explain clearly each step of the process.

1. Transaction is Requested
A  transaction may be transfer of bitcoin to another account(user wallet), new user joining the system, buying/selling transaction etc. So in step one, a transaction is requested by a user which could be you or me.

2. Request is Broadcast
 Since the database is a distributed database, all nodes in the network needs to get the transaction request (in centralized database, your a bank teller handles independent of other bankers/customers). Simply put, everyone in the network/blockchain gets the request.

3. All Nodes Confirms and Validates the Request
This is where the system supersedes conventional system in the aspect of security. Before the transaction is entered, all node has to confirm and verify it. Making sure its authentic. The distributed database system handles this. It takes "some time", but it has to be done to ensure the integrity and consistency of the system.

4. A Block is Created (This process is called Mining)
When all nodes have reached a consensus that the transaction is legitimate and can be accepted, then a block can be created. A number of confirmed transactions is combined and recorded together as a block (a block is a combination of two or more individual transactions)

5. Block is Recorded
The recording is actually done in this step. In the previous step, a block is created by combining the transactions. In this step, this new block in recorded permanently to the chain.

6. Transaction is Completed
Here the transaction is marked as completed and relevant notifications are sent out.

Benefits of the Distributed Database
Added to the benefits you might have envisaged by now, the distributed database system have other benefits, two of which are:
1. Allows transactions to be carried out without the delays and bureaucratic nature of having a middle-entity such as banks
2. Continuous verification - Every 10 minutes verification is carried out to confirm the validity of transactions
I would stop here for now and I would like to thank you for reading. Do reach me if you would need any more explanation. If his have been informative do leave a comment below to let me know.

Don't forget to read the following: