Most likely you have heard of Bitcoin, the virtual currency that has been around for a few years. Were you aware that Bitcoin is based on Blockchain? In this article we will expand on Blockchain and its power.
Back in 2009 there was a need for a secure storage solution; at the time, the main method used were replicated databases. However if a hacker attacked the main database then changes could end up propagated to the back-ups as well which could end up in a serious problem. Furthermore, distributed databases required cryptography to reduce man-in-the-middle attacks. Who would want to use these? Banks. Hence, Blockchain was developed: an encrypted, transactional and distributed database. Sounds nice, doesn't it? If you'd like to know how it works, keep on reading.
Blockchain is designed in a tree mode with two levels: organisations and peers. An organisation, as the name suggests, represents business entities that interact with other business entities. In the real world, these would be Santander, BBVA, Barclays, etc. In turn, each organisation has one or more peers. Peers hold replicated information and they sync the information when changes are made. Organisations can interact with peers depending on restrictions: whilst these might hold all the data, the might only be able to access portions of it, and for that purpose, data is encrypted.
So now that we know which are the components of a network, let's see how it works in practice and how it protects itself from attacks, using a ficticious blockchain network similiar to Bitcoin.
Let's say we want to buy a DVD, for instance, Van Helsing which is available from Media Markt. We transfer 10 bitcoins, which is stored in the database as a transaction from our wallet to Media Markt. In our image, this would be the first black box.
Now let's imaging that a hacker has gained access to one of the peers in the network. We proceed to make another purchase, this time to Fnac, and the hacker creates a transfer transaction instead from our wallet to his/hers. Because the rest of the peers "know" that transaction to Fnac is the real one, the hacker transaction is discarded.
Note: bear in mind that this is an oversimplification just to make concepts understandable, there are many more in-deep details on how Blockchain works.
WeDo Hospitality Demo
Our experience with Blockchain started as a collaboration with the Oracle Spain WeDo team. Their proposition was to include a block-chain component in their "hospitality" that would allow a clients to spend "reward points" in businesses as well as allowing business to exchange these.
The demo is about a customer and his/her experience at a hotel: booking a room, checkin-in, ordering spa & food and finally checking-out. The twist is that all of these is done through the use of chat-bots or a technology with a futuristic touch (such as a robot delivering your pizza to your room).
With regards to our tasks, they were 4: building the block-chain network, a custom API for accessing the network, a back-office dashboard to monitor and manage transactions and finally a mobile app to review the users' reward points. The technologies involved were:
- Hyperledger Composer for building the network
- Node.js with Express for the API
- Oracle Jet (plus Cordova) for the back office dashboard and the mobile app
The whole development was done over X days - quite a fast implementation for a rather new technology, which highlights the benefits of the technology stack used. We will probably write another more detailed post on how to build and run a basic network.
The WeDo Hospitality demo can be found here: https://youtu.be/rKs2HBOQdpY
From a business point of view, the reward points are viewed as currency, therefore any transactions related to either spending, giving or exchanging points are stored in the private network itself. It is also worth noting that in our example only the hotel (the top organisation in our case) had all the permissions for managing points, whereas peers such as the Spa would only be able to perform certain operations on reward points - such as exchanging it for cash.
Other block-chain use-cases
With the experience of using Hyperledger Composer and its power we now wonder what other areas could be applicable for this type of technology. People tend to think that Blockchain is only for financial activities due to its "transactional" behaviour but we do not agree with this, we think that it can actually be used in many activities, such as parcel carriers (think DHL, UPS, etc.) or solutions where users and businesses work on same network to identify who has an "asset", such as car manufacturers. In this particular case, transactions would be applied to the vehicle itself, and it can be identified throughout is manufacturing lifecycle until its final delivery to the customer. All third-party businesses would also use the same network therefore their transactions would also be associated to the same item.
With blockchain being distributed, secure and transactional , other examples can be found in healthcare: transplants, blood donations, medical trials, etc..
Have an idea for blockchain and would like to give it a try? Let us know!