Develop a Scalable Event Listener for Blockchain

Developing a Scalable Event Listener for Hyperledger Fabric

Using an event listener for replicating data stored in Hyperledger Fabric ledgers is an emerging pattern in todays’ enterprise solutions based on Hyperledger Fabric oriented distributed ledger technology-based platform. This article will provide a comprehensive guide for building an event listener using Hyperledger fabric-sdk-go. All the examples have assumed the usage of Hyperledger Fabric v2.2.x platform.

Why We Need Event Listeners

For many blockchain-based applications, it has been observed that there is a requirement of storing all or some of the assets into an off-chain data storage. There could be several motivations for such requirements. Some of the frequently encountered cases are

Deploy a Hyperledger Fabric v2 Web App Using the Node.js SDK

Introduction

One of the main highlights of Hyperledger Fabric v2 is the concept of decentralized governance for smart contracts. It introduces peer chaincode lifecycle, which focuses on improving chaincode management between multiple organizations. Using the new lifecycle, installation, and upgrading of chaincodes requires approval from multiple organizations before the chaincode can be interacted with.

The latest fabric-sdk-node update also removed the fabric-client library, which was mainly responsible for handling administrative tasks such as chaincode and channel management on the network. These tasks now instead have to be carried out through the peer CLI.