SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
1Page© 2017 IBM Corporation© 2017 IBM Corporation
Blockchain Rule-based
Smart Contracts
With IBM Operational Decision Manager
November 2017
Stephane Mery
Distinguished Engineer, IBM ODM Chief Architect
2Page© 2017 IBM Corporation
Introduction
• Some of that logic is actually Business Logic
• Encode the Business Rules that apply to the transactions
Smart Contract is the Blockchain mechanism to automate transaction processing logic.
• On the market for more than 15 years
• Used by ~1,000 Customers Worldwide for critical business operations – Finance, Insurance, Retail, Supply Chain,
Transportation…
• Provides Enterprise-class capabilities to author, execute and manage decision logic
IBM Operational Decision Manager (ODM) is the market-leading Business Rules
Management System
3Page© 2017 IBM Corporation
Smart Contracts – Challenges and Opportunities
Code in Smart Contract is often Business Logic
• Implementing the clauses of contract & agreement between transacting parties
• Making transactions compliant to the regulation
• Code is essentially “business rules” encoded in Go, Java or JavaScript.
• -- quickly becomes complex to implement and manage without a rule engine
• è need to be more accessible to Business Stakeholders, a high-level business-friendly language would be better
Business Logic might change frequently
• Need proper governance around change
• è need extensive tooling to govern Smart Contracts life-cycle
Semantic of the Smart Contract should be well defined
• Expressivity should be limited to early detect inconsistencies, ambiguities and contradictions
• We should be able to verify, test and simulate Smart Contracts
• è A Rule Engine provides a safer environment, trading expressivity for safety
4Page© 2017 IBM Corporation
Smart Contracts – Use Case – Blockchain for Music
Digital Rights dispatch to Artists
- Current solutions spoil artists
- Intermediaries capture a lot of the value
- Smart Contracts to store artist rights
encoded as rules
- Smart Contract to encode payment split
depending on when/where a song is
broadcast, for instance
- …
Example derived from Sacem/PRS/Ascap general use-case. Not representative of real Customer use-case
5Page© 2017 IBM Corporation
Rule-based Smart Contracts with IBM ODM
6Page© 2017 IBM Corporation
Smart Contracts leveraging IBM Operational Decision Manager
è Externalizing Smart Contract business logic in ODM
- Business decisions involved in Smart Contracts are delegated to the ODM rule engine
- eXecution Object Model generated from HyperLedger Composer Data Model
- Business stakeholders are maintaining the logic in ODM tools, like Decision Center
è Integrating ODM Rule Execution Server with Hyperledger Fabric
- Deploying Rule Execution Server in Blockchain peer nodes
- Calling Decision Services REST API from Hyperledger Composer Smart Contracts
- Deploying Ruleset through Blockchain transactions
7Page© 2017 IBM Corporation
Smart Contracts – Running ODM rules in-chain
- ODM rule engine part of the
Blockchain Peer Nodes
validating transactions
- Deployed as a Docker
image
- Transaction processing logic expressed
as Business Rules with ODM
- Ruleset stored in the Blockchain and
deployed through a Blockchain
transaction
- Out-process REST call from Composer
Transaction Processor
Leveraging ODM Business-friendly tooling to author, test, simulate and govern Smart Contract rules
8Page© 2017 IBM Corporation
• Decision Services are implemented in ODM
- eXecution Object Model and BOM are generated from HyperLedger Composer domain model
- Business Vocabulary created in ODM
- Decisions are implemented as Business Rules & Decision Tables using ODM tooling
• Decision Services exposed as REST/JSON API
- Signature based on the BOM
- Called from the Smart Contract
Invoking Decision Services
9Page© 2017 IBM Corporation
Invoking Decision Services
• HyperLedger Composer Transaction Processors calling-out to Decision Service REST API
- Transaction data and assets are serialized in JSON and passed to the POST API
- Decision result data come back as JSON object, used in the Java Script Transaction Processor code
HyperLedger Composer Transaction Processor
Using Composer ‘post’ API passing the transaction
and related assets referenced by the transaction
Transaction Processor code decodes the decision
service response and takes the appropriate action
10Page© 2017 IBM Corporation
Business Rules life-cycle
• New version of the Ruleset are submitted to the Blockchain as Transactions
- Specific RuleAppUpdated Transaction type specified in Composer
- Specific Transaction Processor in Composer to handle the transaction and deploy the ruleset
- Ruleset deployed to the RES associated to the peer through a facade to the RES exposed as a REST API
• Most current Ruleset version is stored in the Blockchain
- Ruleset are stored in the Blockchain for reference
- The most current version number is written in an asset and used when calling out Decision Services
- If deployment transaction fails, transaction is rolled-back and most current version is unchanged
• XOM changes are deployed the same way
- All logic execution support secured by the Blockchain
11Page© 2017 IBM Corporation
Smart Contracts – Business Rules Lifecycle Management
1 Business Users update rules in
Decision Center following proper
Governance workflow
2
When Business Rules are agreed and
properly validated, they are pushed to
the Ledger as a Transaction and
dispatched to all Nodes
Composer
Chaincode
Specific Transaction Processor
ODM Rule Execution Server
RES Deploy REST API
Blockchain World State
& Ledger
Ruleset Deployment Tx
3
Ruleset is stored in
the Ledger as well
as the current
version
4 Ruleset is deployed to the RES
5
When Deployment
Tx will be validated
on all nodes, the
new version of the
rules is available
Ruleset
Blockchain Peer Node
Blockchain
12Page© 2017 IBM Corporation
Wrap-up
• Smart Contract is a key concept in Blockchain. The logic applied to transactions is likely to be
Business-related.
• IBM ODM, as the Market-leading Decision Management platform, provides Enterprise-class
capabilities to define and manage Business-logic and make it accessible to the Business.
• The combination of Blockchain/Smart Contract and ODM is a way to go beyond technology and
include Business stakeholders in the value chain.
13Page© 2017 IBM Corporation
http://ibm.biz/odm-blockchain
https://github.com/ODMDev/sample-blockchain-vehicle-lifecycle
Article
Sample
References
14Page© 2017 IBM Corporation
Vehicle Lifecycle Blockchain Application
• Developed with Hyperledger Composer and run on Hyperledger Fabric
• Manage the overall lifecycle of a Vehicle from Order to Recycling through registration and
various ownership transfer
• Detect suspicious ownership transfer using Business Rules externalized in ODM
https://www.youtube.com/watch?v=IgNfoQQ5Reg
15Page© 2017 IBM Corporation
Vehicle Lifecycle Data Model
16Page© 2017 IBM Corporation
Vehicle Lifecycle Data Model in Composer
Participants, Assets and Transactions are defined in HyperLedger Composer
17Page© 2017 IBM Corporation
Vehicle Lifecycle Data Model in ODM
• The same model is designed in ODM as a Java Execution Model (XOM) and a Business Object Model (BOM).
• Could be generated from Composer
• A Business Vocabulary is created in ODM using the business terminology
18Page© 2017 IBM Corporation
Vehicle Lifecycle Data Model in ODM
Based on the Decision Service signature, ODM generates a REST API
19Page© 2017 IBM Corporation
Decision: is this transaction suspicious?
Is the ownership transfer of this Vehicle from this Seller to this Buyer suspicious?
20Page© 2017 IBM Corporation
Demo – 11 Steps Demo
21Page© 2017 IBM Corporation
• HyperLedger Fabric and Composer deployed as a set of Docker Containers
Step1 – Start Hyperledger Fabric and Composer
Please refer to https://hyperledger.github.io/composer/installing/development-tools.html to install and run
HyperLedger Fabric and Composer.
22Page© 2017 IBM Corporation
• Start the ODM Rule Execution Server Docker Container
Step 2 – Start ODM RES Docker Container
In odm-runtime directory , invoke docker-compose up command
23Page© 2017 IBM Corporation
• Start the Deployment Service facade
Step 3 – Start ODM Deployment Service
In odm-deployer directory , invoke docker-compose up command
24Page© 2017 IBM Corporation
• Use Rule Designer to build the XOM and the Ruleapp
it packages the XOM jar and the Ruleapp in the ‘output’ directory
Step 4 – Build the XOM and the RuleApp
Launch IBM ODM Rule Designer on a workspace and import projects from vehicle-lifecycle-xom
and vehicle-lifecycle-decision-service
25Page© 2017 IBM Corporation
• Using Composer API to build and deploy vehicle-lifecycle@1.0.0.bna
Step 5 – Deploy the Vehicle Lifecycle Business Network to Blockchain
Go to vehicle-lifecycle directory , invoke npm run deploy command
26Page© 2017 IBM Corporation
• XOM is built from Rule Designer and deployed to the RES through a Blockchain
transaction
Step 6 – Deploy the XOM to the RES
In vehicle-lifecycle-cli directory, invoke npm run deployXom command (*)
(*) the first time you have to invoke npm install to
initialize the command line
27Page© 2017 IBM Corporation
Step 7 – Deploy the RuleApp to the RES
• The Ruleapp is built from Rule Designer and deployed to the RES through a Blockchain
transaction
In vehicle-lifecycle-cli directory, invoke npm run deployRuleapp command
28Page© 2017 IBM Corporation
• Send specific PrivateVehicleTransfer transactions that are detected as suspicious by
ODM. The decision service returns the suspicion message related to the vehicle
Step 8 – Submit suspicious transactions
In vehicle-lifecycle-cli directory, invoke npm run demo command
29Page© 2017 IBM Corporation
• Use ODM Tooling to change the Business Rules. Increment the version number of the
Ruleset and generate the new Ruleapp archive
Step 9 – Updating the business logic
30Page© 2017 IBM Corporation
• Submit a RuleUpdated transaction with the new ruleapp
Npm run list (in vehicle-lifecycle directory) >
Step 10 – Deploy the new version of the RuleApp
In vehicle-lifecycle-cli directory, invoke the following node command
31Page© 2017 IBM Corporation
• Submit a suspicious transfer again
Step 11 – See impact of business logic change

Contenu connexe

Tendances

Case Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and MicroservicesCase Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
Kai Wähner
 

Tendances (20)

Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
2449 rapid prototyping of innovative io t solutions
2449   rapid prototyping of innovative io t solutions2449   rapid prototyping of innovative io t solutions
2449 rapid prototyping of innovative io t solutions
 
Seriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java MicroservicesSeriously Open Cloud Native Java Microservices
Seriously Open Cloud Native Java Microservices
 
IBM Blockchain Overview
IBM Blockchain OverviewIBM Blockchain Overview
IBM Blockchain Overview
 
Welcome to Hybrid Cloud Innovation Tour 2016
Welcome to Hybrid Cloud Innovation Tour 2016Welcome to Hybrid Cloud Innovation Tour 2016
Welcome to Hybrid Cloud Innovation Tour 2016
 
IBM Blockchain 101
IBM Blockchain 101IBM Blockchain 101
IBM Blockchain 101
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
IBM Blockchain Labs Explained v1.0
IBM Blockchain Labs Explained v1.0IBM Blockchain Labs Explained v1.0
IBM Blockchain Labs Explained v1.0
 
NRB - BE MAINFRAME DAY 2017 - Case Study
NRB - BE MAINFRAME DAY 2017 - Case StudyNRB - BE MAINFRAME DAY 2017 - Case Study
NRB - BE MAINFRAME DAY 2017 - Case Study
 
What's New In Blockchain For Business Technology (October 2019)
What's New In Blockchain For Business Technology (October 2019)What's New In Blockchain For Business Technology (October 2019)
What's New In Blockchain For Business Technology (October 2019)
 
Meetup6 microservices for the IoT
Meetup6 microservices for the IoTMeetup6 microservices for the IoT
Meetup6 microservices for the IoT
 
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
 
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and MicroservicesCase Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
 
Serverless architectures built on an open source platform
Serverless architectures built on an open source platformServerless architectures built on an open source platform
Serverless architectures built on an open source platform
 
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical StrategyIBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: KeynoteIBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
 
Deploying and Managing Global Blockchain Networks
Deploying and Managing Global Blockchain Networks Deploying and Managing Global Blockchain Networks
Deploying and Managing Global Blockchain Networks
 
Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017
 
Bluemix 로 접근하는 DevOps - Cognitive Cloud Connect
Bluemix 로 접근하는 DevOps - Cognitive Cloud ConnectBluemix 로 접근하는 DevOps - Cognitive Cloud Connect
Bluemix 로 접근하는 DevOps - Cognitive Cloud Connect
 
IBM Relay 2015: Opening Keynote
IBM Relay 2015: Opening Keynote IBM Relay 2015: Opening Keynote
IBM Relay 2015: Opening Keynote
 

Similaire à IBM Bluemix Nice Meetup - 20171120 - Smart Contracts

CWIN17 New-York / Transforming enterprises with blockchain
CWIN17 New-York / Transforming enterprises with blockchainCWIN17 New-York / Transforming enterprises with blockchain
CWIN17 New-York / Transforming enterprises with blockchain
Capgemini
 

Similaire à IBM Bluemix Nice Meetup - 20171120 - Smart Contracts (20)

Fabric Composer - Construct 2017
Fabric Composer - Construct 2017Fabric Composer - Construct 2017
Fabric Composer - Construct 2017
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18
 
Fabric Composer - London Hyperledger Meetup - March 2017
Fabric Composer - London Hyperledger Meetup - March 2017Fabric Composer - London Hyperledger Meetup - March 2017
Fabric Composer - London Hyperledger Meetup - March 2017
 
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes &  Rule-based Sm...IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes &  Rule-based Sm...
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
 
Hyperledger Composer Update 2017-04-05
Hyperledger Composer Update 2017-04-05Hyperledger Composer Update 2017-04-05
Hyperledger Composer Update 2017-04-05
 
Introduction to Fabric Composer
Introduction to Fabric ComposerIntroduction to Fabric Composer
Introduction to Fabric Composer
 
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
 
CWIN17 New-York / Transforming enterprises with blockchain
CWIN17 New-York / Transforming enterprises with blockchainCWIN17 New-York / Transforming enterprises with blockchain
CWIN17 New-York / Transforming enterprises with blockchain
 
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
 
Blockchain session @ 2nd Bluemix Meetup
Blockchain session @  2nd Bluemix MeetupBlockchain session @  2nd Bluemix Meetup
Blockchain session @ 2nd Bluemix Meetup
 
Integration (Application?) Modernization with IBM Garage
Integration (Application?) Modernization with IBM GarageIntegration (Application?) Modernization with IBM Garage
Integration (Application?) Modernization with IBM Garage
 
Ibm system storage solutions handbook
Ibm system storage solutions handbook Ibm system storage solutions handbook
Ibm system storage solutions handbook
 
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
 
IBM Blockchain Platform Technical Introduction v1.1
IBM Blockchain Platform Technical Introduction v1.1IBM Blockchain Platform Technical Introduction v1.1
IBM Blockchain Platform Technical Introduction v1.1
 
Cloud Customer Architecture for Blockchain
Cloud Customer Architecture for BlockchainCloud Customer Architecture for Blockchain
Cloud Customer Architecture for Blockchain
 
Making blockchain works for business
Making blockchain works for businessMaking blockchain works for business
Making blockchain works for business
 
Modeling Blockchain Applications v1.02
Modeling Blockchain Applications v1.02Modeling Blockchain Applications v1.02
Modeling Blockchain Applications v1.02
 
Gartner EA Architecting for DevOps and Hybrid Cloud
Gartner EA Architecting for DevOps and Hybrid CloudGartner EA Architecting for DevOps and Hybrid Cloud
Gartner EA Architecting for DevOps and Hybrid Cloud
 
Gcf blockchain meetup frankfurt final
Gcf blockchain meetup frankfurt finalGcf blockchain meetup frankfurt final
Gcf blockchain meetup frankfurt final
 

Plus de IBM France Lab

20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
IBM France Lab
 
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
IBM France Lab
 
IBM Cloud Bordeaux Meetup - 20190325 - Software Factory
IBM Cloud Bordeaux Meetup - 20190325 - Software FactoryIBM Cloud Bordeaux Meetup - 20190325 - Software Factory
IBM Cloud Bordeaux Meetup - 20190325 - Software Factory
IBM France Lab
 

Plus de IBM France Lab (20)

20200113 - IBM Cloud Côte d'Azur - DeepDive Kubernetes
20200113 - IBM Cloud Côte d'Azur - DeepDive Kubernetes20200113 - IBM Cloud Côte d'Azur - DeepDive Kubernetes
20200113 - IBM Cloud Côte d'Azur - DeepDive Kubernetes
 
20200114 - IBM Cloud Paris Meetup - DevOps
20200114 - IBM Cloud Paris Meetup - DevOps20200114 - IBM Cloud Paris Meetup - DevOps
20200114 - IBM Cloud Paris Meetup - DevOps
 
20200128 - Meetup Nice Côte d'Azur - Agile Mindset
20200128 - Meetup Nice Côte d'Azur - Agile Mindset20200128 - Meetup Nice Côte d'Azur - Agile Mindset
20200128 - Meetup Nice Côte d'Azur - Agile Mindset
 
Défis de l'IA : droits, devoirs, enjeux économiques et éthiques
Défis de l'IA : droits, devoirs, enjeux économiques et éthiquesDéfis de l'IA : droits, devoirs, enjeux économiques et éthiques
Défis de l'IA : droits, devoirs, enjeux économiques et éthiques
 
Meetup ibm abakus banque postale
Meetup ibm abakus banque postaleMeetup ibm abakus banque postale
Meetup ibm abakus banque postale
 
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
 
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
20190613 - IBM Cloud Côte d'Azur meetup - "Cloud & Containers"
 
IBM Watson IOT - Acoustic or Visual Insights
IBM Watson IOT - Acoustic or Visual InsightsIBM Watson IOT - Acoustic or Visual Insights
IBM Watson IOT - Acoustic or Visual Insights
 
Retour expérience Track & Trace - IBM using Sigfox.
Retour expérience Track & Trace - IBM using Sigfox.Retour expérience Track & Trace - IBM using Sigfox.
Retour expérience Track & Trace - IBM using Sigfox.
 
20190520 - IBM Cloud Paris-Saclay Meetup - Hardis Group
20190520  - IBM Cloud Paris-Saclay Meetup - Hardis Group20190520  - IBM Cloud Paris-Saclay Meetup - Hardis Group
20190520 - IBM Cloud Paris-Saclay Meetup - Hardis Group
 
IBM Cloud Paris Meetup - 20190520 - IA & Power
IBM Cloud Paris Meetup - 20190520 - IA & PowerIBM Cloud Paris Meetup - 20190520 - IA & Power
IBM Cloud Paris Meetup - 20190520 - IA & Power
 
IBM Cloud Côte d'Azur Meetup - 20190328 - Optimisation
IBM Cloud Côte d'Azur Meetup - 20190328 - OptimisationIBM Cloud Côte d'Azur Meetup - 20190328 - Optimisation
IBM Cloud Côte d'Azur Meetup - 20190328 - Optimisation
 
IBM Cloud Côte d'Azur Meetup - 20190328 - Optimisation
IBM Cloud Côte d'Azur Meetup - 20190328 - OptimisationIBM Cloud Côte d'Azur Meetup - 20190328 - Optimisation
IBM Cloud Côte d'Azur Meetup - 20190328 - Optimisation
 
IBM Cloud Bordeaux Meetup - 20190325 - Software Factory
IBM Cloud Bordeaux Meetup - 20190325 - Software FactoryIBM Cloud Bordeaux Meetup - 20190325 - Software Factory
IBM Cloud Bordeaux Meetup - 20190325 - Software Factory
 
IBM Cloud Paris Meetup - 20190129 - Assima
IBM Cloud Paris Meetup - 20190129 - AssimaIBM Cloud Paris Meetup - 20190129 - Assima
IBM Cloud Paris Meetup - 20190129 - Assima
 
IBM Cloud Paris Meetup - 20190129 - Myrtea
IBM Cloud Paris Meetup - 20190129 - MyrteaIBM Cloud Paris Meetup - 20190129 - Myrtea
IBM Cloud Paris Meetup - 20190129 - Myrtea
 
IBM Cloud Paris Meetup - 20181016 - L'agilité à l'échelle
IBM Cloud Paris Meetup - 20181016 - L'agilité à l'échelleIBM Cloud Paris Meetup - 20181016 - L'agilité à l'échelle
IBM Cloud Paris Meetup - 20181016 - L'agilité à l'échelle
 
IBM Cloud Paris Meetup - 20180911 - Common Ledger for Public Administration
IBM Cloud Paris Meetup - 20180911 - Common Ledger for Public AdministrationIBM Cloud Paris Meetup - 20180911 - Common Ledger for Public Administration
IBM Cloud Paris Meetup - 20180911 - Common Ledger for Public Administration
 
IBM Cloud Paris Meetup - 20180911 - Smart Citizen Bot
IBM Cloud Paris Meetup - 20180911 - Smart Citizen BotIBM Cloud Paris Meetup - 20180911 - Smart Citizen Bot
IBM Cloud Paris Meetup - 20180911 - Smart Citizen Bot
 
IBM Cloud Paris Meetup - 20180911 - Goal Driven Automation
IBM Cloud Paris Meetup - 20180911 - Goal Driven AutomationIBM Cloud Paris Meetup - 20180911 - Goal Driven Automation
IBM Cloud Paris Meetup - 20180911 - Goal Driven Automation
 

Dernier

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
Safe Software
 
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
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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)
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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
 

IBM Bluemix Nice Meetup - 20171120 - Smart Contracts

  • 1. 1Page© 2017 IBM Corporation© 2017 IBM Corporation Blockchain Rule-based Smart Contracts With IBM Operational Decision Manager November 2017 Stephane Mery Distinguished Engineer, IBM ODM Chief Architect
  • 2. 2Page© 2017 IBM Corporation Introduction • Some of that logic is actually Business Logic • Encode the Business Rules that apply to the transactions Smart Contract is the Blockchain mechanism to automate transaction processing logic. • On the market for more than 15 years • Used by ~1,000 Customers Worldwide for critical business operations – Finance, Insurance, Retail, Supply Chain, Transportation… • Provides Enterprise-class capabilities to author, execute and manage decision logic IBM Operational Decision Manager (ODM) is the market-leading Business Rules Management System
  • 3. 3Page© 2017 IBM Corporation Smart Contracts – Challenges and Opportunities Code in Smart Contract is often Business Logic • Implementing the clauses of contract & agreement between transacting parties • Making transactions compliant to the regulation • Code is essentially “business rules” encoded in Go, Java or JavaScript. • -- quickly becomes complex to implement and manage without a rule engine • è need to be more accessible to Business Stakeholders, a high-level business-friendly language would be better Business Logic might change frequently • Need proper governance around change • è need extensive tooling to govern Smart Contracts life-cycle Semantic of the Smart Contract should be well defined • Expressivity should be limited to early detect inconsistencies, ambiguities and contradictions • We should be able to verify, test and simulate Smart Contracts • è A Rule Engine provides a safer environment, trading expressivity for safety
  • 4. 4Page© 2017 IBM Corporation Smart Contracts – Use Case – Blockchain for Music Digital Rights dispatch to Artists - Current solutions spoil artists - Intermediaries capture a lot of the value - Smart Contracts to store artist rights encoded as rules - Smart Contract to encode payment split depending on when/where a song is broadcast, for instance - … Example derived from Sacem/PRS/Ascap general use-case. Not representative of real Customer use-case
  • 5. 5Page© 2017 IBM Corporation Rule-based Smart Contracts with IBM ODM
  • 6. 6Page© 2017 IBM Corporation Smart Contracts leveraging IBM Operational Decision Manager è Externalizing Smart Contract business logic in ODM - Business decisions involved in Smart Contracts are delegated to the ODM rule engine - eXecution Object Model generated from HyperLedger Composer Data Model - Business stakeholders are maintaining the logic in ODM tools, like Decision Center è Integrating ODM Rule Execution Server with Hyperledger Fabric - Deploying Rule Execution Server in Blockchain peer nodes - Calling Decision Services REST API from Hyperledger Composer Smart Contracts - Deploying Ruleset through Blockchain transactions
  • 7. 7Page© 2017 IBM Corporation Smart Contracts – Running ODM rules in-chain - ODM rule engine part of the Blockchain Peer Nodes validating transactions - Deployed as a Docker image - Transaction processing logic expressed as Business Rules with ODM - Ruleset stored in the Blockchain and deployed through a Blockchain transaction - Out-process REST call from Composer Transaction Processor Leveraging ODM Business-friendly tooling to author, test, simulate and govern Smart Contract rules
  • 8. 8Page© 2017 IBM Corporation • Decision Services are implemented in ODM - eXecution Object Model and BOM are generated from HyperLedger Composer domain model - Business Vocabulary created in ODM - Decisions are implemented as Business Rules & Decision Tables using ODM tooling • Decision Services exposed as REST/JSON API - Signature based on the BOM - Called from the Smart Contract Invoking Decision Services
  • 9. 9Page© 2017 IBM Corporation Invoking Decision Services • HyperLedger Composer Transaction Processors calling-out to Decision Service REST API - Transaction data and assets are serialized in JSON and passed to the POST API - Decision result data come back as JSON object, used in the Java Script Transaction Processor code HyperLedger Composer Transaction Processor Using Composer ‘post’ API passing the transaction and related assets referenced by the transaction Transaction Processor code decodes the decision service response and takes the appropriate action
  • 10. 10Page© 2017 IBM Corporation Business Rules life-cycle • New version of the Ruleset are submitted to the Blockchain as Transactions - Specific RuleAppUpdated Transaction type specified in Composer - Specific Transaction Processor in Composer to handle the transaction and deploy the ruleset - Ruleset deployed to the RES associated to the peer through a facade to the RES exposed as a REST API • Most current Ruleset version is stored in the Blockchain - Ruleset are stored in the Blockchain for reference - The most current version number is written in an asset and used when calling out Decision Services - If deployment transaction fails, transaction is rolled-back and most current version is unchanged • XOM changes are deployed the same way - All logic execution support secured by the Blockchain
  • 11. 11Page© 2017 IBM Corporation Smart Contracts – Business Rules Lifecycle Management 1 Business Users update rules in Decision Center following proper Governance workflow 2 When Business Rules are agreed and properly validated, they are pushed to the Ledger as a Transaction and dispatched to all Nodes Composer Chaincode Specific Transaction Processor ODM Rule Execution Server RES Deploy REST API Blockchain World State & Ledger Ruleset Deployment Tx 3 Ruleset is stored in the Ledger as well as the current version 4 Ruleset is deployed to the RES 5 When Deployment Tx will be validated on all nodes, the new version of the rules is available Ruleset Blockchain Peer Node Blockchain
  • 12. 12Page© 2017 IBM Corporation Wrap-up • Smart Contract is a key concept in Blockchain. The logic applied to transactions is likely to be Business-related. • IBM ODM, as the Market-leading Decision Management platform, provides Enterprise-class capabilities to define and manage Business-logic and make it accessible to the Business. • The combination of Blockchain/Smart Contract and ODM is a way to go beyond technology and include Business stakeholders in the value chain.
  • 13. 13Page© 2017 IBM Corporation http://ibm.biz/odm-blockchain https://github.com/ODMDev/sample-blockchain-vehicle-lifecycle Article Sample References
  • 14. 14Page© 2017 IBM Corporation Vehicle Lifecycle Blockchain Application • Developed with Hyperledger Composer and run on Hyperledger Fabric • Manage the overall lifecycle of a Vehicle from Order to Recycling through registration and various ownership transfer • Detect suspicious ownership transfer using Business Rules externalized in ODM https://www.youtube.com/watch?v=IgNfoQQ5Reg
  • 15. 15Page© 2017 IBM Corporation Vehicle Lifecycle Data Model
  • 16. 16Page© 2017 IBM Corporation Vehicle Lifecycle Data Model in Composer Participants, Assets and Transactions are defined in HyperLedger Composer
  • 17. 17Page© 2017 IBM Corporation Vehicle Lifecycle Data Model in ODM • The same model is designed in ODM as a Java Execution Model (XOM) and a Business Object Model (BOM). • Could be generated from Composer • A Business Vocabulary is created in ODM using the business terminology
  • 18. 18Page© 2017 IBM Corporation Vehicle Lifecycle Data Model in ODM Based on the Decision Service signature, ODM generates a REST API
  • 19. 19Page© 2017 IBM Corporation Decision: is this transaction suspicious? Is the ownership transfer of this Vehicle from this Seller to this Buyer suspicious?
  • 20. 20Page© 2017 IBM Corporation Demo – 11 Steps Demo
  • 21. 21Page© 2017 IBM Corporation • HyperLedger Fabric and Composer deployed as a set of Docker Containers Step1 – Start Hyperledger Fabric and Composer Please refer to https://hyperledger.github.io/composer/installing/development-tools.html to install and run HyperLedger Fabric and Composer.
  • 22. 22Page© 2017 IBM Corporation • Start the ODM Rule Execution Server Docker Container Step 2 – Start ODM RES Docker Container In odm-runtime directory , invoke docker-compose up command
  • 23. 23Page© 2017 IBM Corporation • Start the Deployment Service facade Step 3 – Start ODM Deployment Service In odm-deployer directory , invoke docker-compose up command
  • 24. 24Page© 2017 IBM Corporation • Use Rule Designer to build the XOM and the Ruleapp it packages the XOM jar and the Ruleapp in the ‘output’ directory Step 4 – Build the XOM and the RuleApp Launch IBM ODM Rule Designer on a workspace and import projects from vehicle-lifecycle-xom and vehicle-lifecycle-decision-service
  • 25. 25Page© 2017 IBM Corporation • Using Composer API to build and deploy vehicle-lifecycle@1.0.0.bna Step 5 – Deploy the Vehicle Lifecycle Business Network to Blockchain Go to vehicle-lifecycle directory , invoke npm run deploy command
  • 26. 26Page© 2017 IBM Corporation • XOM is built from Rule Designer and deployed to the RES through a Blockchain transaction Step 6 – Deploy the XOM to the RES In vehicle-lifecycle-cli directory, invoke npm run deployXom command (*) (*) the first time you have to invoke npm install to initialize the command line
  • 27. 27Page© 2017 IBM Corporation Step 7 – Deploy the RuleApp to the RES • The Ruleapp is built from Rule Designer and deployed to the RES through a Blockchain transaction In vehicle-lifecycle-cli directory, invoke npm run deployRuleapp command
  • 28. 28Page© 2017 IBM Corporation • Send specific PrivateVehicleTransfer transactions that are detected as suspicious by ODM. The decision service returns the suspicion message related to the vehicle Step 8 – Submit suspicious transactions In vehicle-lifecycle-cli directory, invoke npm run demo command
  • 29. 29Page© 2017 IBM Corporation • Use ODM Tooling to change the Business Rules. Increment the version number of the Ruleset and generate the new Ruleapp archive Step 9 – Updating the business logic
  • 30. 30Page© 2017 IBM Corporation • Submit a RuleUpdated transaction with the new ruleapp Npm run list (in vehicle-lifecycle directory) > Step 10 – Deploy the new version of the RuleApp In vehicle-lifecycle-cli directory, invoke the following node command
  • 31. 31Page© 2017 IBM Corporation • Submit a suspicious transfer again Step 11 – See impact of business logic change