SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Hyperledger Introduction
Hyperledger Ahmedabad - 12 May 2018
About
Dr Ketan Parmar
Twitter : @kpbird
LinkedIn: https://www.linkedin.com/in/kpbird/
Certification: SCJP, IBM Blockchain Essentials, IBM Blockchain Foundation Developer
Agenda
● Introduction
● Hyperledger vs Ethereum vs R3 Corda
● Hyperledger Fabric
● Hyperledger Composer
● Demo
● Q & A
Problem
Solution
Introduction
In December 2015, the Linux Foundation announced the creation of the Hyperledger Project
In February 2016, The founding members of the project were announced
In early 2016, the project began accepting proposals for incubation of codebases and other
technologies as core elements.
On 12 July 2017, the project announced its production-ready Hyperledger Fabric 1.0 and it
started to gain popularity
In July 2017, London Stock Exchange Group in a partnership with IBM announced that it will
create a Blockchain platform designed for digitally issuing shares of Italian companies.
Hyperledger Fabric will form the basis of the platform
In September 2017 The Royal Bank of Canada (RBC) have started using Hyperledger for its US -
Canada interbank settlements.
Hyperledger Modular Umbrella Approach
Hyperledger
Hyperledger
Indy
Hyperledger
Fabric
Hyperledger
Iroha
Hyperledger
Sawtooth
Hyperledger
Burrow
Hyperledger
Quilt
Hyperledger
Composer
Hyperledger
Explorer
Hyperledger
Cello
Frameworks
Tools
Hyperledger Blockchain Frameworks
Hyperledger Fabric: Intended as a foundation for developing applications or solutions with a
modular architecture, Hyperledger Fabric allows components, such as consensus and
membership services, to be plug-and-play.
Hyperledger Iroha: A business blockchain framework designed to be simple and easy to
incorporate into infrastructural projects requiring distributed ledger technology.
Hyperledger Sawtooth: A modular platform for building, deploying, and running distributed
ledgers. Hyperledger Sawtooth includes a novel consensus algorithm, Proof of Elapsed Time
(PoET), which targets large distributed validator populations with minimal resource
consumption.
Hyperledger Blockchain Frameworks
Hyperledger Burrow: A permissionable smart contract machine. The first of its kind when
released in December, 2014, Burrow provides a modular blockchain client with a permissioned
smart contract interpreter built in part to the specification of the Ethereum Virtual Machine
(EVM).
Hyperledger Indy: Tools, libraries, and reusable components for providing digital identities
rooted on blockchains or other distributed ledgers so that they are interoperable across
administrative domains, applications, and any other silo.
Hyperledger Blockchain Tools
Hyperledger Cello: Blockchain deployment tooling contributed by IBM. Baohua Yang and
Haitao Yue from IBM Research are committed part-time to developing and maintaining the
project.
Hyperledger Composer: Blockchain package management tooling contributed by IBM.
Composer is a user-facing rapid prototyping tooling, running on top of Hyperledger Fabric,
which allows the easy management of Assets (data stored on the blockchain), Participants
(identity management, or member services) and Transactions (Chaincode, or Smart Contracts
which operate on Assets on the behalf of a Participant). The resulting application can be
exported as a package (a BNA file) which may be executed on a Hyperledger Fabric instance,
with the support of a Node.js application (based on the Loopback application framework) and
provide a REST interface to external applications.
Hyperledger Explore: Blockchain analytics tooling contributed by IBM, Intel, and DTCC.
Hyperledger vs Ethereum vs R3
Corda
Ethereum vs Hyperledger Fabric vs R3 Corda
Hyperledger Fabric
Hyperledger Fabric
● An implementation of blockchain technology that is intended as a foundation for
developing blockchain applications
● Key technical features:
○ A shared ledger and smart contracts implemented as “chaincode”
○ Privacy and permissioning through membership services
○ Modular architecture and flexible hosting options
Hyperledger Fabric Architecture
IDENTITY: Pluggable,
Membership, Privacy and
Auditability of transactions.
LEDGER | TRANSACTIONS:
Distributed transactional ledger
whose state is updated by
consensus of stakeholders
SMART-CONTRACT:
“Programmable Ledger”, provide
ability to run business logic
against the blockchain (aka
smart contract)
APIs, Events, SDKs:
Multi-language native SDKs
allow developers to write DLT
apps
Hyperledger Fabric
● Membership Service Provider (MSP)
● Shared Ledger
● Smart Contracts
● Privacy
● Consensus
● There are four main methods of finding consensus in a blockchain:
○ the practical byzantine fault tolerance algorithm (PBFT),
○ the proof-of-work algorithm(PoW)
○ the proof-of-stake algorithm (PoS)
○ the delegated proof-of-stake algorithm (DPoS).
Hyperledger Fabric Functionalities
● Identity management
● Privacy and confidentiality
● Efficient processing
● Chaincode functionality
● Modular design
Hyperledger Composer
Blockchain for business
Blockchain builds on basic business concepts
● Business Networks connect businesses
● Assets flow over business networks
● Transactions describe asset exchange
● Participants submit transactions
● Contracts define the rules for transactions
● The ledger is a log of transactions
Hyperledger Composer
Hyperledger Composer is a framework to accelerate the development of applications built on
top of Blockchain platforms:
1. Start from the business level; model network assets, participants, and transactions
2. Applications use business centric APIs to invoke transactions that create, delete, and
3. update assets and transfer them between participants
4. Assets, participants, and transactions are recorded in the world state in registries
5. Easily integrate Blockchain with existing business processes and systems of record
6. Emphasis on quick solution creation and business-centric vocabulary
Key development concepts
Model files describe the assets, participants, transactions, and events that exist in a business network
● Expressive modelling language includes relationships, arrays, and validation rules
● Data serialized as JSON, and is fully validated by the Hyperledger Composer runtime
Access control lists define rules for sharing and privacy
● Rules are automatically enforced by the Hyperledger Composer runtime
Transaction processor functions implement additional business requirements
● Standard JavaScript code executed on the Blockchain by the Hyperledger Composer runtime
A business network definition is the set of the above for a given business network.
Language, Libraries and Frameworks
Model File (.cto)
A Hyperledger Composer 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.
CTO Language:
https://hyperledger.github.io/composer/reference/cto_language.html
Transaction Processing File (.js)
Transaction processor functions are automatically invoked by the runtime when
transactions are submitted using the BusinessNetworkConnection API.
/**
* A transaction processor function description
* @param {org.example.sampleTransaction} parameter-name A human
description of the parameter
* @transaction
*/
Document:
https://hyperledger.github.io/composer/reference/js_scripts.html
Access Control Language (acl)
Hyperledger Composer differentiates between access control for resources within a
business network (business access control) and access control for network administrative
changes (network access control). Business access control and network access control are
both defined in the access control file (.acl) for a business network.
Network access control uses the system namespace, which is implicitly extended by all
resources in a business network; and grants or denies access to specific actions as defined
below, and is intended to allow for more nuanced access to certain network-level
operations.
Document:
https://hyperledger.github.io/composer/reference/acl_language.html
Demo
model.cto
/**
* Hardware model
*/
namespace com.kpbird
asset Hardware identified by hardwareId {
o String hardwareId
o String name
o String type
o String description
o Double quantity
--> Employee owner
}
participant Employee identified by employeeId {
o String employeeId
o String firstName
o String lastName
}
transaction Allocate {
--> Hardware hardware
--> Employee newOwner
}
logic.js
/**
* New script file
*/
/**
* Track the trade of a commodity from one trader to another
* @param {com.kpbird.Allocate} trade — the trade to be processed
* @transaction
*/
function allocateHardware(allocate) {
allocate.hardware.owner = allocate.newOwner;
return getAssetRegistry("com.kpbird.Hardware")
.then(function (assetRegistry) {
return assetRegistry.update(allocate.hardware);
});
}
queries.qry
query selectHardware {
description: "Select all hardware"
statement:
SELECT com.kpbird.Hardware
}
query selectHardwareByOwner {
description: "Select all hardware based on their owner"
statement:
SELECT com.kpbird.Hardware
WHERE (owner == _$owner)
}
permissions.acl
rule AllAccess {
description: "AllAccess — grant everything to everybody."
participant: "ANY"
operation: ALL
resource: "com.kpbird.**"
action: ALLOW
}
rule SystemACL {
description: "System ACL to permit all access"
participant: "org.hyperledger.composer.system.Participant"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
Run Demo
$composer network install --card PeerAdmin@hlfv1 --archiveFile
~/Downloads/hardware-assets.bna
$composer network start --networkName hardware-assets --networkVersion
0.0.4-deploy.2 --networkAdmin admin --networkAdminEnrollSecret adminpw --card
PeerAdmin@hlfv1 --file networkadmin.card
$composer card import --file networkadmin.card
$composer card list
$composer network ping -c admin@hardware-assets
$composer-rest-server
Access Business Network using Node JS SDK
const BusinessNetworkConnection = require('composer-client').BusinessNetworkConnection;
const connection = new BusinessNetworkConnection();
let businessNetworkDefinition = await connection.connect('admin@hardware-assets');
let factory = businessNetworkDefinition.getFactory();
const assets = await connection.getAssetRegistry('com.kpbird.Hardware');
const participant = await connection.getParticipantRegistry("com.kpbird.Employee");
Access Business Network using Node JS SDK
// List all employees
let employees = await participant.getAll();
for(let i=0;i<employees.length;i++){
console.log("---------------");
console.log(employees[i].employeeId);
console.log(employees[i].firstName);
console.log(employees[i].lastName);
}
Access Business Network using Node JS SDK
//List all hardware
let hardwares = await assets.getAll();
for(let i=0;i<hardwares.length;i++){
console.log("---------------");
console.log(hardwares[i].hardwareId);
console.log(hardwares[i].name);
console.log(hardwares[i].type);
console.log(hardwares[i].description);
console.log(hardwares[i].quantity);
console.log(hardwares[i].owner.$identifier);
}
Access Business Network using Node JS SDK
// add participant
let employee = factory.newResource("com.kpbird","Employee","E01");
employee.firstName = "Ketan";
employee.lastName = "Parmar";
participant.add(employee);
// add assets
let mac = factory.newResource("com.kpbird","Hardware","MAC01");
mac.name = "MacBook Pro";
mac.type= "Laptop";
mac.description ="MacBook Pro mid-2015 model";
mac.quantity = 1;
var e01 = factory.newRelationship('com.kpbird', 'Employee', 'E01');
mac.owner = e01;
assets.add(mac)
Resources
1. https://www.hyperledger.org/resources
2. https://hyperledger.github.io/composer/
3. https://hyperledger-fabric.readthedocs.io/en/latest/
4. Training : https://www.hyperledger.org/resources/training
5. Certificate:
https://developer.ibm.com/courses/all/ibm-blockchain-foundation-developer/
6. https://hyperledger.github.io/composer/installing/installing-index
7. Setup Single Node Organization
https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org
Thank You

Contenu connexe

Tendances

Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Dr. Ketan Parmar
 
Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Arnaud Le Hors
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and ToolsRihusoft
 
Hyperledger Lightning Talk
Hyperledger Lightning TalkHyperledger Lightning Talk
Hyperledger Lightning TalkAndrew Kennedy
 
Hyperledger Overview - 20181024
Hyperledger Overview - 20181024Hyperledger Overview - 20181024
Hyperledger Overview - 20181024Arnaud Le Hors
 
Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910Arnaud Le Hors
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricAraf Karsh Hamid
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyJollen Chen
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger applicationEric Cattoir
 
Wwc developing hyperledger applications v2
Wwc  developing hyperledger applications v2Wwc  developing hyperledger applications v2
Wwc developing hyperledger applications v2LennartF
 
Developing applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKDeveloping applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKHorea Porutiu
 
Hyperledger Composer
Hyperledger ComposerHyperledger Composer
Hyperledger ComposerRihusoft
 
IBM presents: Hyperledger Fabric Hands On Workshop - part 1
IBM presents: Hyperledger Fabric Hands On Workshop - part 1IBM presents: Hyperledger Fabric Hands On Workshop - part 1
IBM presents: Hyperledger Fabric Hands On Workshop - part 1Grant Steinfeld
 
Hyperledger Overview Feb 2017
Hyperledger Overview Feb 2017Hyperledger Overview Feb 2017
Hyperledger Overview Feb 2017Eric Kjome
 
Hyperledger fabric 20180528
Hyperledger fabric 20180528Hyperledger fabric 20180528
Hyperledger fabric 20180528Arnaud Le Hors
 
Hyperledger community update February 2018
Hyperledger  community update   February 2018Hyperledger  community update   February 2018
Hyperledger community update February 2018Christopher Ferris
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricBenjamin Fuentes
 

Tendances (20)

Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Hyperledger Fabric & Composer
Hyperledger Fabric & Composer
 
Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018
 
Hyperledger Fabric
Hyperledger FabricHyperledger Fabric
Hyperledger Fabric
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and Tools
 
Hyperledger Lightning Talk
Hyperledger Lightning TalkHyperledger Lightning Talk
Hyperledger Lightning Talk
 
Hyperledger Overview - 20181024
Hyperledger Overview - 20181024Hyperledger Overview - 20181024
Hyperledger Overview - 20181024
 
Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and Property
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger application
 
IBM Blockchain Overview
IBM Blockchain OverviewIBM Blockchain Overview
IBM Blockchain Overview
 
Wwc developing hyperledger applications v2
Wwc  developing hyperledger applications v2Wwc  developing hyperledger applications v2
Wwc developing hyperledger applications v2
 
Developing applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKDeveloping applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDK
 
Hyperledger Composer
Hyperledger ComposerHyperledger Composer
Hyperledger Composer
 
IBM presents: Hyperledger Fabric Hands On Workshop - part 1
IBM presents: Hyperledger Fabric Hands On Workshop - part 1IBM presents: Hyperledger Fabric Hands On Workshop - part 1
IBM presents: Hyperledger Fabric Hands On Workshop - part 1
 
Hyperledger Overview Feb 2017
Hyperledger Overview Feb 2017Hyperledger Overview Feb 2017
Hyperledger Overview Feb 2017
 
Hyperledger fabric 20180528
Hyperledger fabric 20180528Hyperledger fabric 20180528
Hyperledger fabric 20180528
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
Hyperledger community update February 2018
Hyperledger  community update   February 2018Hyperledger  community update   February 2018
Hyperledger community update February 2018
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabric
 

Similaire à Introduction of Hyperledger Fabric & Composer

01 - Introduction to Hyperledger : A Blockchain Technology for Business
01 - Introduction to Hyperledger : A Blockchain Technology for Business01 - Introduction to Hyperledger : A Blockchain Technology for Business
01 - Introduction to Hyperledger : A Blockchain Technology for BusinessMerlec Mpyana
 
Hyperledger community update 201805
Hyperledger community update 201805Hyperledger community update 201805
Hyperledger community update 201805Arnaud Le Hors
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febricRohit Verma
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerTracy Kuhrt
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger ComposerSimon Stone
 
Hyperledger community update Feb 20, 2018
Hyperledger community update Feb 20, 2018Hyperledger community update Feb 20, 2018
Hyperledger community update Feb 20, 2018Arnaud Le Hors
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxdeepaksingh160910
 
What is Hyperledger? | Blockchain Development Company | Codezeros
What is Hyperledger? | Blockchain Development Company | CodezerosWhat is Hyperledger? | Blockchain Development Company | Codezeros
What is Hyperledger? | Blockchain Development Company | CodezerosCodezeros
 
Oracle Blockchain Experience Day
Oracle Blockchain Experience DayOracle Blockchain Experience Day
Oracle Blockchain Experience DayJuarez Junior
 
Tech Talk - Blockchain presentation
Tech Talk - Blockchain presentationTech Talk - Blockchain presentation
Tech Talk - Blockchain presentationLaura Steggles
 
Blockchain, Hyperledger and the Oracle Blockchain Platform
Blockchain, Hyperledger and the Oracle Blockchain PlatformBlockchain, Hyperledger and the Oracle Blockchain Platform
Blockchain, Hyperledger and the Oracle Blockchain PlatformJuarez Junior
 
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?Hacken_Ecosystem
 
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
 
How to Build a Decentralized Blockchain App with the Oracle Blockchain Platform
How to Build a Decentralized BlockchainApp with the Oracle Blockchain PlatformHow to Build a Decentralized BlockchainApp with the Oracle Blockchain Platform
How to Build a Decentralized Blockchain App with the Oracle Blockchain PlatformJuarez Junior
 
Hyperledger Fabric in a Nutshell
Hyperledger Fabric in a NutshellHyperledger Fabric in a Nutshell
Hyperledger Fabric in a NutshellDaniel Chan
 
blockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technicalblockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technicalJuarez Junior
 
Collaborative Blockchain- All You Need to Know About Hyperledger
Collaborative Blockchain- All You Need to Know About HyperledgerCollaborative Blockchain- All You Need to Know About Hyperledger
Collaborative Blockchain- All You Need to Know About HyperledgerBlockchain Developments
 
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
 

Similaire à Introduction of Hyperledger Fabric & Composer (20)

01 - Introduction to Hyperledger : A Blockchain Technology for Business
01 - Introduction to Hyperledger : A Blockchain Technology for Business01 - Introduction to Hyperledger : A Blockchain Technology for Business
01 - Introduction to Hyperledger : A Blockchain Technology for Business
 
Hyperledger community update 201805
Hyperledger community update 201805Hyperledger community update 201805
Hyperledger community update 201805
 
Conoscerehyperledger
ConoscerehyperledgerConoscerehyperledger
Conoscerehyperledger
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febric
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp Hyperledger
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
 
Block chain
Block chainBlock chain
Block chain
 
Hyperledger community update Feb 20, 2018
Hyperledger community update Feb 20, 2018Hyperledger community update Feb 20, 2018
Hyperledger community update Feb 20, 2018
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptx
 
What is Hyperledger? | Blockchain Development Company | Codezeros
What is Hyperledger? | Blockchain Development Company | CodezerosWhat is Hyperledger? | Blockchain Development Company | Codezeros
What is Hyperledger? | Blockchain Development Company | Codezeros
 
Oracle Blockchain Experience Day
Oracle Blockchain Experience DayOracle Blockchain Experience Day
Oracle Blockchain Experience Day
 
Tech Talk - Blockchain presentation
Tech Talk - Blockchain presentationTech Talk - Blockchain presentation
Tech Talk - Blockchain presentation
 
Blockchain, Hyperledger and the Oracle Blockchain Platform
Blockchain, Hyperledger and the Oracle Blockchain PlatformBlockchain, Hyperledger and the Oracle Blockchain Platform
Blockchain, Hyperledger and the Oracle Blockchain Platform
 
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your 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
 
How to Build a Decentralized Blockchain App with the Oracle Blockchain Platform
How to Build a Decentralized BlockchainApp with the Oracle Blockchain PlatformHow to Build a Decentralized BlockchainApp with the Oracle Blockchain Platform
How to Build a Decentralized Blockchain App with the Oracle Blockchain Platform
 
Hyperledger Fabric in a Nutshell
Hyperledger Fabric in a NutshellHyperledger Fabric in a Nutshell
Hyperledger Fabric in a Nutshell
 
blockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technicalblockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technical
 
Collaborative Blockchain- All You Need to Know About Hyperledger
Collaborative Blockchain- All You Need to Know About HyperledgerCollaborative Blockchain- All You Need to Know About Hyperledger
Collaborative Blockchain- All You Need to Know About Hyperledger
 
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
 

Dernier

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Dernier (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Introduction of Hyperledger Fabric & Composer

  • 2. About Dr Ketan Parmar Twitter : @kpbird LinkedIn: https://www.linkedin.com/in/kpbird/ Certification: SCJP, IBM Blockchain Essentials, IBM Blockchain Foundation Developer
  • 3. Agenda ● Introduction ● Hyperledger vs Ethereum vs R3 Corda ● Hyperledger Fabric ● Hyperledger Composer ● Demo ● Q & A
  • 6. Introduction In December 2015, the Linux Foundation announced the creation of the Hyperledger Project In February 2016, The founding members of the project were announced In early 2016, the project began accepting proposals for incubation of codebases and other technologies as core elements. On 12 July 2017, the project announced its production-ready Hyperledger Fabric 1.0 and it started to gain popularity In July 2017, London Stock Exchange Group in a partnership with IBM announced that it will create a Blockchain platform designed for digitally issuing shares of Italian companies. Hyperledger Fabric will form the basis of the platform In September 2017 The Royal Bank of Canada (RBC) have started using Hyperledger for its US - Canada interbank settlements.
  • 7.
  • 8.
  • 9. Hyperledger Modular Umbrella Approach Hyperledger Hyperledger Indy Hyperledger Fabric Hyperledger Iroha Hyperledger Sawtooth Hyperledger Burrow Hyperledger Quilt Hyperledger Composer Hyperledger Explorer Hyperledger Cello Frameworks Tools
  • 10. Hyperledger Blockchain Frameworks Hyperledger Fabric: Intended as a foundation for developing applications or solutions with a modular architecture, Hyperledger Fabric allows components, such as consensus and membership services, to be plug-and-play. Hyperledger Iroha: A business blockchain framework designed to be simple and easy to incorporate into infrastructural projects requiring distributed ledger technology. Hyperledger Sawtooth: A modular platform for building, deploying, and running distributed ledgers. Hyperledger Sawtooth includes a novel consensus algorithm, Proof of Elapsed Time (PoET), which targets large distributed validator populations with minimal resource consumption.
  • 11. Hyperledger Blockchain Frameworks Hyperledger Burrow: A permissionable smart contract machine. The first of its kind when released in December, 2014, Burrow provides a modular blockchain client with a permissioned smart contract interpreter built in part to the specification of the Ethereum Virtual Machine (EVM). Hyperledger Indy: Tools, libraries, and reusable components for providing digital identities rooted on blockchains or other distributed ledgers so that they are interoperable across administrative domains, applications, and any other silo.
  • 12. Hyperledger Blockchain Tools Hyperledger Cello: Blockchain deployment tooling contributed by IBM. Baohua Yang and Haitao Yue from IBM Research are committed part-time to developing and maintaining the project. Hyperledger Composer: Blockchain package management tooling contributed by IBM. Composer is a user-facing rapid prototyping tooling, running on top of Hyperledger Fabric, which allows the easy management of Assets (data stored on the blockchain), Participants (identity management, or member services) and Transactions (Chaincode, or Smart Contracts which operate on Assets on the behalf of a Participant). The resulting application can be exported as a package (a BNA file) which may be executed on a Hyperledger Fabric instance, with the support of a Node.js application (based on the Loopback application framework) and provide a REST interface to external applications. Hyperledger Explore: Blockchain analytics tooling contributed by IBM, Intel, and DTCC.
  • 13. Hyperledger vs Ethereum vs R3 Corda
  • 14. Ethereum vs Hyperledger Fabric vs R3 Corda
  • 16. Hyperledger Fabric ● An implementation of blockchain technology that is intended as a foundation for developing blockchain applications ● Key technical features: ○ A shared ledger and smart contracts implemented as “chaincode” ○ Privacy and permissioning through membership services ○ Modular architecture and flexible hosting options
  • 17. Hyperledger Fabric Architecture IDENTITY: Pluggable, Membership, Privacy and Auditability of transactions. LEDGER | TRANSACTIONS: Distributed transactional ledger whose state is updated by consensus of stakeholders SMART-CONTRACT: “Programmable Ledger”, provide ability to run business logic against the blockchain (aka smart contract) APIs, Events, SDKs: Multi-language native SDKs allow developers to write DLT apps
  • 18. Hyperledger Fabric ● Membership Service Provider (MSP) ● Shared Ledger ● Smart Contracts ● Privacy ● Consensus ● There are four main methods of finding consensus in a blockchain: ○ the practical byzantine fault tolerance algorithm (PBFT), ○ the proof-of-work algorithm(PoW) ○ the proof-of-stake algorithm (PoS) ○ the delegated proof-of-stake algorithm (DPoS).
  • 19. Hyperledger Fabric Functionalities ● Identity management ● Privacy and confidentiality ● Efficient processing ● Chaincode functionality ● Modular design
  • 21. Blockchain for business Blockchain builds on basic business concepts ● Business Networks connect businesses ● Assets flow over business networks ● Transactions describe asset exchange ● Participants submit transactions ● Contracts define the rules for transactions ● The ledger is a log of transactions
  • 22. Hyperledger Composer Hyperledger Composer is a framework to accelerate the development of applications built on top of Blockchain platforms: 1. Start from the business level; model network assets, participants, and transactions 2. Applications use business centric APIs to invoke transactions that create, delete, and 3. update assets and transfer them between participants 4. Assets, participants, and transactions are recorded in the world state in registries 5. Easily integrate Blockchain with existing business processes and systems of record 6. Emphasis on quick solution creation and business-centric vocabulary
  • 23. Key development concepts Model files describe the assets, participants, transactions, and events that exist in a business network ● Expressive modelling language includes relationships, arrays, and validation rules ● Data serialized as JSON, and is fully validated by the Hyperledger Composer runtime Access control lists define rules for sharing and privacy ● Rules are automatically enforced by the Hyperledger Composer runtime Transaction processor functions implement additional business requirements ● Standard JavaScript code executed on the Blockchain by the Hyperledger Composer runtime A business network definition is the set of the above for a given business network.
  • 24.
  • 26. Model File (.cto) A Hyperledger Composer 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. CTO Language: https://hyperledger.github.io/composer/reference/cto_language.html
  • 27. Transaction Processing File (.js) Transaction processor functions are automatically invoked by the runtime when transactions are submitted using the BusinessNetworkConnection API. /** * A transaction processor function description * @param {org.example.sampleTransaction} parameter-name A human description of the parameter * @transaction */ Document: https://hyperledger.github.io/composer/reference/js_scripts.html
  • 28. Access Control Language (acl) Hyperledger Composer differentiates between access control for resources within a business network (business access control) and access control for network administrative changes (network access control). Business access control and network access control are both defined in the access control file (.acl) for a business network. Network access control uses the system namespace, which is implicitly extended by all resources in a business network; and grants or denies access to specific actions as defined below, and is intended to allow for more nuanced access to certain network-level operations. Document: https://hyperledger.github.io/composer/reference/acl_language.html
  • 29. Demo
  • 30. model.cto /** * Hardware model */ namespace com.kpbird asset Hardware identified by hardwareId { o String hardwareId o String name o String type o String description o Double quantity --> Employee owner } participant Employee identified by employeeId { o String employeeId o String firstName o String lastName } transaction Allocate { --> Hardware hardware --> Employee newOwner }
  • 31. logic.js /** * New script file */ /** * Track the trade of a commodity from one trader to another * @param {com.kpbird.Allocate} trade — the trade to be processed * @transaction */ function allocateHardware(allocate) { allocate.hardware.owner = allocate.newOwner; return getAssetRegistry("com.kpbird.Hardware") .then(function (assetRegistry) { return assetRegistry.update(allocate.hardware); }); }
  • 32. queries.qry query selectHardware { description: "Select all hardware" statement: SELECT com.kpbird.Hardware } query selectHardwareByOwner { description: "Select all hardware based on their owner" statement: SELECT com.kpbird.Hardware WHERE (owner == _$owner) }
  • 33. permissions.acl rule AllAccess { description: "AllAccess — grant everything to everybody." participant: "ANY" operation: ALL resource: "com.kpbird.**" action: ALLOW } rule SystemACL { description: "System ACL to permit all access" participant: "org.hyperledger.composer.system.Participant" operation: ALL resource: "org.hyperledger.composer.system.**" action: ALLOW }
  • 34. Run Demo $composer network install --card PeerAdmin@hlfv1 --archiveFile ~/Downloads/hardware-assets.bna $composer network start --networkName hardware-assets --networkVersion 0.0.4-deploy.2 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card $composer card import --file networkadmin.card $composer card list $composer network ping -c admin@hardware-assets $composer-rest-server
  • 35. Access Business Network using Node JS SDK const BusinessNetworkConnection = require('composer-client').BusinessNetworkConnection; const connection = new BusinessNetworkConnection(); let businessNetworkDefinition = await connection.connect('admin@hardware-assets'); let factory = businessNetworkDefinition.getFactory(); const assets = await connection.getAssetRegistry('com.kpbird.Hardware'); const participant = await connection.getParticipantRegistry("com.kpbird.Employee");
  • 36. Access Business Network using Node JS SDK // List all employees let employees = await participant.getAll(); for(let i=0;i<employees.length;i++){ console.log("---------------"); console.log(employees[i].employeeId); console.log(employees[i].firstName); console.log(employees[i].lastName); }
  • 37. Access Business Network using Node JS SDK //List all hardware let hardwares = await assets.getAll(); for(let i=0;i<hardwares.length;i++){ console.log("---------------"); console.log(hardwares[i].hardwareId); console.log(hardwares[i].name); console.log(hardwares[i].type); console.log(hardwares[i].description); console.log(hardwares[i].quantity); console.log(hardwares[i].owner.$identifier); }
  • 38. Access Business Network using Node JS SDK // add participant let employee = factory.newResource("com.kpbird","Employee","E01"); employee.firstName = "Ketan"; employee.lastName = "Parmar"; participant.add(employee); // add assets let mac = factory.newResource("com.kpbird","Hardware","MAC01"); mac.name = "MacBook Pro"; mac.type= "Laptop"; mac.description ="MacBook Pro mid-2015 model"; mac.quantity = 1; var e01 = factory.newRelationship('com.kpbird', 'Employee', 'E01'); mac.owner = e01; assets.add(mac)
  • 39. Resources 1. https://www.hyperledger.org/resources 2. https://hyperledger.github.io/composer/ 3. https://hyperledger-fabric.readthedocs.io/en/latest/ 4. Training : https://www.hyperledger.org/resources/training 5. Certificate: https://developer.ibm.com/courses/all/ibm-blockchain-foundation-developer/ 6. https://hyperledger.github.io/composer/installing/installing-index 7. Setup Single Node Organization https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org