SlideShare a Scribd company logo
1 of 75
Download to read offline
Intelligent Blockchain Engineering Lab
Department of Computer Science Engineering
Korea University
November 2019
MPYANA MWAMBA MERLEC
AN INTRODUCTION TO
Agenda
2
Business network concepts
Hyperledger Composer overview
Hyperledger Composer Playground
Intro to Modeling language
Model & Test a business network
Blockchain Business Network
3
Business Network Concepts
4
 It provides connectivity
 Connects customers, suppliers, banks and partners
 Across geographically and regulatory boundaries
 Wealth is generated by the flow of goods
& services across the business network
 Markets are the key to this process:
 Public (food market, car auction, appliances, etc.)
 Private (supply chain, financing, bonds)
Business Network is a group of entities who work together to accomplish certain goals
Business Network Concepts
5
 Asset is anything capable of being owned or controlled and exchanged to produce value
 Two main types of assets: Assets
Anything of value
Tangible
House, car, smartphone,
Intangible
Loan, patents, service, data
Financial
Bond, loan, etc.
Digital
Bitcoin, MP3 file
Intellectual
Patents, ©, etc.
※ Cash is also an asset that has property of anonymity.
Business Network Concepts
6
 Ledger – the system of record for a business
 Used to record transactions (asset transfer between participants)
 Business might have multiple ledgers for multiple business networks where
they are involved.
 Participants – members of a business network
 Customer, Supplier, Government, Regulator
 Usually resides in an organization
 Has specific identities and roles
 Transaction – an asset transfer
 e.g. Merlec gives a Car to Daegeon Lee
 Transactions are used to interact with assets
 Contract – document containing conditions for a
transaction to occur
 If Daegeon Lee pays Merlec money, then car passes from Merlec to
Daegeon Lee
 A contract for shipment of 100 pieces of smartphones for X price
based on conditions {X, Y, Z}
Business Network – Car Auction Market
7
A Business network describes any group of organizations or individuals that connect with a desire to transfer or share assets.
DMV – Department of Motor Vehicles
Actors in a Fabric Business Network
Infrastructure
8
Hyperledger Fabric permissioned blockchain
network is a technical infrastructure that
provides ledger service to app. consumer
and administrators.
9
Actors in a Fabric Business Network Infrastructure
Conceptual Components & Structure of
Composer
10
Key Actors in Blockchain domains
11
How Applications interact with the ledger
12
World State Examples:
myCar.vin = 1234
myCar.owner = Merlec
myCar.make = Kim
…
Smart contact implementation :
setOwner(Car, newOwner) {
set Car.owner = newOwner
}
Transaction submitted input :
invoke(myContract, setOwner,
myCar, Merlec)
Hyperledger Integration with Existing
Systems
13
Blockchain Network Integration with Existing Systems — Source: IBM Code Tech Talk
Introduction to the Hyperledger Development
Environment
14
15
 An extensive, open development toolset and framework for blockchain applications
developing, and consists of :
 A modeling language called CTO (an homage to the original project name, Concerto)
 A user interface called Hyperledger Composer Playground
 For quick and easy definition, configuration, deployment, and testing of business networks
 Command-Line Interface (CLI) tools for integrating modeled business networks
 using Hyperledger Composer with a running instance of the Hyperledger Fabric blockchain network
Hyperledger Development Environment
16
Hyperledger Platform Layer
Architecture
Elements of Hyperledger Composer
17
Elements of Hyperledger Composer
18
 Blockchain State Storage
 All transactions submitted through a business network are stored on the blockchain ledger
 The current state of assets and participants are stored in the blockchain state database
 The ledger and the state database are distributed across a set of peers
 The blockchain ensures that updates to the ledger and state DB are consistent across all peers using a consensus algorithm
 Connection Profile
 It is a JSON document that is part of a business network card.
 Hyperledger Composer uses Connection Profiles to define the system to connect to.
 Business Network Card
 It is a combination of an identity, a connection profile, and metadata.
 the metadata optionally containing the name of the business network to connect to.
Hyperledger Composer System Overview
19
Model & Test a Business Network
using Hyperledger Composer Playground
20
Resources & Skills Needed
21
Business Network Definition (BND)
22
Hyperledger composer has its own modeling
language used to model the business network
 BND is a key concept of Hyperledger Composer
programming model. They are represented by :
 BusinessNetworkDefinition class:
 defined in composer-common module
 exported by both composer-admin and composer-client.
 Business Network Definitions are composed of :
 a set of model files (.cto)
 a set of JavaScript files (.js)
 an Access Control file (.acl)
Prerequisites:
 Docker Engine 17.03 or greater
https://docs.docker.com/install/
 Web browser
Hyperledger Composer Playground
23
 A user interface environment enabling
 Quick and easy definition, configuration, deployment, and testing of business networks
※ It reduces the complexity of getting a business
network defined, validated, and tested.
http://composer-playground.mybluemix.net/
Playground Basic Model Network
24
※ Hello World Business Network Model Definition and Test
- Model files (.cto) - defines the hello world business network
- JavaScript files (.js) - contain transaction processor function that print
“Hello world” to the console.
My First Business Network on
Playground
25
Business Network card is a combination of
an identity, a connection profile, and metadata.
※ the metadata optionally containing the name of
the business network to connect to.
My First Business Network on
Playground
26
My First Business Network on
Playground
27
My First Business Network on
Playground
28
My First Business Network on
Playground
29
30
Hyperledger Composer Modeling Language
Hyperledger Composer includes an object-oriented modeling language (CTO)
Used to define the domain model for a business network definition.
 CTO file is composed of the following elements:
① A single namespace - All resource declarations within the file are implicitly in this namespace
② A set of resource definitions, encompassing assets, transactions, participants, and events
③ Optional import declarations that import resources from other namespaces
※ A class in Hyperledger Composer is referred to as a Resource Definition, therefore an asset instance has an Asset Definition.
※ Concepts are abstract classes that are not assets, participants or transactions.
 They are typically contained by an asset, participant or transaction.
My First Business Network Definition
31
The namespace in which resources are defined.
※ A name must be unique within the namespace
The property (indicated by lowercase "o") of
type String, and uniquely identifies an asset
(as indicated by identified by).
The reference (indicated by -->) to Contract
is called a relationship, and is one-way
(unidirectional.)
My First Business Network Definition
32
My First Business Network Definition
33
The @param and @transaction
annotations are required.
- @param tag to indicate the
parameter definition,
followed by the resource
name of the Tx which
triggers the transaction
processor function.
- @transaction tag identifies
the code as a transaction
processor function.
Script file contains transaction
processor functions implementing
the transactions defined in the
Business Network Definition's
model files.
My First Business Network Definition
34
Access Control Language (ACL)
provides declarative access control
over the elements of the domain
model.
 ACL rules determine which users/roles
are permitted to create, read, update or
delete elements in a business network's
domain model.
My First Business Network Definition
35
My First Business Network – Initialize Asset
Registry
36
37
My First Business Network – Initialize Asset Registry
My First Business Network – Initialize Asset
Registry
38
My First Business Network – Initialize Asset
Registry
39
My First Business Network – Initialize Asset
Registry
40
My First Business Network – Initialize Asset
Registry
41
My First Business Network – Initialize Asset
Registry
42
My First Business Network – Initialize Asset
Registry
43
My First Business Network – Initialize Asset
Registry
44
My First Business Network – Transaction
submission
45
※ For simplicity in our demo,
specify the transaction ID to
pass to it as parameter.
Select the corresponding
transaction to submit.
Testing My First Business Network
46
Playground Model Network Starter
Templates
47
Business Network Definition – Car Auction
Market
48
Car Auction Business Network
49
Car Auction Business Network
50
Car Auction Business Network
51
The new business network
definition project has been
created.
Admin ID Card provides all
of the information needed to
connect/deploy the business
network definition to a
distributed ledger.
※ kcaraution-net is composed of :
- Model files (.cto) - define the business domain for a business network
- JavaScript files (.js) - contain transaction processor functions.
- Access Control file (.acl) - contains a set of access control rules that
define the rights of the different participants in the business network.
Car Auction Business Network
52
※ User ID Cards include connection profiles and credentials used to
deploy a Business Network to a distributed ledger.
Car Auction Business Network
53
54
About - README.md, package.json
55
About - README.md, package.json
56
About - README.md, package.json
57
Model File - models/auction.cto
Assets and enumerated
types declaration
Participants and transactions
declarations
※ Assets, Participants and Transactions are class
definitions.
These concepts may be considered to be different
stereotypes of the class type.
A namespace defined by the
namespace of it parent file.
Enumerated types are used
to specify a type that may
have 1 or N possible
values (set of values).
58
Script File - lib/logic.js
Script File - lib/logic.js
59
60
Script File - lib/logic.js
61
Access Control - permissions.acl
62
Access Control - permissions.acl
63
Car Auction Business Network - Auctioneer
64
Car Auction Business Network - Auctioneer
65
Car Auction Business Network - Auctioneer
66
Car Auction Business Network - Member
67
Car Auction Business Network - Member
68
Car Auction Business Network – Vehicle (Assets)
69
Car Auction Business Network – Vehicle (Assets)
70
Car Auction Business Network – VehicleListing
71
Car Auction Business Network – VehicleListing
72
Car Auction Business Network – All Transactions
73
Hyperledger Composer Sample Apps.
 HLF-Acme-Airlines - https://github.com/cefeboru/HLF-Acme-Airlines
 https://github.com/hyperledger/composer
References
74
[1] Androulaki, Elli, et al. "Hyperledger fabric: a distributed operating system for permissioned blockchains." Proceedings of the Thirteenth EuroSys
Conference. ACM, 2018. https://dl.acm.org/citation.cfm?id=3190538
[2] Vance Morris et al., " Developing a blockchain Business Network with Hyperledger composer using the IBM blockchain platform starter plan ",
IBM RedBook, May 2018 | http://www.redbooks.ibm.com/redpapers/pdfs/redp5492.pdf
[3] Bob Dill, David Smits, " Zero to Blockchain : An IBM Redbooks course ", https://www.redbooks.ibm.com/abstracts/crse0401.html?Open
[4] Hyperledger Composer Developer Tutorials, https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial
[5] J Steven Perry, Hyperledger Composer basics, Part 1: Model and test your blockchain network,
https://www.ibm.com/developerworks/cloud/library/cl-model-test-your-blockchain-network-with-hyperledger-composer-playground/index.html
[6] LinuxFoundationX: LFS171x Blockchain for Business - An Introduction to Hyperledger Technologies, edx MOOC 2017
[7] Hyperledger Architecture, Volume 2: Smart Contracts - https://www.hyperledger.org/wp-content/uploads/2018/04/Hyperledger_Arch_WG_Paper_2_SmartContracts.pdf
[8] https://docs.docker.com/install/#releases | https://www.hyperledger.org/resources/publications#presentations
[9] https://developer.ibm.com/code/wp-content/uploads/sites/118/2017/09/Marbles_BlockChain_Tech_Talk1.pdf
[10] https://developer.ibm.com/blockchain/ | https://www.ibm.com/developerworks/cloud/library/cl-blockchain-basics-intro-bluemix-trs/
[11] Hyperledger Composer Introduction and Playground Tutorial (with Demo Code) , https://www.srcmake.com/home/composer (Accessed Sep. 2018)
[12] Hyperledger Composer Modeling Language, https://hyperledger.github.io/composer/latest/reference/cto_language.html
[13] https://developer.ibm.com/patterns/build-a-blockchain-network/
Q & A
75
mlecjm@korea.ac.kr mlecjm

More Related Content

What's hot

What is tokenization in blockchain?
What is tokenization in blockchain?What is tokenization in blockchain?
What is tokenization in blockchain?Ulf Mattsson
 
Blockchain based Security Architectures - A Review
Blockchain based Security Architectures - A ReviewBlockchain based Security Architectures - A Review
Blockchain based Security Architectures - A ReviewGokul Alex
 
Use case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTUUse case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTURohit Verma
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsGokul Alex
 
Blockchain tutorial
Blockchain tutorial Blockchain tutorial
Blockchain tutorial Rohit Verma
 
Blockchain Security and Privacy
Blockchain Security and PrivacyBlockchain Security and Privacy
Blockchain Security and PrivacyAnil John
 
Why we need to get savvy about blockchain
Why we need to get savvy about blockchainWhy we need to get savvy about blockchain
Why we need to get savvy about blockchainChristopher Stanley LR
 
IRJET- Blockchain Technology in Cloud Computing : A Systematic Review
IRJET-  	  Blockchain Technology in Cloud Computing : A Systematic ReviewIRJET-  	  Blockchain Technology in Cloud Computing : A Systematic Review
IRJET- Blockchain Technology in Cloud Computing : A Systematic ReviewIRJET Journal
 
Blockchain in Insurance 101
Blockchain in Insurance 101Blockchain in Insurance 101
Blockchain in Insurance 101Peter Ing
 
The Microsoft vision for Blockchain
The Microsoft vision for BlockchainThe Microsoft vision for Blockchain
The Microsoft vision for BlockchainASPEX_BE
 
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...eraser Juan José Calderón
 
Huashan chen, marcus pendleton, laurent njilla, and shouhuai xu
Huashan chen, marcus pendleton, laurent njilla, and shouhuai xuHuashan chen, marcus pendleton, laurent njilla, and shouhuai xu
Huashan chen, marcus pendleton, laurent njilla, and shouhuai xuIT Strategy Group
 
Building Blockchain Projects on Enterprise Ethereum [Webinar]
Building Blockchain Projects on Enterprise Ethereum [Webinar] Building Blockchain Projects on Enterprise Ethereum [Webinar]
Building Blockchain Projects on Enterprise Ethereum [Webinar] Kaleido
 
Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...
Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...
Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...Floyd DCosta
 
Blockchain 3.0 - Decentral Applications
Blockchain 3.0 - Decentral ApplicationsBlockchain 3.0 - Decentral Applications
Blockchain 3.0 - Decentral ApplicationsBart Waeterschoot
 
Microsoft Accelerator event- Blockchain technology from disruptive concept to...
Microsoft Accelerator event- Blockchain technology from disruptive concept to...Microsoft Accelerator event- Blockchain technology from disruptive concept to...
Microsoft Accelerator event- Blockchain technology from disruptive concept to...Hila Bar
 
Rui zhang and rui xue, georgia tech
Rui zhang and rui xue, georgia techRui zhang and rui xue, georgia tech
Rui zhang and rui xue, georgia techIT Strategy Group
 
Security Model of Blockchain
Security Model of BlockchainSecurity Model of Blockchain
Security Model of Blockchainsaficus
 

What's hot (20)

What is tokenization in blockchain?
What is tokenization in blockchain?What is tokenization in blockchain?
What is tokenization in blockchain?
 
Blockchain based Security Architectures - A Review
Blockchain based Security Architectures - A ReviewBlockchain based Security Architectures - A Review
Blockchain based Security Architectures - A Review
 
Use case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTUUse case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTU
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance Models
 
Blockchain tutorial
Blockchain tutorial Blockchain tutorial
Blockchain tutorial
 
Blockchain Security and Privacy
Blockchain Security and PrivacyBlockchain Security and Privacy
Blockchain Security and Privacy
 
Why we need to get savvy about blockchain
Why we need to get savvy about blockchainWhy we need to get savvy about blockchain
Why we need to get savvy about blockchain
 
IRJET- Blockchain Technology in Cloud Computing : A Systematic Review
IRJET-  	  Blockchain Technology in Cloud Computing : A Systematic ReviewIRJET-  	  Blockchain Technology in Cloud Computing : A Systematic Review
IRJET- Blockchain Technology in Cloud Computing : A Systematic Review
 
Blockchain in Insurance 101
Blockchain in Insurance 101Blockchain in Insurance 101
Blockchain in Insurance 101
 
The Microsoft vision for Blockchain
The Microsoft vision for BlockchainThe Microsoft vision for Blockchain
The Microsoft vision for Blockchain
 
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
 
Blockchain
BlockchainBlockchain
Blockchain
 
Huashan chen, marcus pendleton, laurent njilla, and shouhuai xu
Huashan chen, marcus pendleton, laurent njilla, and shouhuai xuHuashan chen, marcus pendleton, laurent njilla, and shouhuai xu
Huashan chen, marcus pendleton, laurent njilla, and shouhuai xu
 
Building Blockchain Projects on Enterprise Ethereum [Webinar]
Building Blockchain Projects on Enterprise Ethereum [Webinar] Building Blockchain Projects on Enterprise Ethereum [Webinar]
Building Blockchain Projects on Enterprise Ethereum [Webinar]
 
Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...
Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...
Blockchain Defined Perimeter (BDP) - Maximum cybersecurity for critical syste...
 
Blockchain 3.0 - Decentral Applications
Blockchain 3.0 - Decentral ApplicationsBlockchain 3.0 - Decentral Applications
Blockchain 3.0 - Decentral Applications
 
Microsoft Accelerator event- Blockchain technology from disruptive concept to...
Microsoft Accelerator event- Blockchain technology from disruptive concept to...Microsoft Accelerator event- Blockchain technology from disruptive concept to...
Microsoft Accelerator event- Blockchain technology from disruptive concept to...
 
Block Chain Basics
Block Chain BasicsBlock Chain Basics
Block Chain Basics
 
Rui zhang and rui xue, georgia tech
Rui zhang and rui xue, georgia techRui zhang and rui xue, georgia tech
Rui zhang and rui xue, georgia tech
 
Security Model of Blockchain
Security Model of BlockchainSecurity Model of Blockchain
Security Model of Blockchain
 

Similar to 03 - An introduction to hyperledger composer

Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger ComposerSimon Stone
 
Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Dr. Ketan Parmar
 
Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Dr. Ketan Parmar
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerTracy Kuhrt
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and ToolsRihusoft
 
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM France Lab
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18TelecomValley
 
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & Composer
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & ComposerIBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & Composer
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & ComposerIBM France Lab
 
Blockchain solution architecture deliverable
Blockchain solution architecture deliverableBlockchain solution architecture deliverable
Blockchain solution architecture deliverableSarmad Ibrahim
 
Fabric Composer - Construct 2017
Fabric Composer - Construct 2017Fabric Composer - Construct 2017
Fabric Composer - Construct 2017Simon Stone
 
Blockchain for Business
Blockchain for BusinessBlockchain for Business
Blockchain for BusinessAhmad Gohar
 
Gluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain ApplicationsGluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain ApplicationsDuncan Johnston-Watt
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxdeepaksingh160910
 
Deploying and Managing a Global Blockchain Network
Deploying and Managing a Global Blockchain NetworkDeploying and Managing a Global Blockchain Network
Deploying and Managing a Global Blockchain NetworkDuncan Johnston-Watt
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0Matt Lucas
 
Blockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperBlockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperProperty Bihar
 

Similar to 03 - An introduction to hyperledger composer (20)

Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
 
Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Hyperledger Fabric & Composer
Hyperledger Fabric & Composer
 
Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp Hyperledger
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and Tools
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18
 
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & Composer
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & ComposerIBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & Composer
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & Composer
 
Blockchain solution architecture deliverable
Blockchain solution architecture deliverableBlockchain solution architecture deliverable
Blockchain solution architecture deliverable
 
Aspmvc
AspmvcAspmvc
Aspmvc
 
Fabric Composer - Construct 2017
Fabric Composer - Construct 2017Fabric Composer - Construct 2017
Fabric Composer - Construct 2017
 
Blockchain for Business
Blockchain for BusinessBlockchain for Business
Blockchain for Business
 
Gluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain ApplicationsGluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain Applications
 
Blockchain spreads
Blockchain spreadsBlockchain spreads
Blockchain spreads
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptx
 
Deploying and Managing a Global Blockchain Network
Deploying and Managing a Global Blockchain NetworkDeploying and Managing a Global Blockchain Network
Deploying and Managing a Global Blockchain Network
 
Introduction to Fabric Composer
Introduction to Fabric ComposerIntroduction to Fabric Composer
Introduction to Fabric Composer
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0
 
Blockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperBlockchain Tech Approach Whitepaper
Blockchain Tech Approach Whitepaper
 

Recently uploaded

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 

Recently uploaded (20)

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 

03 - An introduction to hyperledger composer

  • 1. Intelligent Blockchain Engineering Lab Department of Computer Science Engineering Korea University November 2019 MPYANA MWAMBA MERLEC AN INTRODUCTION TO
  • 2. Agenda 2 Business network concepts Hyperledger Composer overview Hyperledger Composer Playground Intro to Modeling language Model & Test a business network
  • 4. Business Network Concepts 4  It provides connectivity  Connects customers, suppliers, banks and partners  Across geographically and regulatory boundaries  Wealth is generated by the flow of goods & services across the business network  Markets are the key to this process:  Public (food market, car auction, appliances, etc.)  Private (supply chain, financing, bonds) Business Network is a group of entities who work together to accomplish certain goals
  • 5. Business Network Concepts 5  Asset is anything capable of being owned or controlled and exchanged to produce value  Two main types of assets: Assets Anything of value Tangible House, car, smartphone, Intangible Loan, patents, service, data Financial Bond, loan, etc. Digital Bitcoin, MP3 file Intellectual Patents, ©, etc. ※ Cash is also an asset that has property of anonymity.
  • 6. Business Network Concepts 6  Ledger – the system of record for a business  Used to record transactions (asset transfer between participants)  Business might have multiple ledgers for multiple business networks where they are involved.  Participants – members of a business network  Customer, Supplier, Government, Regulator  Usually resides in an organization  Has specific identities and roles  Transaction – an asset transfer  e.g. Merlec gives a Car to Daegeon Lee  Transactions are used to interact with assets  Contract – document containing conditions for a transaction to occur  If Daegeon Lee pays Merlec money, then car passes from Merlec to Daegeon Lee  A contract for shipment of 100 pieces of smartphones for X price based on conditions {X, Y, Z}
  • 7. Business Network – Car Auction Market 7 A Business network describes any group of organizations or individuals that connect with a desire to transfer or share assets. DMV – Department of Motor Vehicles
  • 8. Actors in a Fabric Business Network Infrastructure 8 Hyperledger Fabric permissioned blockchain network is a technical infrastructure that provides ledger service to app. consumer and administrators.
  • 9. 9 Actors in a Fabric Business Network Infrastructure
  • 10. Conceptual Components & Structure of Composer 10
  • 11. Key Actors in Blockchain domains 11
  • 12. How Applications interact with the ledger 12 World State Examples: myCar.vin = 1234 myCar.owner = Merlec myCar.make = Kim … Smart contact implementation : setOwner(Car, newOwner) { set Car.owner = newOwner } Transaction submitted input : invoke(myContract, setOwner, myCar, Merlec)
  • 13. Hyperledger Integration with Existing Systems 13 Blockchain Network Integration with Existing Systems — Source: IBM Code Tech Talk
  • 14. Introduction to the Hyperledger Development Environment 14
  • 15. 15  An extensive, open development toolset and framework for blockchain applications developing, and consists of :  A modeling language called CTO (an homage to the original project name, Concerto)  A user interface called Hyperledger Composer Playground  For quick and easy definition, configuration, deployment, and testing of business networks  Command-Line Interface (CLI) tools for integrating modeled business networks  using Hyperledger Composer with a running instance of the Hyperledger Fabric blockchain network
  • 17. Elements of Hyperledger Composer 17
  • 18. Elements of Hyperledger Composer 18  Blockchain State Storage  All transactions submitted through a business network are stored on the blockchain ledger  The current state of assets and participants are stored in the blockchain state database  The ledger and the state database are distributed across a set of peers  The blockchain ensures that updates to the ledger and state DB are consistent across all peers using a consensus algorithm  Connection Profile  It is a JSON document that is part of a business network card.  Hyperledger Composer uses Connection Profiles to define the system to connect to.  Business Network Card  It is a combination of an identity, a connection profile, and metadata.  the metadata optionally containing the name of the business network to connect to.
  • 20. Model & Test a Business Network using Hyperledger Composer Playground 20
  • 21. Resources & Skills Needed 21
  • 22. Business Network Definition (BND) 22 Hyperledger composer has its own modeling language used to model the business network  BND is a key concept of Hyperledger Composer programming model. They are represented by :  BusinessNetworkDefinition class:  defined in composer-common module  exported by both composer-admin and composer-client.  Business Network Definitions are composed of :  a set of model files (.cto)  a set of JavaScript files (.js)  an Access Control file (.acl)
  • 23. Prerequisites:  Docker Engine 17.03 or greater https://docs.docker.com/install/  Web browser Hyperledger Composer Playground 23  A user interface environment enabling  Quick and easy definition, configuration, deployment, and testing of business networks ※ It reduces the complexity of getting a business network defined, validated, and tested. http://composer-playground.mybluemix.net/
  • 24. Playground Basic Model Network 24 ※ Hello World Business Network Model Definition and Test - Model files (.cto) - defines the hello world business network - JavaScript files (.js) - contain transaction processor function that print “Hello world” to the console.
  • 25. My First Business Network on Playground 25 Business Network card is a combination of an identity, a connection profile, and metadata. ※ the metadata optionally containing the name of the business network to connect to.
  • 26. My First Business Network on Playground 26
  • 27. My First Business Network on Playground 27
  • 28. My First Business Network on Playground 28
  • 29. My First Business Network on Playground 29
  • 30. 30 Hyperledger Composer Modeling Language Hyperledger Composer includes an object-oriented modeling language (CTO) Used to define the domain model for a business network definition.  CTO file is composed of the following elements: ① A single namespace - All resource declarations within the file are implicitly in this namespace ② A set of resource definitions, encompassing assets, transactions, participants, and events ③ Optional import declarations that import resources from other namespaces ※ A class in Hyperledger Composer is referred to as a Resource Definition, therefore an asset instance has an Asset Definition. ※ Concepts are abstract classes that are not assets, participants or transactions.  They are typically contained by an asset, participant or transaction.
  • 31. My First Business Network Definition 31 The namespace in which resources are defined. ※ A name must be unique within the namespace The property (indicated by lowercase "o") of type String, and uniquely identifies an asset (as indicated by identified by). The reference (indicated by -->) to Contract is called a relationship, and is one-way (unidirectional.)
  • 32. My First Business Network Definition 32
  • 33. My First Business Network Definition 33 The @param and @transaction annotations are required. - @param tag to indicate the parameter definition, followed by the resource name of the Tx which triggers the transaction processor function. - @transaction tag identifies the code as a transaction processor function. Script file contains transaction processor functions implementing the transactions defined in the Business Network Definition's model files.
  • 34. My First Business Network Definition 34 Access Control Language (ACL) provides declarative access control over the elements of the domain model.  ACL rules determine which users/roles are permitted to create, read, update or delete elements in a business network's domain model.
  • 35. My First Business Network Definition 35
  • 36. My First Business Network – Initialize Asset Registry 36
  • 37. 37 My First Business Network – Initialize Asset Registry
  • 38. My First Business Network – Initialize Asset Registry 38
  • 39. My First Business Network – Initialize Asset Registry 39
  • 40. My First Business Network – Initialize Asset Registry 40
  • 41. My First Business Network – Initialize Asset Registry 41
  • 42. My First Business Network – Initialize Asset Registry 42
  • 43. My First Business Network – Initialize Asset Registry 43
  • 44. My First Business Network – Initialize Asset Registry 44
  • 45. My First Business Network – Transaction submission 45 ※ For simplicity in our demo, specify the transaction ID to pass to it as parameter. Select the corresponding transaction to submit.
  • 46. Testing My First Business Network 46
  • 47. Playground Model Network Starter Templates 47
  • 48. Business Network Definition – Car Auction Market 48
  • 49. Car Auction Business Network 49
  • 50. Car Auction Business Network 50
  • 51. Car Auction Business Network 51 The new business network definition project has been created. Admin ID Card provides all of the information needed to connect/deploy the business network definition to a distributed ledger. ※ kcaraution-net is composed of : - Model files (.cto) - define the business domain for a business network - JavaScript files (.js) - contain transaction processor functions. - Access Control file (.acl) - contains a set of access control rules that define the rights of the different participants in the business network.
  • 52. Car Auction Business Network 52 ※ User ID Cards include connection profiles and credentials used to deploy a Business Network to a distributed ledger.
  • 53. Car Auction Business Network 53
  • 54. 54 About - README.md, package.json
  • 55. 55 About - README.md, package.json
  • 56. 56 About - README.md, package.json
  • 57. 57 Model File - models/auction.cto Assets and enumerated types declaration Participants and transactions declarations ※ Assets, Participants and Transactions are class definitions. These concepts may be considered to be different stereotypes of the class type. A namespace defined by the namespace of it parent file. Enumerated types are used to specify a type that may have 1 or N possible values (set of values).
  • 58. 58 Script File - lib/logic.js
  • 59. Script File - lib/logic.js 59
  • 60. 60 Script File - lib/logic.js
  • 61. 61 Access Control - permissions.acl
  • 62. 62 Access Control - permissions.acl
  • 63. 63 Car Auction Business Network - Auctioneer
  • 64. 64 Car Auction Business Network - Auctioneer
  • 65. 65 Car Auction Business Network - Auctioneer
  • 66. 66 Car Auction Business Network - Member
  • 67. 67 Car Auction Business Network - Member
  • 68. 68 Car Auction Business Network – Vehicle (Assets)
  • 69. 69 Car Auction Business Network – Vehicle (Assets)
  • 70. 70 Car Auction Business Network – VehicleListing
  • 71. 71 Car Auction Business Network – VehicleListing
  • 72. 72 Car Auction Business Network – All Transactions
  • 73. 73 Hyperledger Composer Sample Apps.  HLF-Acme-Airlines - https://github.com/cefeboru/HLF-Acme-Airlines  https://github.com/hyperledger/composer
  • 74. References 74 [1] Androulaki, Elli, et al. "Hyperledger fabric: a distributed operating system for permissioned blockchains." Proceedings of the Thirteenth EuroSys Conference. ACM, 2018. https://dl.acm.org/citation.cfm?id=3190538 [2] Vance Morris et al., " Developing a blockchain Business Network with Hyperledger composer using the IBM blockchain platform starter plan ", IBM RedBook, May 2018 | http://www.redbooks.ibm.com/redpapers/pdfs/redp5492.pdf [3] Bob Dill, David Smits, " Zero to Blockchain : An IBM Redbooks course ", https://www.redbooks.ibm.com/abstracts/crse0401.html?Open [4] Hyperledger Composer Developer Tutorials, https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial [5] J Steven Perry, Hyperledger Composer basics, Part 1: Model and test your blockchain network, https://www.ibm.com/developerworks/cloud/library/cl-model-test-your-blockchain-network-with-hyperledger-composer-playground/index.html [6] LinuxFoundationX: LFS171x Blockchain for Business - An Introduction to Hyperledger Technologies, edx MOOC 2017 [7] Hyperledger Architecture, Volume 2: Smart Contracts - https://www.hyperledger.org/wp-content/uploads/2018/04/Hyperledger_Arch_WG_Paper_2_SmartContracts.pdf [8] https://docs.docker.com/install/#releases | https://www.hyperledger.org/resources/publications#presentations [9] https://developer.ibm.com/code/wp-content/uploads/sites/118/2017/09/Marbles_BlockChain_Tech_Talk1.pdf [10] https://developer.ibm.com/blockchain/ | https://www.ibm.com/developerworks/cloud/library/cl-blockchain-basics-intro-bluemix-trs/ [11] Hyperledger Composer Introduction and Playground Tutorial (with Demo Code) , https://www.srcmake.com/home/composer (Accessed Sep. 2018) [12] Hyperledger Composer Modeling Language, https://hyperledger.github.io/composer/latest/reference/cto_language.html [13] https://developer.ibm.com/patterns/build-a-blockchain-network/