Book Image

Blockchain across Oracle

By : Robert van Molken
Book Image

Blockchain across Oracle

By: Robert van Molken

Overview of this book

Blockchain across Oracle gives you the professional orientation to Blockchain that you need as an Oracle developer in today’s changing world. Written and prepared for you by Oracle Developer Champion Robert van Mölken, this book gets you up to speed with the details of the Blockchain - core concepts, how to implement Oracle’s Blockchain Cloud Service, industry implications for the Blockchain, and how the Blockchain will affect your Oracle customers. Robert van Mölken introduces you to the history and concepts of the Blockchain. You’ll really get to understand the Blockchain inside and out, as an Oracle developer or solution architect. You’ll understand the Blockchain flow, and how the hashes and chains create a new decentralised paradigm for you as an Oracle developer. You’ll gain insights into how the Blockchain affects Oracle developers and customers in this modern and disruptive era. You’ll see how the Blockchain concepts work in this new world where Assets, Transactions, Security, and Privacy, can all be sustained across a decentralized system for your customers. Then you'll find a detailed look at the cutting-edge Oracle middleware solutions. You’ll learn about Hyperledger Fabric, the opensource Blockchain framework used by Oracle as its core, and how to set up your own Oracle Blockchain Network. You’ll design and develop a smart contract, and learn how to run it on the Oracle Blockchain Cloud Service. The final part of the book looks at how the Blockchain will affect your customers across various industry sectors. By studying industry trends in the financial services sector, healthcare industry, and the transport industry, you’ll discover how the options and possibilities for you and your clients are being transformed by the Blockchain across Oracle. You’ll complete this professional orientation by looking at Blockchain trends and future directions.
Table of Contents (24 chapters)
Title Page
Packt Upsell
Contributors
Preface
3
Blockchain 101 - Assets, Transactions, and Hashes
4
Blockchain 101 - Blocks, Chains, and Consensus
Index

What kind of applications can I run on blockchains?


I want to conclude this chapter by going over some of the applications that you can imagine running on some of the public or private blockchains currently available. The most widely-used or anticipated public blockchain platforms on which to run your own decentralized application are Ethereum and Blockstack.

  • Ethereum: One of the longest standing platforms in existence is Ethereum, an open platform that lets you build, run, and use decentralized applications using the blockchain technology. This decentralized platform runs applications in the form of smart contracts; that is, applications that run exactly as programmed without censorship, fraud, or interference by a third party. These smart contracts consist of computer code that can facilitate the exchange of anything of value, such as currency, content, property, or shares. Because of the decentralized nature of the platform, there is no possibility of downtime.
  • Blockstack: One upcoming public platform is Blockstack, which aims to be the new internet of decentralized applications. With Blockstack, users own their data and maintain their privacy, security, and freedom, instead of the application provider. In addition to the platform, Blockstack also has its own browser in which you can access the available apps. It uses the already existing lower level of the public internet, but applications are serverless and decentralized. Blockstack also provides a decentralized domain name system (DNS), decentralized public key distribution system, and registry for apps and user identities.

 

Either of these platforms lets you build applications. Ethereum is more basic and broadly accepted, but it only supports smart contracts (backend code). Blockstack, on the other hand, is a platform for decentralized applications that contains both frontend (web application) and backend (smart contracts).

Other decentralized applications

Examples of decentralized applications that don't necessarily use these platforms are Storj, UjoMusic, and OpenBazaar.

Storj (pronounced: storage) is a decentralized cloud storage platform that uses the blockchain technology and end-to-end cryptography to secure your files in a decentralized manner. Storj protects your data by encrypting your files client-side, shredding them into little chunks called shards, and storing these pieces in a decentralized network of computers. Because the files are shredded into little pieces, nobody has a complete copy of your encrypted files. Beyond serving as a platform, it is also a cryptocurrency and a suite of decentralized applications. The applications can be used to store your files on the network or rent out your hard drive space. The cryptocurrency called Storj Token is given in return to nodes that share their hard drive space. More information about the platform can be found on their website at https://storj.io/.

Personally, I like to listen to great music and always hope that the artists I listen to get paid for their work from the monthly subscription fees that I pay. One platform that tries to address the issue of ownership (creator's identity) and music licensing is UjoMusic. The platform provides a portal where the artist can own their creative works, and the use of those works always remains in the control of the artist. It uses Ethereum, so it is no longer necessary to register a copyright and sign with a publisher in order to ensure that an artist gets paid when somebody uses or listens to their creation. UjoMusic uses a decentralized and distributed file storage system (Swarm, the decentralized storage branch of Ethereum) to enable redundant copies of the data that are fault-tolerant, resilient, censorship-resistant, and self-sustaining due to the built-in incentive systems. UjoMusic also uses COALA IP (https://www.coalaip.org/), which is a blockchain-ready intellectual property and licensing protocol so that they can build an open, global database of rights, holders and their works. More information about the UjoMusic platform can be found on their website at https://ujomusic.com/.

Who hasn't bought something online from Amazon, eBay, or Alibaba? These companies offer a marketplace where you can buy goods from sellers worldwide. Instead of directly interacting with the seller to conduct a transaction, the data is owned by the online service, and the payment goes through a provider such as VISA or MasterCard.

 

 

The blockchain project OpenBazaar aims to cut out the middleman. It still provides a platform for e-commerce, but it uses a different approach. It uses the blockchain technology to put the power back into the customer's hands. Instead of buyers and sellers needing to go through a centralized service like Amazon and using a credit card to make a purchase, OpenBazaar connects buyers and sellers directly. To use OpenBazaar, you download the client application. With this application, a seller can create a new product listing, including the details that you would normally see on an e-commerce website. When you publish the listing, it becomes accessible and is distributed over a peer-to-peer network to other users. Anyone can search for the item based on the keywords you applied. If someone buys your item, they pay with a cryptocurrency, like Bitcoin, and, when purchased, the client application creates a contract between the buyer and the seller with both digital signatures. Payments are sent into an escrow account for holding. Once the seller has sent the item to the buyer and they are satisfied with it, the buyer releases the funds and the seller receives the cryptocurrency (for example, Bitcoins). Surely it can all go wrong, just like any other marketplace? A buyer can receive something totally different from what they ordered or receive nothing at all. In this case, OpenBazaar offers the use of moderators (also users of the network), who both the buyer and seller trust, to resolve the issue, and they only release the funds if they sign the transaction. More information about this platform can be found at https://www.openbazaar.org/.

The last three examples discussed were of public applications that could be used by anyone. In some cases, however, you don't want to build and run a decentralized application that is accessible to everyone in the world. Certainly, with enterprise or mission-critical applications, you want to control access and secure the privacy of the data on the blockchain. If you want to run these kinds of decentralized applications, it is better to look at private or permissioned blockchain platforms, such as Hyperledger (Fabric) and R3/Corda.

  • Hyperledger Fabric: Hyperledger, and specifically the Hyperledger Fabric project, is one of the most commonly-used permissioned blockchains, and it is endorsed by several large IT vendors, including IBM, Oracle, and Microsoft. It is a blockchain framework implementation, a combination of a digital ledger technology (DLT) and a smart contract engine. Hyperledger Fabric is a platform with a modular architecture that can be used for all kinds of distributed ledger solutions. It aims to deliver a high degree of confidentiality, resiliency, flexibility, and scalability. The architecture is designed so that it supports pluggable implementations of different components and accommodates the changes in the blockchain/digital ledger ecosystem.
  • R3/Corda: Some private or consortium blockchains focus on specific markers. Corda is one of these, and it is a distributed/shared ledger platform specifically designed for recording and processing financial and legal agreements by regulated financial institutions. The platform supports smart contracts, which, in Corda's case, is an agreement whose execution can both be automated through computer code along with human input and control, and whose rights and obligations, as expressed in legal prose, are legally enforceable. Corda links the business logic and data of the smart contract with associated legal prose in order to ensure that the financial agreement(s) follow the law and can be enforced.

You can build applications on both platforms. Whereas R3/Corda is specific to financial and legal applications on which you can execute and enforce smart contracts linked to legal contracts, Hyperledger Fabric is a platform that lets you create and control your own blockchain and the applications running on its network. One example of a permissioned, decentralized application that uses the Hyperledger Fabric project is Medicalchain.

This is one blockchain that I currently follow with much interest. It uses the blockchain technology to store patients, medical/health records securely. Instead of different organizations having their own copy of these records, it maintains a single version of the truth. If organizations such as doctors, hospitals, laboratories, pharmacists, and health insurers want access to a patient's record, they can request permission for this purpose and record additional transactions on the distributed ledger. The platform creates a user-focused electronic health record, and it stores and shares this record securely in the blockchain. Medicalchain empowers and enables patients and users to give healthcare professionals explicit access to their data, and it records all interactions with the data in an auditable, transparent, and secure way. The platform offers users two applications: a doctor-to-patient telemedicine application, and a health data marketplace application. The telemedicine application enables users to consult with a doctor remotely (using their mobile phone, for example) for a small fee that can be paid directly to the doctor within the application. The platform also offers organizations the ability to build custom, decentralized applications to improve the (localized) user experience and put these applications on the marketplace. Users are able to use their medical data to power these applications and other services running on the platform. Besides Hyperledger Fabric, they can also use the public Ethereum blockchain for its cryptocurrency, which can then be used to pay for services on the platform. More information about this platform can be found athttps://medicalchain.com, or by reading their white paper athttps://medicalchain.com/Medicalchain-Whitepaper-EN.pdf.

Another similar example in which a private or permissioned blockchain such as Hyperledger Fabric can be used is for vehicle insurance. Imagine a consortium of drivers, insurers, emergency services, and vehicle repair shops.

Together, they operate a blockchain and run a decentralized application that can record the insurance policy, driver reports, and driving records, allowing an Internet of Things (IoT)-equipped vehicle to execute a claim automatically when it is involved in an accident. The application could automate claim processing, verification, fraud detection, and payment. Such an application would eliminate duplicate reports and enable the sharing of all data in a transparent way so that repair shops wouldn't have to contact the insurance company first before repairing the car, as they have already been informed that they are allowed to do the repairs.

I will discuss some of the available blockchain providers and how you work with them to develop your own applications in greater detail in Chapter 7, Public Versus Permissioned Blockchains and their Providers.