We’re giving away 1,500 DJI Tello drones. Enter to win ›
By Shikha Maheshwari | Published July 1, 2018 - Updated July 1, 2018
Blockchain technology presents abundant opportunities for innovation. It has the power to revolutionize businesses by fundamentally changing the way business transactions are done.
So what’s the best way for developers to begin developing code for blockchain networks? I recommend starting with a firm grasp of two open source Hyperledger projects: Hyperledger Fabric and Hyperledger Composer. The names are similar, but knowing the difference is key to getting started with blockchain development.
Spoiler alert: Both are open source Hyperledger projects. One is a cool development tool, and the other is the powerful engine of business blockchain networks.
Model your network using Hyperledger Composer, as described in this article, and then deploy it to the IBM Blockchain Platform. The Starter Plan is your on-ramp!
Try the new Starter Plan!
Both projects are under the Hyperledger umbrella. Hyperledger is an open source collaborative effort created to advance cross-industry blockchain technologies for business use. It’s a global collaboration, hosted by The Linux Foundation.
The Hyperledger projects include blockchain frameworks, such as Hyperledger Fabric, and related developer tools, such as Hyperledger Composer, which simplify the creation of blockchain networks and applications.
Hyperledger Fabric is an open source framework implementation for private and permissioned business networks, where the member identities and roles are known to the other members. It’s designed as a foundation for developing solutions with a modular architecture. It allows components, such as ledger database, consensus mechanism and membership services, to be plug-and-play. It leverages container technology and delivers enterprise-ready network security, scalability, confidentiality.
A Hyperledger Fabric network has these components:
Shared ledger. The ledger records the state and ownership of an asset. The ledger consists of two components:
Smart contract. Hyperledger Fabric smart contracts are called chaincode. Chaincode is software that defines assets and related transactions; in other words, it contains the business logic of the system. Chaincode is invoked when an application needs to interact with the ledger. Chaincode can be written in Golang or Node.js.
Ordering service. The ordering service packages transactions into blocks to be delivered to peers on a channel. It guarantees the transaction delivery in the network. It communicates with peers and endorsing peers. The supported configuration mechanisms for the Ordering service are Solo and Kafka.
In a blockchain solution, the Hyperledger Fabric network serves as a back end with an application front-end to communicate with the network. SDKs help you set up the communication between front and back end, such as the Node.js SDK and Java SDK. The SDK provides a way to execute user chaincode, perform transactions in the network, monitor events, etc.
To write a blockchain application, you need to:
The high-level request flow of a transaction in a Hyperledger Fabric network goes like this:
Hyperledger Composer includes these components:
Hyperledger Composer also provides a web-based user interface called “Playground” that you can use to model and test your business network. The Playground uses your browser’s local storage to simulate the blockchain network’s state storage. Because it doesn’t need a running blockchain network, it’s an excellent starting point for your proof-of-concepts.
Hyperledger Composer also generates REST APIs based on the business network definition using a LoopBack connector. These REST APIs can be easily consumed by client applications and integrate with non-blockchain applications.
In a nutshell, Hyperledger Composer is the application development framework for building blockchain applications based on Hyperledger Fabric. In other words, Hyperledger Composer helps you create business network definitions, which you deploy to Hyperledger Fabric, where they run.
Learn more about creating business networks from scratch using Hyperledger Composer in our popular series, Hyperledger Composer basics, by Steve Perry.
Try the new IBM Blockchain Starter Membership Plan. It gives you an economical way to kick-start a blockchain network where you can easily deploy and test sample blockchain applications. You can also deploy your business network model that you create using Hyperledger Composer, as described in this article, to run on the Starter Plan.
Stay in the know with the monthly Blockchain Newsletter for developers. Check out the current issue and subscribe.
Check out the many code patterns, which provide roadmaps for solving complex problems with blockchain technology, and include architecture diagrams, code repos, and additional reading.
Stop by the Blockchain Developer Center. It’s your source for free tools and tutorials, along with code and community support, for developing and deploying blockchain solutions for business.
April 3, 2019
Back to top