Hyperledger Composer is an open framework device to make blockchain programs efficient to a large extent. It linked the blockchain application with the records of business systems. It allows the developers to create full-stack blockchain application solutions. It uses the Hyperledger Fabric architecture to enable the protocols and policies and to have verified transactions. The current business network can be easily monitored by Hyperledger Composer which can include the assets, services, property, etc.
Below are some of the concepts in Hyperledger Composer:
Below are some of the components of Hyperledger Composer:
1. Yeoman code generator:
2. Javascript Software development toolkit and framework like Angular JS (JS SDK):
3. Command Line Interface(CLI):
4. REST web servers and APIs:
5. LoopBack Connector:
6. Web User Interface:
7. Execution Runtimes:
The operation of Hyperledger Composer consists of Assets, Participants, and Transactions.
Hyperledger Composer uses the Open Source Yeoman code generator framework to create skeleton projects:
As you can see above this is the basic structure of hyperledger composer architecture.
It has a model file (.cto) , anything related to the definition of participant assets or transactions inside your business network will be modeled inside model file.
For an analogue Let’s say if you’re doing auction business that work. Inside the auction business we’re going to have participants and the auctioneer, so auctioneer and participants can be modeled. Apart from that, asserts which are going to be auctioned off will also be modeled. And finally the transactions which will be placed for the bidding of auctions will also be modeled
The definition of model file is very similar to the class definitions in other programming languages like Java or C #.
The second one is transaction processor file (.js). This transaction processor file is written in JavaScript, and it utilizes the concepts of promises. Transaction processor file will be linked with the model file and any transactions defined in model file will provide the business logic inside transaction processor file. So, this transaction processor file will be used to define the calculations and business operations. This transaction processor file will also creator to the events as they have been defined inside the model file, and will emit the events inside your transaction processing file.
The access control file (.acl) is a permission file, anything related to providing different participants or asserts will be modeled inside the access control file. Structure of access control file is very similar to JSON structure. It has some standard roles and configurations need to be followed and by following those rules and configuration provides different set of permissions inside this file.
This file always follow the first-in approach. so the rule which you have provided as the first entry inside this file will be taken as a valid. If multiple rules are provided, then those rules will be applied in the form of continuation as the appearance of this file.
Query definition file(.qry) is used to retrieve data from the blockchain. you can drive different information such as asset, participants or transactions on the blockchain. This query file offers you a rich query format which is very similar to English language, and the information can be directly retrieved from the blockchain using query definitions.
All these four files together forms the base of the business network inside hyperledger composer. These four files are fed into the hyperledger composer compiler, it compiles them into a one single business network archive (.bna) this file is acceptable by environments such as fabric runtime environment or executable NodeJS environment. You can choose where you want to deploy this business network archive, you can deploy this locally on the hyperledger fabric within your system, or you can also define it on the web browser such as playground, which is available for testing out your business.
So this business network archive is the important entity inside hyperledger composer and this is something like a compiled version of the four files which we have included. This business network archive will be the business network and will act as a smart content which will be deployed over the blockchain.
For similar blog click
For more information contact XpertLab