Professional Documents
Culture Documents
Bridges simply from Develop blockchain Well tested, efficient Higher level abstraction
business concepts to applications more design conforms to best makes it easier to
blockchain quickly and cheaply practice iterate
Business Network
sell car offer bid Transactions
Participants
Registries
Transactions Identity
• Offer Assets
• Close Bidding
builds on
Vehicle registry Listings registry
Peers
Hyperledger Composer Chaincode
Consensus
Hyperledger Fabric World State
Counterparties
outside the business
network DVLA
Insurer
©2017 IBM Corporation
5
Conceptual Components and Structure of Composer
Business Network is defined by Models, Script Files, ACLs and Metadata and
packaged in a Business Network Archive
Solution Developer models the business network, implements the script files
D that define transaction behaviour and packages into a business network
archive
composer-client
composer-admin
$ composer
Swagge
r
Editor support CLI utilities Code generation Existing systems and
data
R Regulator
U
B2B Blockchain
performs transactions User
A oversight
Blockchain
Architect
designs ✓
Membership
Services
D Blockchain accesses
security
Blockchain certificates
Developer creates
applications
access to
operates data Traditional
Data Sources
access to logic
O
Blockchain
Network Traditional
Operator Processing
©2017 IBM Corporation Platforms
9
Actors in a Blockchain Solution
Blockchain Responsible for the architecture and design of the blockchain solution
Architect A
The business user, operating in a business network. This role interacts with the Blockchain using an
Blockchain application. They are not aware of the Blockchain.
User U
The overall authority in a business network. Specifically, regulators may require broad access to
Blockchain
the ledger’s contents.
Regulator R
Blockchain The developer of applications and smart contracts that interact with the Blockchain and are used
Developer D by Blockchain users.
Blockchain Manages and monitors the Blockchain network. Each business in the network has a Blockchain
Operator O Network operator.
Membership Manages the different types of certificates required to run a permissioned Blockchain.
✓
Services
Traditional
An existing computer system which may be used by the Blockchain to augment processing. This
Processing
system may also need to initiate requests into the Blockchain.
Platform
Traditional
Data An existing data system which may provide data to influence the behavior of smart contracts.
©2017 IBMSources
Corporation
10
Components in a Blockchain Solution
Ledger A ledger is a channel’s chain and current state data which is maintained by each peer on the
…
channel.
f(abc); Software running on a ledger, to encode assets and the transaction instructions (business
Smart Contract logic) for modifying the assets.
A broader term overarching the entire transactional flow, which serves to generate an
Peer
agreement on the order and to confirm the correctness of the set of transactions constituting a
Network
block.
Creates notifications of significant operations on the blockchain (e.g. a new block), as well as
Events ! notifications related to smart contracts.
Systems Provides the ability to create, change and monitor blockchain components
i
Management
Systems Responsible for integrating Blockchain bi-directionally with external systems. Not part of
Integration blockchain, but used with it.
©2017 IBM Corporation
11
The Blockchain Developer D
Blockchain
Developer
Application Smart
Contract
f(abc);
…and how they interact with the ledger and other systems of record:
Traditional Traditional Systems
Ledger Processing Data Events
Platforms Sources
Integration
… !
They should NOT have to care about operational concerns, such as:
block
• Blockchain
• A linked list of blocks
txn txn txn • Each block describes a set of transactions
(e.g. the inputs to a smart contract invocation)
Blockchain • Immutable – blocks cannot be tampered
• World State
• An ordinary database (e.g. key/value store)
• Stores the combined outputs of all transactions
World state
• Not usually immutable
Smart
Smart contract implementation
Contract setOwner(Car, newOwner) {
f(abc); set Car.owner = newOwner
}
2. Blockchain
events 1. System
events
!
! Existing
systems
Transform
15
Part 3: Blockchain architecture
They should NOT have to care about development concerns, such as:
before after
CONSENSUS
• Details vary significantly between blockchain implementations, but a typical flow is:
△?
△?
△? △?
△ △?
△? △?
△?
The application The transaction is A designated peer The block’s The network If there is
submits a request shared around the creates a block transactions are attempts to agree agreement, the
to invoke a network containing the executed and on the correct result correct output is
transaction transaction output stored in a applied to the world
delta state
• The process to agree the consistent state of the ledger is known as consensus
issues certificates
uses
uses
Blockchain
24
Other Nonfunctional Requirements
• Performance
– The amount of data being shared
– Number and location of peers Consider the trade-offs
– Latency and throughput between performance,
– Batching characteristics security, and resiliency!
• Security
– Type of data being shared, and with whom
– How is identity achieved
– Confidentiality of transaction queries
– Who verifies (endorses) transactions
• Resiliency
– Resource failure
– Malicious activity
– Non-determinism
E0 P3 P4 Endorsement policy:
A A
• “E0, E1 and E2 must sign”
B D
• (P3, P4 are not part of the policy)
Key:
P
E2 O O Endorser Ledger
A
B
Ordering- Committing Peer Application
Service
Hyperledger Ordering Node
Fabric
Smart Contract Endorsement
(Chaincode) Policy
©2017 IBM Corporation
29
Sample Transaction: Step 4/7 – Order Transaction
Client
Application
S
D
K
E1
A
B
* O O
Different ordering algorithms available:
• SOLO (Single node, development)
• Kafka (Crash fault tolerance)
Key:
P
E2 O O Endorser Ledger
A
B
Ordering- Committing Peer Application
Service
Hyperledger Ordering Node
Fabric
Smart Contract Endorsement
(Chaincode) Policy
©2017 IBM Corporation
31
Sample Transaction: Step 6/7 – Validate Transaction
Key:
P
E2 O O Endorser Ledger
A
B
* Ordering- Committing Peer Application
Service
Hyperledger Ordering Node
Fabric
Smart Contract Endorsement
(Chaincode) Policy
©2017 IBM Corporation
32
Sample Transaction: Step 7/7 – Notify Transaction
!
E0 ! P3 ! P4 Applications can register to be notified
when transactions succeed or fail and
A A
B D when blocks are added to the ledger.