1Page
Hyperledger Composer
Project Update
4th May 2017
Dan Selman, Maintainer
@danielselman
2
Dan Selman - @danielselman
• Maintainer for Hyperledger Composer
• STSM & Chief Architect at IBM
• Previously ILOG and BEA Systems
• Expert in business rules and event
processing
• Passion for IT and business
collaboration
3
Agenda
• Introduction
• Project outlook
• Playground demo
• Technical overview
4Page
Introduction to
Hyperledger Composer
5
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
• Blockchain provides a shared, replicated ledger
– Consensus, immutability, finality, provenance
6Page
What is Hyperledger Composer?
– Blockchains provide a low-level interface for business applications
– Smart contract code run on a distributed processing system
– Inputs go into an immutable ledger; outputs to a data store
– Applications are built on top of a low level of abstraction
– Hyperledger Composer
– A suite of high level application abstractions for business networks
– Emphasis on business-centric vocabulary for quick solution creation
– Features
– Model your business network, test and deploy
– Applications use APIs to interact with a business network
– Integrate existing systems of record using loopback/REST
– Open Tools, APIs and libraries to support these activities
– Exploits Hyperledger Fabric blockchain technology
– Fully open and part of Linux Foundation Hyperledger
Business Application
Hyperledger Composer
Hyperledger Fabric
https://hyperledger.github.io/composer/
7Page
Benefits of Hyperledger Composer
Increases
understanding
Saves
time
Reduces
risk
Increases flexibility
Bridges simply from
business concepts to
blockchain
Develop blockchain
applications more
quickly and cheaply
Well tested, efficient
design conforms to best
practice
Higher level abstraction
makes it easier to
iterate
8Page
Getting Started with Hyperledger Composer
– Start at
https://hyperledger.github.io/composer/
– Many useful links
– Getting started
– Documentation
– Chat
– Community
– GitHub
9
Links
• We’re all over the internet!
– Website, tutorial, and docs: https://hyperledger.github.io/composer/
– Public playground: https://composer-playground.mybluemix.net/
– Source code: https://github.com/hyperledger/composer/
– NPM modules: https://www.npmjs.com/search?q=hyperledger+composer
– JSDoc: https://fabric-composer.github.io/jsdoc/index.html (to be moved)
– Docker images: https://hub.docker.com/u/fabriccomposer/ (to be moved)
10
Community
• You can come and speak to us as well!
– Chat to us using Rocket.Chat at https://chat.hyperledger.org
• #composer and #composer-dev channels
– Ask (and answer!) questions on Stack Overflow using the hyperledger-composer tag
– Tweet us using the #Hyperledger #Composer hashtags!
11Page
Project outlook
12Page
Hyperledger Composer Outlook
– Now an official Hyperledger incubation project!
– Complete the programming model
– Events for notification and loose coupling of transaction processors
– Links for business network linkage
– Extensive query to support reporting and analytics
– Encryption of data and transactions
– Operational Enhancements
– Exploit Hyperledger Fabric V1: consensus, channels, CouchDB
– Build Activity Community
– Open calls every 2 weeks
– Rocket Chat
– Hyperledger incubation
13Page© 2016 IBM Corporation
vehicle-lifecycle demo
(under development)
14
Tentative Release Plan (subject to change!)
• Version 0.7.0 (released)
– HLF v1 Alpha 1 support
– Getting Started for v1
• Version 0.7.1 (May 5th)
– Support 0.6 and 1.0 connection
profiles in Playground
• Version 0.7.2 (May 19th)
• Vehicle Lifecycle Demo (iOS and Web)
• Ability to emit events from TP functions
• Version 0.7.3 (May 26th)
– Edit using web forms in Playground
• Version 0.8 (29th June)
– Run complex queries
– Support++ for HLF v1
– Security enhancements
• Version 0.9 (27th July)
– Native Node.js runtime in HLF
– ACL testing
15Page
Technical Overview
Buyer
Owner Buyer
Insurer
Listings registryVehicle registry
"$class": "org.acme.vehicle.auction.VehicleListing",
"listingId": "LIST_1234",
"reservePrice": 500,
"description": "Car sale for playback 2",
"state": "FOR_SALE",
"vehicle": "VIN_123456"
"$class": "org.acme.vehicle.auction.Vehicle",
"vin": "VIN_123456",
"owner": "daniel.selman@uk.ibm.com"
net.biz.vehicle.auction
sell
car
offer bid
for car
offer bid
for car
Transactions
• (Sell)
• Offer
• Close Bidding
close
bidding
( Counterparties outside
the business network )
Car Auction Business Network
1 23
Business Network
Participants
Identity
Assets
Registries
Transactions
(Events)
(Links)
THIS DEMO
1. Modelling, testing and exposing the business network
2. Applications consuming the business network
3. Integrating existing systems with the business network
2
DMV
Existing
system
Auctioneer
OwnerApp
App
App
17Page
Conceptual Components and Structure
Business Network Archive
Models ACLsScript File Metadata
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 that
define transaction behaviour and packages into a business network archive
Solution Administrator provision the target environment and may manage deploy
D
A
18Page
The Model
• A domain specific language that defines:
• Assets
• Participants
• Transactions
• Matches how we talk about business networks
in the real world
Business Network Archive
Models
Transaction
Functions
ACLs Metadata
19Page
The ACL
• Separates out access control from
business logic making it simpler
• Can build access control into
the business logic if needed
• ACL engine evaluates rules for all
access to assets
• Top down checking
• If no rule then denies access
Business Network Archive
Models
Transaction
Functions
ACLs metadata
20Page
The Script File
• Provide transaction implementation logic
• Specified in Javascript
• Designed for any reasonable Javascript
developer to pick up easily
Business Network Archive
Models
Transaction
Functions
ACLs meta-data
21Page
Metadata
• Name & version of the business network
• Markdown documentation for the solution
• Works with tools like Github to turn into a
HTML page
• Easily read in raw .md or HTML format
Business Network Archive
Models
Transaction
Functions
ACLs metadata
22Page
The Archive
• The Business Network Archive
packages up the project to for
deployment to a runtime
• Can be deployed using CLI tools
• Can be packed/unpacked by a
developer to see its contents, check
it, work on it or send it.
• At deployment the archive is
executed within a chaincode
container
Business Network Archive
Models
Transaction
Functions
ACLs Metadata
Business Network Archive
Models
Transaction
Functions
ACLs meta-data
Models
Transaction
Functions
ACLs meta-data
create
Hyperledger
Fabric
Applicatio
n
Business
network
chaincode
container
deploy
23
Extensive, Familiar, Open Development Toolset
CLI utilities
Data modelling JavaScript
business logic
Web playground
Editor support Existing systems and
data
$ composer
Client libraries
composer-client
composer-admin
Code generation
Swagger
24Page
Modelling Business Networks: Composer Playground
– A interactive web tool for the development (and test) of business networks without installing
anything
– Developers & technical analysts
– Create business network definition
– DSL for specific assets,
participants & transactions in your
network
– Live content assist, syntax
checking
– Non-web options also possible
– Hosted & local playgrounds
– Atom & VSCode plug-ins
http://composer-playground.mybluemix.net
25Page
Testing Business Networks: Composer Playground
– Test tab on playground
– Dynamically reflects defined model
– Creates default registries
– Create, read, update, and delete
resources interactively
– Submit transactions interactively
– Fabric and browser-only modes
– Multiple environments, e.g. test, prod
26Page
Getting Started With Hyperledger Composer
Docker Images
JS Packages
Samples
Extensions
Local Composer Dev
Composer
Playground
Sample Angular 2 UI
Existing Systems
Integration tools
Final Application
Handed
to
UX/UI
Handed to
integratio
n
Once tested,
download to
use locally
Swagger REST API
- UI
- Playground
- Fabric
- Hello World
- Car Auction
- Farm to Fork
- Client
- Runtime
- Admin
- Loopback
Local or External
Hyperledger Fabric
27Page
Model Development, Versioning and Distribution
– GitHub for development
– Use npm package format for metadata
– package.json version
– model files and business networks
– npm for distribution
– Distribute models and networks
– Networks depend on models
– Use npm dependencies
– Applications npm install BNDs
– Ensures consistency when application connects
to network
– See examples in sample-networks and sample-
models repositories
– These are loaded into playground
model
business
network
definition
28Page
Applications and Javascript APIs
– JavaScript and REST APIs available
– composer-client & composer-admin npm
modules for app devs and admins
respectively
– Programming model JSDoc at
https://fabric-composer.github.io/jsdoc/
– Domain specific REST APIs also available
(see later)
29Page
Generating APIs and sample applications
– Programmable business networks
– Direct consequence of a deployed model
– Query network to generate domain APIs
– Generate sample application for deployed
business network
– Yeoman questionnaire
yo fabric-composer[:angular]
– Also generate test cases using mocha and
chai node.js test packages
– composer generator tests
– Programmable business network provides
many more opportunities for interaction
30Page
Generating APIs and sample applications
Hyperledger Fabric
(existing fabric)
– Business Network Archive
Business
network
chaincode
container
Application
Template
application
Yeoman
questionnaire
2. query
3. customize
5. API
Developer
4. run
User
1. yo fabric-composer-angular
31Page
Command Line Interfaces
– Suite of commands to interact with an
operational business network
– Target use is scripting and interactive
operations
– Packaged as composer-cli in npm
– Generate full list with
composer –help. Individual (sub)
commands support -help
– CLI uses public APIs
– Users can create their own CLIs
$> composer –help
Commands:
archive <subcommand> Composer archive command
generator <subcommand> Composer generator command
identity <subcommand> Composer identity command
network <subcommand> Composer network command
participant <subcommand> Composer participant command
transaction <subcommand> Composer transaction command
Options:
--help Show help [boolean]
-v, --version Show version number [boolean]
Examples:
composer identity issue
For more information: http://fabric-composer.org/reference
$> composer transaction submit –help
composer transaction submit [options]
Options:
--help Show help [boolean]
-v, --version Show version number [boolean]
--connectionProfileName, -p The connection profile name [string]
--businessNetworkName, -n The business network name [string] [required]
--enrollId, -i The enrollment ID of the user [string] [required]
--enrollSecret, -s The enrollment secret of the user [string]
--data, -d Transactions JSON object [string] [required]
33Page
Loopback and REST Support
– Exploit Loopback framework to create REST
APIs. https://loopback.io/
– Domain specific APIs very attractive to mobile
and web developers. Resources and
operations are business-meaningful
– Extensive test facilities for REST methods
using loopback
– Provides back-end integration with any
loopback compatible product
– e.g. IBM Integration Bus, API Connect,
StrongLoop
– Outbound notification (under
development)
34Page
Exploiting the Loopback Connector: Example
– IBM Integration Bus Example
– Takes input from file, SAP or MQ
– Data mapping from CSV, BAPI/IDOC or binary form to JSON model definition of vehicle
– Currently inbound only
– Events support will eventually allow outbound integration
35Page
Thank you!
36Page
Key Concept: Assets
– Represents the resources being
exchanged in the business network
1. Define using asset keyword in model file
2. Assets have structure – domain relevant
class name, e.g. vehicle, house, bond
3. Set of properties, denoted by ‘o’ (letter).
4. Relationships to other resources,
denoted by ‘’. Optional elements are
allowed. Field validators can be provided
5. Stored in an asset registry. Registries
are first class abstraction.
1
2
3
4
5
37Page
Key Concept: Participants
1 – Represent the counterparties in the business
network
1. Define using participant keyword in model file
2. Participants have a class name, relevant to
the domain, e.g. buyer, seller
3. Set of properties, denoted by ‘o’.
Relationships to other resources, denoted by
‘’. Optional elements are allowed. Field
validators can be provided
4. Like assets, can be sub-classed for refinement
5. Stored in a participant registry
2
3
5
4
38Page
Key Concept: Transactions 1 2
– Represents the steps that govern resource
lifecycle, typically assets
1. Define using transaction keyword in model file
2. Assets have a class name, relevant to the
domain, e.g. sellVehicle, buyHouse
3. Set of properties, denoted by ‘o’.
Relationships to other resources, denoted by
‘’. Field validators can be provided
4. Stored in a transaction registry
• Implementation provided separately
3
4
39Page
Key Concept: Transaction Processors
– Provide transaction implementation logic
– Provided in separate <tp>.js files
– @param & @transaction annotators
– Perform state changes on domain specific
resources using model defined syntax
40Page
Key Concept: Access Control Lists
– Separate ACL from application logic
– Defined in a permissions.acl file in
business network definition
– Flexible model allowing both type and
instance access e.g. ‘create cars’ and
‘scrap my car’
– Standard ACL model
– Includes optional condition for more
sophisticated ACL checking
– Executed in order until first rule hit
– DENY has precedence over ALLOW

Hyperledger Composer Update 2017-04-05

  • 1.
    1Page Hyperledger Composer Project Update 4thMay 2017 Dan Selman, Maintainer @danielselman
  • 2.
    2 Dan Selman -@danielselman • Maintainer for Hyperledger Composer • STSM & Chief Architect at IBM • Previously ILOG and BEA Systems • Expert in business rules and event processing • Passion for IT and business collaboration
  • 3.
    3 Agenda • Introduction • Projectoutlook • Playground demo • Technical overview
  • 4.
  • 5.
    5 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 • Blockchain provides a shared, replicated ledger – Consensus, immutability, finality, provenance
  • 6.
    6Page What is HyperledgerComposer? – Blockchains provide a low-level interface for business applications – Smart contract code run on a distributed processing system – Inputs go into an immutable ledger; outputs to a data store – Applications are built on top of a low level of abstraction – Hyperledger Composer – A suite of high level application abstractions for business networks – Emphasis on business-centric vocabulary for quick solution creation – Features – Model your business network, test and deploy – Applications use APIs to interact with a business network – Integrate existing systems of record using loopback/REST – Open Tools, APIs and libraries to support these activities – Exploits Hyperledger Fabric blockchain technology – Fully open and part of Linux Foundation Hyperledger Business Application Hyperledger Composer Hyperledger Fabric https://hyperledger.github.io/composer/
  • 7.
    7Page Benefits of HyperledgerComposer Increases understanding Saves time Reduces risk Increases flexibility Bridges simply from business concepts to blockchain Develop blockchain applications more quickly and cheaply Well tested, efficient design conforms to best practice Higher level abstraction makes it easier to iterate
  • 8.
    8Page Getting Started withHyperledger Composer – Start at https://hyperledger.github.io/composer/ – Many useful links – Getting started – Documentation – Chat – Community – GitHub
  • 9.
    9 Links • We’re allover the internet! – Website, tutorial, and docs: https://hyperledger.github.io/composer/ – Public playground: https://composer-playground.mybluemix.net/ – Source code: https://github.com/hyperledger/composer/ – NPM modules: https://www.npmjs.com/search?q=hyperledger+composer – JSDoc: https://fabric-composer.github.io/jsdoc/index.html (to be moved) – Docker images: https://hub.docker.com/u/fabriccomposer/ (to be moved)
  • 10.
    10 Community • You cancome and speak to us as well! – Chat to us using Rocket.Chat at https://chat.hyperledger.org • #composer and #composer-dev channels – Ask (and answer!) questions on Stack Overflow using the hyperledger-composer tag – Tweet us using the #Hyperledger #Composer hashtags!
  • 11.
  • 12.
    12Page Hyperledger Composer Outlook –Now an official Hyperledger incubation project! – Complete the programming model – Events for notification and loose coupling of transaction processors – Links for business network linkage – Extensive query to support reporting and analytics – Encryption of data and transactions – Operational Enhancements – Exploit Hyperledger Fabric V1: consensus, channels, CouchDB – Build Activity Community – Open calls every 2 weeks – Rocket Chat – Hyperledger incubation
  • 13.
    13Page© 2016 IBMCorporation vehicle-lifecycle demo (under development)
  • 14.
    14 Tentative Release Plan(subject to change!) • Version 0.7.0 (released) – HLF v1 Alpha 1 support – Getting Started for v1 • Version 0.7.1 (May 5th) – Support 0.6 and 1.0 connection profiles in Playground • Version 0.7.2 (May 19th) • Vehicle Lifecycle Demo (iOS and Web) • Ability to emit events from TP functions • Version 0.7.3 (May 26th) – Edit using web forms in Playground • Version 0.8 (29th June) – Run complex queries – Support++ for HLF v1 – Security enhancements • Version 0.9 (27th July) – Native Node.js runtime in HLF – ACL testing
  • 15.
  • 16.
    Buyer Owner Buyer Insurer Listings registryVehicleregistry "$class": "org.acme.vehicle.auction.VehicleListing", "listingId": "LIST_1234", "reservePrice": 500, "description": "Car sale for playback 2", "state": "FOR_SALE", "vehicle": "VIN_123456" "$class": "org.acme.vehicle.auction.Vehicle", "vin": "VIN_123456", "owner": "daniel.selman@uk.ibm.com" net.biz.vehicle.auction sell car offer bid for car offer bid for car Transactions • (Sell) • Offer • Close Bidding close bidding ( Counterparties outside the business network ) Car Auction Business Network 1 23 Business Network Participants Identity Assets Registries Transactions (Events) (Links) THIS DEMO 1. Modelling, testing and exposing the business network 2. Applications consuming the business network 3. Integrating existing systems with the business network 2 DMV Existing system Auctioneer OwnerApp App App
  • 17.
    17Page Conceptual Components andStructure Business Network Archive Models ACLsScript File Metadata 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 that define transaction behaviour and packages into a business network archive Solution Administrator provision the target environment and may manage deploy D A
  • 18.
    18Page The Model • Adomain specific language that defines: • Assets • Participants • Transactions • Matches how we talk about business networks in the real world Business Network Archive Models Transaction Functions ACLs Metadata
  • 19.
    19Page The ACL • Separatesout access control from business logic making it simpler • Can build access control into the business logic if needed • ACL engine evaluates rules for all access to assets • Top down checking • If no rule then denies access Business Network Archive Models Transaction Functions ACLs metadata
  • 20.
    20Page The Script File •Provide transaction implementation logic • Specified in Javascript • Designed for any reasonable Javascript developer to pick up easily Business Network Archive Models Transaction Functions ACLs meta-data
  • 21.
    21Page Metadata • Name &version of the business network • Markdown documentation for the solution • Works with tools like Github to turn into a HTML page • Easily read in raw .md or HTML format Business Network Archive Models Transaction Functions ACLs metadata
  • 22.
    22Page The Archive • TheBusiness Network Archive packages up the project to for deployment to a runtime • Can be deployed using CLI tools • Can be packed/unpacked by a developer to see its contents, check it, work on it or send it. • At deployment the archive is executed within a chaincode container Business Network Archive Models Transaction Functions ACLs Metadata Business Network Archive Models Transaction Functions ACLs meta-data Models Transaction Functions ACLs meta-data create Hyperledger Fabric Applicatio n Business network chaincode container deploy
  • 23.
    23 Extensive, Familiar, OpenDevelopment Toolset CLI utilities Data modelling JavaScript business logic Web playground Editor support Existing systems and data $ composer Client libraries composer-client composer-admin Code generation Swagger
  • 24.
    24Page Modelling Business Networks:Composer Playground – A interactive web tool for the development (and test) of business networks without installing anything – Developers & technical analysts – Create business network definition – DSL for specific assets, participants & transactions in your network – Live content assist, syntax checking – Non-web options also possible – Hosted & local playgrounds – Atom & VSCode plug-ins http://composer-playground.mybluemix.net
  • 25.
    25Page Testing Business Networks:Composer Playground – Test tab on playground – Dynamically reflects defined model – Creates default registries – Create, read, update, and delete resources interactively – Submit transactions interactively – Fabric and browser-only modes – Multiple environments, e.g. test, prod
  • 26.
    26Page Getting Started WithHyperledger Composer Docker Images JS Packages Samples Extensions Local Composer Dev Composer Playground Sample Angular 2 UI Existing Systems Integration tools Final Application Handed to UX/UI Handed to integratio n Once tested, download to use locally Swagger REST API - UI - Playground - Fabric - Hello World - Car Auction - Farm to Fork - Client - Runtime - Admin - Loopback Local or External Hyperledger Fabric
  • 27.
    27Page Model Development, Versioningand Distribution – GitHub for development – Use npm package format for metadata – package.json version – model files and business networks – npm for distribution – Distribute models and networks – Networks depend on models – Use npm dependencies – Applications npm install BNDs – Ensures consistency when application connects to network – See examples in sample-networks and sample- models repositories – These are loaded into playground model business network definition
  • 28.
    28Page Applications and JavascriptAPIs – JavaScript and REST APIs available – composer-client & composer-admin npm modules for app devs and admins respectively – Programming model JSDoc at https://fabric-composer.github.io/jsdoc/ – Domain specific REST APIs also available (see later)
  • 29.
    29Page Generating APIs andsample applications – Programmable business networks – Direct consequence of a deployed model – Query network to generate domain APIs – Generate sample application for deployed business network – Yeoman questionnaire yo fabric-composer[:angular] – Also generate test cases using mocha and chai node.js test packages – composer generator tests – Programmable business network provides many more opportunities for interaction
  • 30.
    30Page Generating APIs andsample applications Hyperledger Fabric (existing fabric) – Business Network Archive Business network chaincode container Application Template application Yeoman questionnaire 2. query 3. customize 5. API Developer 4. run User 1. yo fabric-composer-angular
  • 31.
    31Page Command Line Interfaces –Suite of commands to interact with an operational business network – Target use is scripting and interactive operations – Packaged as composer-cli in npm – Generate full list with composer –help. Individual (sub) commands support -help – CLI uses public APIs – Users can create their own CLIs $> composer –help Commands: archive <subcommand> Composer archive command generator <subcommand> Composer generator command identity <subcommand> Composer identity command network <subcommand> Composer network command participant <subcommand> Composer participant command transaction <subcommand> Composer transaction command Options: --help Show help [boolean] -v, --version Show version number [boolean] Examples: composer identity issue For more information: http://fabric-composer.org/reference $> composer transaction submit –help composer transaction submit [options] Options: --help Show help [boolean] -v, --version Show version number [boolean] --connectionProfileName, -p The connection profile name [string] --businessNetworkName, -n The business network name [string] [required] --enrollId, -i The enrollment ID of the user [string] [required] --enrollSecret, -s The enrollment secret of the user [string] --data, -d Transactions JSON object [string] [required]
  • 32.
    33Page Loopback and RESTSupport – Exploit Loopback framework to create REST APIs. https://loopback.io/ – Domain specific APIs very attractive to mobile and web developers. Resources and operations are business-meaningful – Extensive test facilities for REST methods using loopback – Provides back-end integration with any loopback compatible product – e.g. IBM Integration Bus, API Connect, StrongLoop – Outbound notification (under development)
  • 33.
    34Page Exploiting the LoopbackConnector: Example – IBM Integration Bus Example – Takes input from file, SAP or MQ – Data mapping from CSV, BAPI/IDOC or binary form to JSON model definition of vehicle – Currently inbound only – Events support will eventually allow outbound integration
  • 34.
  • 35.
    36Page Key Concept: Assets –Represents the resources being exchanged in the business network 1. Define using asset keyword in model file 2. Assets have structure – domain relevant class name, e.g. vehicle, house, bond 3. Set of properties, denoted by ‘o’ (letter). 4. Relationships to other resources, denoted by ‘’. Optional elements are allowed. Field validators can be provided 5. Stored in an asset registry. Registries are first class abstraction. 1 2 3 4 5
  • 36.
    37Page Key Concept: Participants 1– Represent the counterparties in the business network 1. Define using participant keyword in model file 2. Participants have a class name, relevant to the domain, e.g. buyer, seller 3. Set of properties, denoted by ‘o’. Relationships to other resources, denoted by ‘’. Optional elements are allowed. Field validators can be provided 4. Like assets, can be sub-classed for refinement 5. Stored in a participant registry 2 3 5 4
  • 37.
    38Page Key Concept: Transactions1 2 – Represents the steps that govern resource lifecycle, typically assets 1. Define using transaction keyword in model file 2. Assets have a class name, relevant to the domain, e.g. sellVehicle, buyHouse 3. Set of properties, denoted by ‘o’. Relationships to other resources, denoted by ‘’. Field validators can be provided 4. Stored in a transaction registry • Implementation provided separately 3 4
  • 38.
    39Page Key Concept: TransactionProcessors – Provide transaction implementation logic – Provided in separate <tp>.js files – @param & @transaction annotators – Perform state changes on domain specific resources using model defined syntax
  • 39.
    40Page Key Concept: AccessControl Lists – Separate ACL from application logic – Defined in a permissions.acl file in business network definition – Flexible model allowing both type and instance access e.g. ‘create cars’ and ‘scrap my car’ – Standard ACL model – Includes optional condition for more sophisticated ACL checking – Executed in order until first rule hit – DENY has precedence over ALLOW

Editor's Notes

  • #2 This presentation assumes that the audience has seen Blockchain Explained (https://ibm.box.com/v/BlockchainExplained)
  • #5 This presentation assumes that the audience has seen Blockchain Explained (https://ibm.box.com/v/BlockchainExplained)
  • #8 Purpose: Why using Composer is great! Say: INCREASE UNDERSTANDING: With the language used by Composer is much more business friendly talking in Assets, Participants & Transactions enabling the gap between developers and business knowledge SAVE TIME: Composer has been built from the ground up with agile in min such as easy to test what was just written and using tools to turn what was created into live API’s and usable front end for end user testing in minutes REDUCES RISK: with the increased ease of testing and ability for multiple personas to read and understand what has been written (amalgamation of previous 2 benefits) this provides much more stability and much more likely the end system will provide the business benefits required. INCREASED FLEXIBILITY: As composer has been designed from agile developing, the ability to update the code and links to github to manage versioning then test this within minutes makes iterating imporvements easy. References: Next slide shows how some of these benefits are realized with the tool choices
  • #9 Purpose: Show where anyone can go to get Composer themselves Say: Composer has now been accepted into the Hyperledger project as an incubation project making it Open Source, Open Standards & Open Governance This website is the home to all you will need to get going to use and explore Composer.The Doccumentation, and guides are getting pretty good.
  • #16 This presentation assumes that the audience has seen Blockchain Explained (https://ibm.box.com/v/BlockchainExplained)
  • #20 Access Control List rules are defined in a permissions.acl file, which is deployed as part of the business network definition and stored in the world state.
  • #21 Standard ES5 Javascript
  • #22 All developers can use this to document and share how the project works
  • #23 Just a .zip file under the covers so easy to extract if wanted & know how but this format makes it easily recognizable as a Business Network Archive to be deployed a a whole to a node. This format is so people know what to do with it when received and not get confused when the auto-unzip something they receive. Gives us a deployment model Designed for a developer to give to a system admin, Sys admin does not need to know the details or programing logic of what's in the archive but does need to customize the systems that it will be running on for Developer does not have access to the system or need to know where it will be deployed to when creating the archive.
  • #24 Purpose: Show the tools being worked with are familiar to many dev Say: Most of these tools are commonly taught at uni so there is a large skill base to make use of when making blockchain DATA MODELING: language is new language being looked at in more detail in a few slides but closely matches the realities of business. More on this later. JAVA SCRIPT: one of the top 10 most popular languages and all decent computer science graduate will have some knowledge on how to program in this, also popular with more experienced developers WEB PLAYGROUND: The playground is a web page that simulates having a blockchain and dev environement for you without needing to install anything. Load the page and get going. This is designed for developers or business analysts who want to get going quick to understand if this is something they can use, then later install the local version to use editors and connect to real blockchains. More on this later in pack. NPM is becoming very popular and an easy modular framework for developers to build upon. Various options available depending on your persona and what you need the tool to do EDITOR: The framework will work allow any editor to be used, so far Atom & VisualStudio Code are supported, more will come as the open community adds their connectors – see anecdotes CLI: a popular method of connecting to, managing and opperating systems o this is available complete with full help guides as standard in other CLI utilities YO: Yoeman is a scaffolding tool for modern web apps. It can writing your build configuration (e.g Gulpfile) and pulling in relevant build tasks and package manage EXISTING SYSTEMS: Loopback & Swagger (round green logo) are also open source projects. Loopback creates a full set of APIs for you based upon what have been made in Fabric Composer. Swagger is the most popular framework for APIs which visually renders your Swagger definition with concise, real time feedback and error handling References & Anecdotes: Atom was planned to be our only initial editor supported, VS Code was added by one of our team familiar with VS code but not part of Composer dev team. Within a short amount of time he had
  • #25 Purpose:
  • #27 Purpose: The flow using composer and how it fits in from writing code to end application & integration Say: Most would start in the top left to trial,