Colorado Burma Roundtable Network: CBRTN Christian Missions to SE Asia and Colorado
Christian gierds 2013-06-20-c ai-se
-
Upload
caise2013vlc -
Category
Economy & Finance
-
view
118 -
download
3
Transcript of Christian gierds 2013-06-20-c ai-se
Analyzing and Completing Middleware Designs forEnterprise Integration using Coloured Petri Nets
Dirk Fahland, Christian Gierds
Loan BrokerCustomer Bank 2
Bank 1
Bank 3Credit Bureau
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
Simulation
Model Checking
Completion
Execution
Enterprise Integration Patterns
• by Gregor Hohpe & Bobby Woolf
• high-level integrationpatterns
• focus on messages• collection of best
practices
Enterprise Integration
2
Implementing a Middleware
Hohpe & Woolf:1. model middleware with Enterprise
Integration Patterns (EIP)2. implement (each EIP)
Enterprise Integration
3
Loan BrokerCustomer Bank 2
Bank 1
Bank 3Credit Bureau
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
Middleware Design with EIP
Advantages:• model-driven design• structured approach
Enterprise Integration
4
Gaps:• informal description of
patterns• no analysis of model• no check of interplay of
patterns
Translate EIP to Formal ModelEnterprise Integration
5
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
data
Loan Request Get Credit Score Get Banks
Best Quote
Recipient List
Aggegator
cond1 pipe1
pipe2cond2
cond3 pipe3
["pipe1" ∈ l]
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
y
y
y
condi
(y,l) ["pipei" ∉ l]x x x
req x
x z y l
z
enrich x z y y y
req y
l
(y,l)
pipefirstdata
[isFirst q]
q
aggr.update b q
b[isComplete b]
data
[canUpdate q b]
q
f qbb
y
y
y
q
Banks
["pipe2" ∈ l]
["pipe3" ∈ l]
var x : LoanRequest;var y : ScoredLoanRequest;var z : CreditScore;var l : ListOfBanks;var q, b : Quote;
fun req x = …;fun req y = …;fun isFirst q = …;fun canUpdate q b = …;fun update b q = …;fun isComplete b = …;fun f q = …;
Simulation
Model Checking
Completion
Execution
Issues:• overall correctness• throughput of each
pattern• control-flow
dependencies
NextEnterprise Integration
6
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
data
Loan Request Get Credit Score Get Banks
Best Quote
Recipient List
Aggegator
cond1 pipe1
pipe2cond2
cond3 pipe3
["pipe1" ∈ l]
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
y
y
y
condi
(y,l) ["pipei" ∉ l]x x x
req x
x z y l
z
enrich x z y y y
req y
l
(y,l)
pipefirstdata
[isFirst q]
q
aggr.update b q
b[isComplete b]
data
[canUpdate q b]
q
f qbb
y
y
y
q
Banks
["pipe2" ∈ l]
["pipe3" ∈ l]
var x : LoanRequest;var y : ScoredLoanRequest;var z : CreditScore;var l : ListOfBanks;var q, b : Quote;
fun req x = …;fun req y = …;fun isFirst q = …;fun canUpdate q b = …;fun update b q = …;fun isComplete b = …;fun f q = …;
Simulation
Model Checking
Completion
Execution
1. Translation Details2. Why Coloured Petri
Nets?
1.2.
Translation in Detail (1/3)Enterprise Integration
7
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
Content Enricher
var x : Type1;var z : TypeReply;fun enrich x z = …;
pipe pipex enrich x z
chan
req x
chan
x x
z
Type1Type1 Type2
Translation in Detail (2/3)Enterprise Integration
8
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
Recipient List colset InTyp = Type;colset SL = list String;colset valWithList = product Type * SL;var x : Type;var l : SL;fun inList l string = …;
pipe1
pipen
addr list
pipe
xSL
x
[inList l "pipe1"]l (x,l)
(x,l)
(x,l)
(x,l)
(x,l)
x[inList l "pipen"]
[not inList l "pipe1"]
[not inList l "pipen"]
... ...
InType (x,l)
Translation in Detail (3/3)Enterprise Integration
9
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
Aggregator
var x : Type;var y : AggregatedType;fun isFirst x = …;fun canUpdate x y = …;fun isComplete y = …;fun update y x = …;fun f x = …;
pipefirstdata
[isFirst x]
xf x
aggr.xupdate y x
y[isComplete y]
pipeyy
[canUpdate x y]
colset InTyp = Type;colset SL = list String;colset valWithList = product Type * SL;var x : Type;var l : SL;fun inList l string = …;
pipe1
pipe3
addr list
pipe
x
SL
x
[inList l "pipe1"]
l (x,l)
(x,l)
(x,l)
(x,l)
(x,l)
x
[inList l "pipe3"]
[not inList l "pipe1"]
[not inList l "pipe3"]
valWithList
valWithList
valWithList
... ...
InType
Connecting PatternsEnterprise Integration
10
colset OutType = …;...
pipe pipex enrich x z
chan
req x
chan
x x
z
Type1 OutType
Now unify types and change declarations!
WHY COLOURED PETRI NETS?
Enterprise Integration
11
Why Coloured Petri Nets? (1/2)Enterprise Integration
12
Simulation in CPN Tools
• finding flaws
• performance analysis
Model Checking
• ASK-CTL
• abstraction
Execution
• refine model
• Tsinghua Workflow
Management System
• code generation
data
Loan Request Get Credit Score Get Banks
Best Quote
Recipient List
Aggegator
cond1 pipe1
pipe2cond2
cond3 pipe3
["pipe1" ∈ l]
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
y
y
y
condi
(y,l) ["pipei" ∉ l]x x x
req x
x z y l
z
enrich x z y y y
req y
l
(y,l)
pipefirstdata
[isFirst q]
q
aggr.update b q
b[isComplete b]
data
[canUpdate q b]
q
f qbb
y
y
y
q
Banks
["pipe2" ∈ l]
["pipe3" ∈ l]
var x : LoanRequest;var y : ScoredLoanRequest;var z : CreditScore;var l : ListOfBanks;var q, b : Quote;
fun req x = …;fun req y = …;fun isFirst q = …;fun canUpdate q b = …;fun update b q = …;fun isComplete b = …;fun f q = …;
data
Loan Request Get Credit Score Get Banks
Best Quote
Recipient List
Aggegator
cond1 pipe1
pipe2cond2
cond3 pipe3
["pipe1" ∈ l]
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
(y,l)
y
y
y
condi
(y,l) ["pipei" ∉ l]x x x
req x
x z y l
z
enrich x z y y y
req y
l
(y,l)
pipefirstdata
[isFirst q]
q
aggr.update b q
b[isComplete b]
data
[canUpdate q b]
q
f qbb
y
y
y
q
Banks
["pipe2" ∈ l]
["pipe3" ∈ l]
var x : LoanRequest;var y : ScoredLoanRequest;var z : CreditScore;var l : ListOfBanks;var q, b : Quote;
fun req x = …;fun req y = …;fun isFirst q = …;fun canUpdate q b = …;fun update b q = …;fun isComplete b = …;fun f q = …;
Why Coloured Petri Nets? (2/2)Control Flow Completion:• generate control flow dependencies
Enterprise Integration
13
Requests vs. Replies
Take Home Points
• built on best practice modeling patterns• complementing EIP with formal model• bridging the gap: enabling analysis before
actual implementation• project: Modeling tool with automatic
translation
Enterprise Integration
14
Loan BrokerCustomer Bank 2
Bank 1
Bank 3Credit Bureau
Loan Broker
Get Credit Score Get Banks
Credit Bureau Rule Base
Recipient List
Aggregator
Bank 2
Bank 1
Bank 3
Loan Request
Best Quote
Simulation
Model Checking
Completion
Execution
Thank you for your attention!