First available 17 November 2017
Learn how to develop blockchain solutions using Hyperledger Composer on Hyperledger Fabric Version 1.0+. This 15 chapter tutorial takes you from no experience to building a complete blockchain application.
What is the architecture of IBM Blockchain? At the end of this video, you should have a basic grasp of IBM Blockchain and the specific problem we're solving with this technology.
IBM Global Finance implemented a shadow Blockchain to address dispute resolution. We will implement a similar story, using the following roles: Buyer, Seller, Third Party Provider, Shipper, Finance Company.
Multiple facets are to be taken into account when architecting a blockchain application:
We will go through each of these topics and finish with the architecture overview of the solution that we will be building.
Hyperledger Composer is an open source tool that sits on top of Hyperledger Fabric. It provides a simplified approach to building Blockchain applications. In this chapter, we will use an automated approach to installing this development environment in OSX and Ubuntu. Windows users will install VirtualBox (free) and then, in the VirtualBox environment, install an Ubuntu-based development environment.
The network in Hyperledger Composer is defined by creating a:
We will create each of these files and then use both the Composer Playground on Bluemix and also the REST services to interact with our first network.
In this chapter we build our first web front end to our blockchain network. We will start with the administrative interface, which supports the basic management of the network (deploy, undeploy, ping, update) and working with Members and Assets. You will note that there is an option to pre-load the network and that, in addition to what you saw in the video, there is now an active window at the bottom of your browser which is showing all of the blocks as they are created and added to the block chain.
The Buyer is the beginning of the process. They have the ability to create orders, submit a purchase request, cancel an order, approve payment for an order and raise a dispute. They are the only role, other than the administrator, who can create an Order asset. They can issue some transactions, but not all. We need to interact with the composer created transactions and leverage the ACL to ensure that the buyers can do what they need, while restricting them from issuing inappropriate transaction requests.
The Seller accepts requests to purchase an order, they submit orders to third party providers, request payment when the order has been delivered and resolve disputes.
The Third Party Provider receives a request to deliver an order from the Seller. They send a Shipping Request to the Shipper (next chapter) and can also Resolve a dispute.
The Shipper receives a Request to Ship from the Provider. It initiates Delivery and can update Delivery Status multiple times before issuing a Delivered transaction. The Shipper has the ability to Resolve a dispute
The Finance Company is responsible for ensuring that disputes are resolved and that the seller is paid appropriately. This chapter focuses on the Finance Company. By now we've created 5 different views and implemented nearly all of the functionality required on the server side. We have to add a single new service on the server and replicate the changes we've been making for the other user experiences, this time for the Finance Company. We also need to now provide a detailed view of the history of an order, which we have maintained through our transaction chain code.
In this chapter, we bring the four core roles onto a single page to simplify demonstrating the blockchain. This chapter is primarily an exercise in HTML and CSS.
Events help us understand and act on what's happening in the network. In this chapter, we will update our system model to support events for each state change in an order and then update the chain code to issue these events if a transaction successfully completes. We then update our nodejs server code to listen for these events and then let the browser know about events as they relate to various roles. We will create an event notification icon and update it in real time as events occur in the blockchain business network.
This chapter describes installing your network on Bluemix/Kubernetes.
In this chapter describe how Docker is used with your code in the Hyperledger Composer environment.