SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
Hyperledger Introduction
Golang User Group Meetup Ahmedabad - 3rd Feb 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
/**
* Commodity trading network
*/
namespace org.acme.trading
asset Commodity identified by tradingSymbol {
o String tradingSymbol
o String description
o String mainExchange
o Double quantity
--> Trader owner
}
participant Trader identified by tradeId {
o String tradeId
o String firstName
o String lastName
}
transaction Trade {
--> Commodity commodity
--> Trader newOwner
}
event TradeNotification {
--> Commodity commodity
}
transaction RemoveHighQuantityCommodities {
}
event RemoveNotification {
--> Commodity commodity
}
logic.js
/**
* Track the trade of a commodity from one trader to another
* @param {org.acme.trading.Trade} trade - the trade to be processed
* @transaction
*/
function tradeCommodity(trade) {
// set the new owner of the commodity
trade.commodity.owner = trade.newOwner;
return getAssetRegistry('org.acme.trading.Commodity')
.then(function (assetRegistry) {
// emit a notification that a trade has occurred
var tradeNotification = getFactory().newEvent('org.acme.trading',
'TradeNotification');
tradeNotification.commodity = trade.commodity;
emit(tradeNotification);
// persist the state of the commodity
return assetRegistry.update(trade.commodity);
});
}
queries.qry
query selectCommodities {
description: "Select all commodities"
statement:
SELECT org.acme.trading.Commodity
}
query selectCommoditiesByExchange {
description: "Select all commodities based on their main exchange"
statement:
SELECT org.acme.trading.Commodity
WHERE (mainExchange==_$exchange)
}
query selectCommoditiesByOwner {
description: "Select all commodities based on their owner"
statement:
SELECT org.acme.trading.Commodity
WHERE (owner == _$owner)
}
permissions.acl
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
Run Demo
$composer runtime install -c PeerAdmin@hlfv1 -n trade-network
$composer network start --card PeerAdmin@hlfv1 --networkAdmin admin
--networkAdminEnrollSecret adminpw --archiveFile
/Users/ketan/Downloads/trade-network.bna --file networkadmin.card
$composer card import -f networkadmin.card
$composer card list
$composer network ping --card admin@trade-network
$composer-rest-server
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

Mais conteúdo relacionado

Mais procurados

Hyperledger community update 20180528
Hyperledger community update 20180528Hyperledger community update 20180528
Hyperledger community update 20180528Arnaud Le Hors
 
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
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerDev_Events
 
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & Composer
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & ComposerIBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & Composer
IBM Bluemix Nice Meetup - 20171120 - Hyperledger Fabric & ComposerIBM France Lab
 
Hyperledger Composer architecture
Hyperledger Composer architectureHyperledger Composer architecture
Hyperledger Composer architectureSimon Stone
 
Blockchain Explorer
Blockchain ExplorerBlockchain Explorer
Blockchain ExplorerRihusoft
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18TelecomValley
 
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
 
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 fabric 20180528
Hyperledger fabric 20180528Hyperledger fabric 20180528
Hyperledger fabric 20180528Arnaud Le Hors
 
Hyperledger Fabric Technical Deep Dive 20190618
Hyperledger Fabric Technical Deep Dive 20190618Hyperledger Fabric Technical Deep Dive 20190618
Hyperledger Fabric Technical Deep Dive 20190618Arnaud Le Hors
 
Hong Kong Hyperledger Meetup January 2018
Hong Kong Hyperledger Meetup January 2018Hong Kong Hyperledger Meetup January 2018
Hong Kong Hyperledger Meetup January 2018Tracy Kuhrt
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerTracy Kuhrt
 
Hyperledger Composer Update 2017-04-05
Hyperledger Composer Update 2017-04-05Hyperledger Composer Update 2017-04-05
Hyperledger Composer Update 2017-04-05Dan Selman
 
Developing applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKDeveloping applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKHorea Porutiu
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricBenjamin Fuentes
 

Mais procurados (20)

Hyperledger community update 20180528
Hyperledger community update 20180528Hyperledger community update 20180528
Hyperledger community update 20180528
 
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
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and Hyperledger
 
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
 
Hyperledger Composer architecture
Hyperledger Composer architectureHyperledger Composer architecture
Hyperledger Composer architecture
 
Blockchain Explorer
Blockchain ExplorerBlockchain Explorer
Blockchain Explorer
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18
 
Conoscerehyperledger
ConoscerehyperledgerConoscerehyperledger
Conoscerehyperledger
 
Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17
 
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
 
Hyperledger community update Feb 20, 2018
Hyperledger community update Feb 20, 2018Hyperledger community update Feb 20, 2018
Hyperledger community update Feb 20, 2018
 
Hyperledger fabric 20180528
Hyperledger fabric 20180528Hyperledger fabric 20180528
Hyperledger fabric 20180528
 
Hyperledger Fabric
Hyperledger FabricHyperledger Fabric
Hyperledger Fabric
 
Hyperledger Fabric Technical Deep Dive 20190618
Hyperledger Fabric Technical Deep Dive 20190618Hyperledger Fabric Technical Deep Dive 20190618
Hyperledger Fabric Technical Deep Dive 20190618
 
Hong Kong Hyperledger Meetup January 2018
Hong Kong Hyperledger Meetup January 2018Hong Kong Hyperledger Meetup January 2018
Hong Kong Hyperledger Meetup January 2018
 
Distributed:Health Code Camp Hyperledger
Distributed:Health Code Camp HyperledgerDistributed:Health Code Camp Hyperledger
Distributed:Health Code Camp Hyperledger
 
Hyperledger Composer Update 2017-04-05
Hyperledger Composer Update 2017-04-05Hyperledger Composer Update 2017-04-05
Hyperledger Composer Update 2017-04-05
 
Developing applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKDeveloping applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDK
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabric
 

Semelhante a 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
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger ComposerSimon Stone
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxdeepaksingh160910
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febricRohit Verma
 
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
 
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
 
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM France Lab
 
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
 
blockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technicalblockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technicalJuarez Junior
 
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
 
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
 
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
 
Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4LennartF
 
Hyperledger Fabric in a Nutshell
Hyperledger Fabric in a NutshellHyperledger Fabric in a Nutshell
Hyperledger Fabric in a NutshellDaniel Chan
 
03 - An introduction to hyperledger composer
03 - An introduction to hyperledger composer03 - An introduction to hyperledger composer
03 - An introduction to hyperledger composerMerlec Mpyana
 
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
 

Semelhante a 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
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
 
Block chain
Block chainBlock chain
Block chain
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptx
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febric
 
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
 
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
 
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
 
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?
 
blockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technicalblockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technical
 
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
 
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
 
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
 
Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4
 
Hyperledger Fabric in a Nutshell
Hyperledger Fabric in a NutshellHyperledger Fabric in a Nutshell
Hyperledger Fabric in a Nutshell
 
03 - An introduction to hyperledger composer
03 - An introduction to hyperledger composer03 - An introduction to hyperledger composer
03 - An introduction to hyperledger 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
 

Último

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...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
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 

Hyperledger Fabric & Composer

  • 1. Hyperledger Introduction Golang User Group Meetup Ahmedabad - 3rd Feb 2018
  • 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 /** * Commodity trading network */ namespace org.acme.trading asset Commodity identified by tradingSymbol { o String tradingSymbol o String description o String mainExchange o Double quantity --> Trader owner } participant Trader identified by tradeId { o String tradeId o String firstName o String lastName } transaction Trade { --> Commodity commodity --> Trader newOwner } event TradeNotification { --> Commodity commodity } transaction RemoveHighQuantityCommodities { } event RemoveNotification { --> Commodity commodity }
  • 31. logic.js /** * Track the trade of a commodity from one trader to another * @param {org.acme.trading.Trade} trade - the trade to be processed * @transaction */ function tradeCommodity(trade) { // set the new owner of the commodity trade.commodity.owner = trade.newOwner; return getAssetRegistry('org.acme.trading.Commodity') .then(function (assetRegistry) { // emit a notification that a trade has occurred var tradeNotification = getFactory().newEvent('org.acme.trading', 'TradeNotification'); tradeNotification.commodity = trade.commodity; emit(tradeNotification); // persist the state of the commodity return assetRegistry.update(trade.commodity); }); }
  • 32. queries.qry query selectCommodities { description: "Select all commodities" statement: SELECT org.acme.trading.Commodity } query selectCommoditiesByExchange { description: "Select all commodities based on their main exchange" statement: SELECT org.acme.trading.Commodity WHERE (mainExchange==_$exchange) } query selectCommoditiesByOwner { description: "Select all commodities based on their owner" statement: SELECT org.acme.trading.Commodity WHERE (owner == _$owner) }
  • 33. permissions.acl rule NetworkAdminUser { description: "Grant business network administrators full access to user resources" participant: "org.hyperledger.composer.system.NetworkAdmin" operation: ALL resource: "**" action: ALLOW } rule NetworkAdminSystem { description: "Grant business network administrators full access to system resources" participant: "org.hyperledger.composer.system.NetworkAdmin" operation: ALL resource: "org.hyperledger.composer.system.**" action: ALLOW }
  • 34. Run Demo $composer runtime install -c PeerAdmin@hlfv1 -n trade-network $composer network start --card PeerAdmin@hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw --archiveFile /Users/ketan/Downloads/trade-network.bna --file networkadmin.card $composer card import -f networkadmin.card $composer card list $composer network ping --card admin@trade-network $composer-rest-server
  • 35. 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