DEV Community

loading...
Cover image for Definitive Guide for Learning Blockchain Hyperledger Development from Beginner to Advance Level

Definitive Guide for Learning Blockchain Hyperledger Development from Beginner to Advance Level

weg2g profile image Matt Originally published at myhsts.org Updated on ・12 min read

This article is only focused on building a blockchain application using one of Hyperledger projects. I briefly survey each project followed by its hands-on recipes. Also, if you wish to learn and practice Ethereum blockchain development, visit Comprehensive Ethereum Training Tutorials page to get the outline of our Ethereum tutorial articles.

Note: Good knowledge of blockchain concepts, JavaScript and Python as well as basic skills in Linux OS are required in order to complete tutorials listed on this article.

Here is a good article on why choosing Hyperledger Fabric over other blockchain development platforms.

Overview of Hyperledger Project and Family
Hyperledger project is made of many frameworks and tools.
Hyperledger Project Frameworks
The frameworks under Hyperledger project aim to provide platforms to build a variety of distributed ledgers and their components. They are as follows:

  • Hyperledger Fabric: Fabric is the most popular Hyperledger framework. Smart contracts (also known as chaincode) are written in Golang and JavaScript, and run in Docker containers. Fabric is known for its extensibility and allows enterprises to build distributed ledger networks on top of an established and successful architecture.
  • Hyperledger Sawtooth: Sawtooth is the second project to reach 1.0 release maturity. Sawtooth-core is written in Python, while Sawtooth Raft and Sawtooth Sabre are written in Rust. It also has JavaScript and Golang components. Sawtooth supports both permissioned and permissionless deployments. It supports the EVM through a collaboration with the Hyperledger Burrow.
  • Hyperledger Burrow: Burrow is the first permissioned ledger that supports EVM. It is written in Go and heavily focuses on being a deterministic Smart Contract engine.
  • Hyperledger Indy: Indy is built explicitly for decentralized identity management. The server portion, Indy node, is built in Python, while the Indy SDK is written in Rust. It offers tools and reusable components to manage digital identities on blockchains or other distributed ledgers.
  • Hyperledger Iroha: Iroha is designed to target the creation and management of complex digital assets and identities. It is written in C++ and is end user friendly. Iroha has a powerful role-based model for access control and supports complex analytics.

Below graph succinctly depicts Hyperledger frameworks and tools.

 

For learning more about Hyperledger project tools and Hyperledger family the following articles are strongly recommended. Intro to Hyperledger Family and Hyperledger Blockchain Ecosystem and Hyperledger Design Philosophy and Framework Architecture .

I- Hyperledger Fabric Project and Development
It is out of question that Hyperledger Fabric is currently the most popular platform for blockchain development. Hyperledger Fabric is an open source enterprise-grade platform that leverages a highly-modular and configurable architecture. Hyperledger Fabric is optimized for a broad range of industry use cases, including the finance, banking, healthcare, insurance, and public sectors, as well as supply chains and digital asset management. Read below article to learn about Hyperledger Fabric architecture and design:
https://weg2g.com/application/touchstonewords/article-the-survey-of-hyperledger-fabric-architecture-and-components-for-blockchain-developers.php

We have written two sets of tutorials to explore Hyperledger Fabric in depth. First set covers the following six recipes:
It starts with installing Hyperledger Fabric on an AWS EC2 virtual machine,  setting up the first Hyperledger Fabric network and working with Hyperledger Fabric Command Line Interface or CLI. We learn the following:

  • Generating the crypto/certificate using cryptogen
  • Generating the configuration transaction using configtxgen
  • Bring up the nodes based on what is defined in the docker-compose file
  • Using the CLI to set up the first network
  • Using the CLI to install and instantiate the chaincode
  • Using the CLI to invoke and query the chaincode

We move on to show you how to Add New Network to a Channel, Use CouchDB as a State Database for Hyperledger Fabric, and Create a Smart Contract and then Deploy it into the Blockchain.
In short, in first 6 recipes, we learn about how to set up and configure Hyperledger Fabric. We explore its key components, including channels, Membership Service Providers (MSPs), the ordering service, and Fabric Certificate Authority (CA).
The second set, we will show you how to build a simple device asset management DApp. It consists of 6 recipes as follows:

In summary, in the second set of recipes, we are going to build a simple device asset management DApp. We will exploit this example by writing chaincode implemented by various programming languages and we'll also build, test, and deploy our DApp.

After finishing first two sets of tutorials, you can move on to more advance topics on Hyperledger Fabric development via the following recipes: Build Blockchain Applications with Hyperledger Fabric and Composer on IBM Cloud, Building A Blockchain for Letter of Credit Using Hyperledger Fabric and Composer and Ultimate Guide for Building A Blockchain Supply Chain Using Hyperledger Fabric and Composer.

 

II- Hyperledger Sawtooth Project and Development
Hyperledger Sawtooth is an enterprise blockchain platform for building distributed ledger applications and networks. The design philosophy targets keeping ledgers distributed and making smart contracts safe, particularly for enterprise use. Read below article to learn more:
https://weg2g.com/application/touchstonewords/article-essential-hyperledger-sawtooth-features-for-enterprise-blockchain-developers.php

Follow below 5 steps or tutorials for building blockchain application in Sawtooth:
1. Install Hyperledger Sawtooth
Follow Install and Work with Hyperledger Sawtooth recipe.

2. Configure Sawtooth Validators and REST API
Follow Configuring Hyperledger Sawtooth Validator and REST API on AWS recipe.

3. Design a Namespace and Address for Transaction Family and Implement Transaction Family
Follow Designing Namespace and Address for Hyperledger Sawtooth Transaction Family recipe

4. Build a Transaction Processor and Grant Permission on the Sawtooth Network

Follow Building Transaction Handler and Processor for Hyperledger Sawtooth with Python SDK recipe

5. Develop Client Applications with the Sawtooth REST API and SDK

Follow Transaction Processor and Python Egg For Hyperledger Sawtooth recipe.

III- Hyperledger Composer Project and Development
Hyperledger Composer is a set of collaboration tools for business owners and developers that make it easy to write chaincode for Hyperledger Fabric and decentralized applications (DApps). With Composer, you can quickly build POC and deploy chaincode to the blockchain in a short amount of time. Hyperledger Composer consists of the following toolsets:

  • A modeling language called CTO: A domain modeling language that defines a business model, concept, and function for a business network definition
  • Playground: Rapid configuration, deployment, and testing of a business network
  • Command-line interface (CLI) tools: The client command-line tool is used to integrate business network with Hyperledger Fabric

Follow below tutorials for building blockchain application using Hyperledger Composer:

After completing above 3 recipes, it’s recommended to learn the following topics: i- Implementing models, transaction logic, access control, and query definitions, ii- Deploying, testing, and exporting business network archives using the Composer command-line interface and iii- Interacting with Composer through the RESTful API as covered in the below links:
https://developer.ibm.com/recipes/tutorials/blockchain-hyperledger-composer-and-playground-development-components/
https://developer.ibm.com/recipes/tutorials/interacting-with-hyperledger-composer-through-restful-api/

IV- Hyperledger Explorer Project and Development
Hyperledger Explorer is a powerful utility that allows users to create user-friendly web-based applications. It is a blockchain dashboard and provides the ability to view, invoke, deploy, and query raw blockchain data and network information, including block details, chain codes, and transactions stored in the ledger.
Follow below recipes to install and configure Explorer:
https://myhsts.org/tutorial-learn-how-to-install-blockchain-hyperledger-explorer-and-configure-it-with-fabric.php
https://myhsts.org/tutorial-learn-how-to-build-blockchain-hyperledger-explorer-and-development-environment.php

Follow below tutorials for building your first blockchain application using Hyperledger Explorer and Fabric.
https://developer.ibm.com/recipes/tutorials/configure-hyperledger-explorer-with-fabric-to-build-blockchain-applications/
https://developer.ibm.com/recipes/tutorials/building-hyperledger-explorer-for-developing-blockchain-applications/

V- Hyperledger Indy Project and Development
Hyperledger Indy is a distributed ledger in The Linux Foundation family which is built for decentralized digital-identity management. Hyperledger Indy is in its incubation stage so in this recipe we will explore the Indy Command Line Interface or CLI to look at the concept and functions offered by Hyperledger Indy with the current distribution.
To develop blockchain applications using Hyperledger Indy, you need to run Hyperledger Indy and explore it’s the power of its Command line Interface or CLI by creating, opening, and listing the wallet, creating, importing, and using decentralized identifier or DID and creating, connecting, and listing Hyperledger Indy node pool. Follow below three tutorials to build your blockchain application using Hyperledger Indy.
https://myhsts.org/tutorial-learn-how-to-install-blockchain-hyperledger-indy-on-amazon-web-services.php
https://developer.ibm.com/recipes/tutorials/manage-hyperledger-indy-wallet-and-did-through-indy-cli-and-docker/
https://myhsts.org/tutorial-learn-how-to-work-with-hyperledger-indy-command-line-interface.php

VI- Hyperledger Iroha Project and Development
Hyperledger Iroha is a general-purpose permissioned blockchain system hosted by The Linux Foundation. It was contributed by Soramitsu, Hitachi, NTT DATA, and Colu.Hyperledger Iroha is written in C++ and incorporates the BFT consensus algorithm, named Yet Another Consensus (YAC). Hyperledger Iroha consists of simple deployment and fast development. It can be used in applications that manage digital assets, identity, interbank payment, and so on. Follow below link to install Iroha on Amazon Web Services or AWS:
https://myhsts.org/tutorial-learn-how-to-install-blockchain-hyperledger-iroha-on-amazon-web-services.php
For the next step, follow below two tutorials for building your blockchain application using Iroha:
https://myhsts.org/tutorial-learn-how-to-work-with-hyperledger-iroha-cli-to-create-cryptocurrency.php
https://developer.ibm.com/recipes/tutorials/configuring-hyperledger-iroha-peer-node-and-network/

VII- Hyperledger Burrow Project and Development
Hyperledger Burrow is one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Burrow was originally contributed by Monax and co-sponsored by Intel. Hyperledger Burrow provides a modular blockchain client with a permissioned smart contract interpreter partially developed to the specification of the Ethereum Virtual Machine (EVM). Follow the below recipe to install Burrow on AWS:
https://myhsts.org/tutorial-learn-how-to-install-blockchain-hyperledger-burrow-on-amazon-web-services.php
For next steps, follow below tutorials to build your blockchain application using Hyperledger Burrow:
https://developer.ibm.com/recipes/tutorials/deploying-and-calling-ethereum-smart-contracts-on-hyperledger-burrow/
https://myhsts.org/tutorial-learn-how-to-build-and-deploy-ethereum-smart-contracts-on-hyperledger-burrow.php

 

Summary
In this article, we reviewed blockchain Hyperleger project such as its frameworks and tools. We also cover its 5 development frameworks- Fabric, Iroha, Burrow, Indy and Sawtooth and two most popular tools- Composer and Explorer. To learn and master blockchain development, it requires patience and consistent training. Also, Hyperledger development libraries and resources are updated frequently, so it is good to check their website and use their latest documentations.

As of this writing, Hyperledger Foundation offers the following two Hyperledger certifications: The Certified Hyperledger Fabric Administrator (CHFA) and The Certified Hyperledger Sawtooth Administrator (CHSA), both of which are highly regarded in the industry. Hyperledger Foundation is in the process of creating Hyperledger Developer certification program, which may be released in early or middle of 2020.

About Authors
This article is written by Matt Zand (Founder of High School Technology Services) in collaboration with Brian Wu who is a senior blockchain developer at DC Web Makers.

Discussion

pic
Editor guide