Back To Home

Hyperledger Composer

 

What Is Hyperledger Composer?

·      Hyperledger Composer is one of the open-source projects under the enterprise blockchain company Hyperledger.

 

·      In reality, it’s a tool for implementing blockchain frameworks. It is a collection of toolsets that can help to integrate the system to existing one without any issues.

 

·      It means, existing networking system can easily cooperate with a new decentralized platform with the help of this technology.

 

·      Thus, to help ease the issue, this technology offers simple tools that developers can understand without overcomplicating the coding process.

 

 

Hyperledger Composer Architecture

§  With the help from Hyperledger Composer sample application, any developer or architect can easily create a fully functioning blockchain network.

§  For example, REST (Representational State Transfer) API for connecting mobile or web applications to any blockchain business logic, any kind of business logic that runs on the blockchain, integration of existing enterprise database with the new decentralized solution, etc.

§  In the Hyperledger Composer architecture, there are a total of eight high-level component’s that you need to know about.

Back To Home

§  Let’s see what eight high-level component –

1.     Execution Runtimes

2.     REST Server

3.     Command Line Interface

4.     JavaScript SDK

5.     VSCode and Atom editor plugins

6.     Yeoman code generator

7.     Playground Web User Interface

8.     LoopBack Connector

 

 

Execution Runtimes

 

·      In the Hyperledger Composer sample application, it offers different pluggable runtimes. Moreover, it now has mainly three implementations of runtime –

·      Hyperledger Fabric v1.2. Here, the state storage is on the distributed ledger.

·      Embedded runtime implementation. Here, the runtime executes within a Node.js process. However, this one is mainly suited for unit testing of business logic. Moreover, the State is in the in-memory key-value store.

·      Web runtime implementation. Here, it executes in a web page and mainly works in Playground. Moreover, here, the State is in the local browser history.

Connection Profiles

·      In reality, the connection profiles mainly help to determine how to link up with the execution runtime. Furthermore, there is plenty of configuration for every type of execution runtime.

Back To Home

·      For example, if you use the Hyperledger Fabric vs. 1.2 runtimes, then it will have TCP/IP ports and addresses of the Fabric peers. Moreover, it would also have cryptographic certificates and many more.

·      As you already know that Connecting profiles are a part of Business network card and Hyperledger Composer sample application.

 

JavaScript SDK

Within the Hyperledger Composer sample application, there’s JavaScript SDK. In reality, the JavaScript SDK is a set of different Node.js APIs. These APIs help developers to create new applications that can interact and manage the created business network.

The APIs are usually divided into two npm modules –

§  Composer-admin: Here, it manages the business network such as upgrading, starting, or installing.

§  Composer-client: This one mainly performs read, delete, create, and update operations on participants and assets. Additionally, it also submits transactions on the business network.

 

Composer-client

·      In reality, this module is basically installed on the local dependency of any application. With its help, you can connect to participants, assets, or submit transaction of a business network. So, this module is extremely necessary.

·      When your network would be in production, you would need this module to add a direct dependency of that application.

 

Composer-admin

·         Anyhow, the admin module would follow the same footsteps as client one, but here it would be installed on the administrative application.

 

·         Using this module, anyone can create or deploy business networks or change their definition.

Command Line Interface

·         The Command-line tool will help administrators or developers to manage or deploy business network definitions. Thus, it’s also an important part of Hyperledger Composer sample application.

 

REST Server

·         Well, the REST server basically generates an Open API or Swagger REST API for the business network. The whole process of generating it happens automatically. Moreover, the REST server would convert the composer model for the business network using an Open API definition.

Back To Home

·         Anyhow, the runtime mainly reads, deletes, updates and creates participants and assets, which allows transactions to be processed or submitted.

 

LoopBack Connector

·         Basically, the REST server uses the LoopBack Connector. However, many integration tools can use it in standalone is those support LoopBack natively. Additionally, the LoopBack tools can also use it for a more advanced level of customization of REST APIs.

 

Playground Web User Interface

·         This one is relatively important in architecture. In reality, it’s a web user interface for testing and defining business networks. Moreover, it ensures that a business analyst would prototype or sample business logic that runs on the Fabric runtime or web.

·          

Yeoman Code Generators

·         The Yeoman Code generator is an open-source framework that generates the skeleton of any project such as –

§  js application

§  Angular web application

§  Skeleton business network

 

VSCode and Atom Editor Extensions

·         Editor extensions of VSCode and Atom are actually the contribution of the vast Composer community. Anyhow, the VSCode is a super powerful extension that can validate ACL files or Composer models. It can also offer syntax highlighting, snippet support, and error detection.

·         On the other hand, the Atom plugin is more of a basic level and can only highlight syntax.

 

Back To Home