Fabric Installation
October 10, 2019Running Multiple Services in a Docker Container via Supervisord at runtime
October 11, 2020Business Modeling in Hyperledger
Hyperledger fabric is the Distributed Ledger Technology for the Business. The business is the difference between the Hyperledger and other blockchain technologies. The various blockchain technology are focusing on the public domain of the blockchain as the participation in the public network is easy for any entity than in the private permissioned blockchain.
There are four characteristic that make Hyperledger fabric suitable for DLT based business application.
1. It is a Permissioned network: restricts who can access and do what on the network. The entities must be known. The entities must get permission from any authorizing party. In Ethereum anyone can participate in the network and get access as it is Permissionless network. In Hyperledger network, the roles are assigned to each entities and actions taken by each of the roles are restricted by way of access control list. The transactions are validated by way of transaction validators that the entities trust. Here all entities are known in the business, it is easy to identify and trust that validators.
2. It supports Confidential transactions: not all the transactions are desired by business to be visible to all. The Hyperledger put the entities in control of visibility of transactions.
3. To participate in the network on does not need any cryptocurrency. The Hyperledger does not have any concept of the cryptocurrency. The public blockchain needs the cryptocurrency to incentivize the distributed ledger network. the miners are present in the public blockchain to validate the transactions. They must be paid some amount in cryptocurrency. But in the Hyperledger the concept of miners is not needed. There is no need to incentivize the network for validations using the cryptocurrency. The Hyperledger also gives the entity a chance to decide who can be the validator and how the validation can be done.
4. It is programmable: it can be programmed using the chaincode. The business can use the chaincode to automate the process of business. The automation of business by way of chaincode requires higher efficiency, transparency and greater trust among the entities.
By these characteristics Hyperledger Fabric establishes trust, transparency and accountability.
Assets:
Any object of value in real world is consider as an Asset on Hyperledger Fabric as long as it can be represented as digitally. The representation may be JSON or Binary.
Chaincode:
Chaincode defines the structure of Asset. It also defines the transaction that can be executed against the asset. It contains all the business logic needed for the transaction.
Ledger:
All transactions are recorded in the ledger. Ledger is a data structure that keeps track of all of these transactions. It also records the state changes taking place in the asset as a result of execution of transaction. The ledger is distributed in the Hyperledger Fabric means all the entities owns a replica of the ledger.
Member:
A member is legally separated entities or independent entities. For example, three companies A,B and C are three different companies which are legally separated. Continuing our car example, it is having manufacturer, dealer and Repair shop which are separated and independent of each other.
Identities:
Identities in Hyperledger Fabric are managed by way of x.509 certificates. When any entity identity is created, certificate is issued to that entity. Any time a transaction is initiated by entities, certificate’s private key is used for signing the transaction and any component in the network can validate the transaction by using the entity public key.
In Hyperledger, the certificate is issued not only to the entities but also to the infrastructure component. This is done to prevent the hackers where they add a server to disrupt the environment or to try to manipulate the transaction. Due to this, each infrastructure component in the Hyperledger Fabric network must have a valid certificate to become part of the network.
Members can manage their identities within their organization. This aspect will remove the dependency on single centralized certification authority, and it achieved by way of concept of Membership Service Provider(MSP) where members can use their certificate to validate new identity that can participate on the network. Hyperledger Fabric network can have more than one MSP.
Nodes:
Think of a node as a communication endpoint in blockchain network. Nodesconnect to another node and create a blockchain network. nodes create peer to peer protocol to make sure distributed ledger is in sync across the network.
In public blockchain, all nodes are equal. To participate in any public blockchain network, download the node software generally called wallet, create an account and execute the node. The Hyperledger is very different, the nodes are the communicating entities of the blockchain. Nodes needs valid certificate to be able to communicate with the network. The entities use the apps that connect to network by way of the nodes. The entities identity is not same as node identity, when the entity executes or invoke the transaction, entity certificate is used to sign that transaction. Node certificate is used by the network to check if they should trust the node or not.
In Hyperledger network, all nodes are not equal, there are three distinct types of nodes:
1. Client node: this node application use for initialization of transaction.
2. Peer node: this node keeps the ledger in sync across the network.
3. Orderer node: this node is communication backbone for the blockchain network. it is responsible of distribution of transactions. It is like a jack that takes each transaction state from other nodes and make sure that it is synced at each distributed ledger of all the network nodes.
Channel:
Members can participate on multiple Hyperledger Blockchain networks. The transaction in each network is isolated. This is possible with the help of channel.
Peers are connected to the channel and they can receive all the transaction that are getting broadcasted on that channel. The channel has its own independent ledger, if there are two channels then there are two different ledgers are maintained by each channel. There is no visibility for peer connected to one channel into the ledger of another channel.
For example, I own a chocolate company and sell the chocolates to distributors through a channel with the cost 50Rs and there is another channel created by me to sell the same chocolate to the one of my friend who is also a distributor at the cost of 30Rs, it can be done using the Hyperledger Fabric as it provides us to create the different private channels with any entities we want.
Fabric Composer:
A composer is a Hyperledger open development toolset that makes the teams to create and manage business network application(BNA) that are deployed on the Hyperledger technology. The primary goal is to accelerate the development of blockchain applications on Hyperledger.
Benefits to use composer:
1. Reduced time to value
2. It hides the complexity of the underlying infrastructure
3. Composer offers Business modelling capability by way of modelling language that can easily be used by non-technical team members.
4. The smart contract or the transaction are coded in the JavaScript which most developers are familiar.
Composer development tools:
1. Tools for Dev/Architects
2. Tools for Operations
3. Tools for Administrators
4. Tools for Business Analyst
Development process:
The domain expert such as business analyst uses the composer modelling language to create the business network model. The composer modelling language is as object-oriented language for defining the domain model for the business network. the developer takes the business model and codes the transaction specification in the business network model in JavaScript to create the final application that consist of the JavaScript based transaction and the business domain model in the composer modelling language.
Execution Runtime:
The administrator uses the composer tools to deploy the business network application to the execution runtime. The execution runtime is based on Hyperledger Fabric 1.x and this is the blockchain network on which application get deployed. The operators use the tools to maintain the health of the application on the business network.
Playground:
It is one of the runtime environments and it is primarily use by the domain experts and the developers. The playground is available as web application. It is used by developers and domain experts to create the business network model. The business network model created by playground is stored in local storage. The other purpose of playground is simulated testing of business network application.
You can define assets, participant all the transaction formats.