SlideShare a Scribd company logo
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 Review
Gokul 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 AKTU
Rohit Verma
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance Models
Gokul 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 Privacy
Anil 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 blockchain
Christopher 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 Review
IRJET Journal
 
Blockchain in Insurance 101
Blockchain in Insurance 101Blockchain in Insurance 101
Blockchain in Insurance 101
Peter Ing
 
The Microsoft vision for Blockchain
The Microsoft vision for BlockchainThe Microsoft vision for Blockchain
The Microsoft vision for Blockchain
ASPEX_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
 
Blockchain
BlockchainBlockchain
Blockchain
Anil Chaurasiya
 
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
IT 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 Applications
Bart 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
 
Block Chain Basics
Block Chain BasicsBlock Chain Basics
Block Chain Basics
University of Hertfordshire
 
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
IT Strategy Group
 
Security Model of Blockchain
Security Model of BlockchainSecurity Model of Blockchain
Security Model of Blockchain
saficus
 

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 Composer
Simon 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 Hyperledger
Tracy Kuhrt
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and Tools
Rihusoft
 
Hyperledger
HyperledgerHyperledger
Hyperledger
Vinay Aitha
 
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 France Lab
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18
TelecomValley
 
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
IBM France Lab
 
Blockchain solution architecture deliverable
Blockchain solution architecture deliverableBlockchain solution architecture deliverable
Blockchain solution architecture deliverable
Sarmad Ibrahim
 
Aspmvc
AspmvcAspmvc
Aspmvc
durai arasan
 
Fabric Composer - Construct 2017
Fabric Composer - Construct 2017Fabric Composer - Construct 2017
Fabric Composer - Construct 2017
Simon Stone
 
Blockchain for Business
Blockchain for BusinessBlockchain for Business
Blockchain for Business
Ahmad 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 Applications
Duncan Johnston-Watt
 
Blockchain spreads
Blockchain spreadsBlockchain spreads
Blockchain spreads
Zhengnan Zhao
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptx
deepaksingh160910
 
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
Duncan Johnston-Watt
 
Introduction to Fabric Composer
Introduction to Fabric ComposerIntroduction to Fabric Composer
Introduction to Fabric Composer
Hyperleger Tokyo Meetup
 
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
Matt Lucas
 
Blockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperBlockchain Tech Approach Whitepaper
Blockchain Tech Approach Whitepaper
Property 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

Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 

Recently uploaded (20)

Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 

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/