Composer is a framework to accelerate the development of applications built on the top of Blockchain platform such as Hyperledger Fabric.Here we have complete information about Composer and Playground
for more information please visit our youtube channel
https://www.youtube.com/edit?o=U&video_id=EvICyArbFSs
www.rihusoft.com
2. Hyperledger Tools
Set of collaboration tools for building blockchain networks that make it simple and quick
for development.
Hyperledger Composer
Composer is a tool for building blockchain business networks, It used to create
smart contracts and blockchain applications to solve business problems.
Hyperledger Explorer
Explorer is a tool which provides a dashboard viewing information about
transactions ,blocks and smart contracts available on the network.
Hyperledger Cello
Cello can build up a Blockchain as a Service (BaaS) platform quickly from the
scratch. It reduce the effort required for creating, managing and terminating
blockchains.
4. HyperLedger Composer
Composer is a framework to accelerate the development of applications built on the
top of Blockchain platform such as Hyperledger Fabric
Start from the business level :model network assets, participants & transactions
Build Applications that use API's to invoke transactions, that create, update &delete
Assets are transfer between participants
Assets, participants ,transactions are recorded on Blockchain registries
Can easily integrate blockchain with existing business processes & system records
Modelling language: The Hyperledger Composer modelling language is used in the
business network definition to describe the assets, participants, and transactions in
the business network
7. Asserts :- Assets are tangible or intangible goods, services, or property, and are stored
in registries.
Participants :- Participants are members of a business network. They may own assets
and submit transactions.
Peers :- Each node (a computer connected to the network) is called peer
Transactions :-Transactions are the mechanism by which participants interact with
assets, i.e transferring ownership of the asset from participant to
participant
Queries :-Queries are used to return data about the blockchain world-state. Queries are
defined within a business network
Events:- Once events have been defined, they can be emitted by transaction processor
functions to indicate to external systems that something of importance has
happened to the ledger
Terminology
8. Prerequisites:
Operating Systems: Ubuntu Linux 14.04 / 16.04 LTS (both 64-bit), or Mac OS 10.12
Docker Engine: Version 17.03 or higher
Docker-Compose: Version 1.8 or higher
Node: 8.9 or higher (note version 9 is not supported)
npm: v5.x
git: 2.9.x or higher
composer-cli
Yeoman generator
composer-rest-server
9. Developing Business from Composer
Creating business network with model,java Script and permission.acl files
Next generate the business network archieve file with .bna extension
Install composer run time for our business network with peer admin card
Start the composer network and deploy bna file
Import the network administrator identity card
To check that the business network has been deployed successfully or not we
can just ping the business network
To create the REST API run the “composer-rest-server” from terminal
For tutorial “https://youtu.be/EvICyArbFSs”
10. HyperLedger Composer Rest API
After creating composer rest server for our business network we can access the API from localhost
3000 port and we can do transaction from API and also the data will store in Couchdb
11. Couchdb
We can access couchdb at localhost 5984 port ,all transaction done from rest api and playground
Will store in couchdb in the form of documents with unique id
12. Composer Playground
The Hyperledger Composer Playground provides a user interface for the
configuration, deployment and testing of a business network
Without development environment setup we can still develop business network by
playground
In playground we can create or import network.bna file to generate or develop
business network
Playground mainly deals with assets, participants and transactions
If we do anything in the business network that will be save in transaction history
which cannot be change
Define tab:- Define tab we can define and work with model for your business network
Test tab:-can create assets and participants that were defined in the Define tab, and
test the functionality of your business network..
13. Developing Business network in playground
Click Deploy a new business network
Click empty-business-network then Deploy the Business network
To connect to our business network click Connect now under our business
network card.
Then add model file,script file and Access control file
Click Update to deploy the changes to our business network
Click the Test tab to test our Business network
The first thing we should add to our business network is to add participants
and assests.
Click the Submit Transaction button to submit our transactions
We can see all transactions in our business network by Click All Transactions
15. HyperLedger-Composer PlayGround
These are all different id cards for different participants in the business network.By clicking
Connect now on card we can connect to business network by that participant id
16. Deploying a business network to Hyperledger Fabric for a
single organization
Step-1 : Setup the development environment.
- https://hyperledger.github.io/composer/unstable/installing/development-tools.html
Step-2 : Build and start a Hyperledger Fabric network.
- http://hyperledger-fabric.readthedocs.io/en/release/build_network.html
Step-3 : Setup configuration tools cryptogen and configtxgen.
Step-4 : Create a connection profile use to connect with the Fabric network.
Step-5 : Locate the certificate and private key for the administrator.
17. Step-6 : Create a business network card that contains all of the information required to
connect to the business network. i.e, It includes Connection profile, Private key and
Certificate.
Step-7 : Import the business network card for the Hyperledger Fabric administrator.
Step-8 : Install Composer runtime onto all of the Hyperledger Fabric peer nodes,
this is nothing but a chaincode install operation. Here we specify the name of the
blockchain business network.
Step-9 : Start the blockchain business network, this is chaincode instantiate operation.
Step-10 : Import the business network card for the business network administrator.
Step-11 : Check that the business network has been deployed successfully.
Step-12: Generate a REST API based on the business network.