MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
Enabling BPM for Clouds
Hans-Arno Jacobsen
Bell University Laboratory Chair
University of Torontohttp://www.padres.msrg.utoronto.ca
Summer School on Service Research, July 19th, 2010
“BPM in Cloud Architectures: Business Process Management with SLAs and Events”, joint work with Vinod Muthusamy (extended abstract)
http://eqosystem.msrg.org/
An eQoSystem for declarative distributed applications with SLAs
via Events & SLAs
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
c001 endc001 end
Service Summer, July 19th, 2010, KIT, Germany
> 0.7
elseelse
Business Process Example
Checkscore
Creditcheck
Creditcheck 2
Checkscore 2
Reject
Approve
Send toofficer
< 0.3
Store inDB
…
…
Loan Application Processing
< 0.5
service RTT < 100ms
uptime > 99.99 %
service RTT < 100ms
uptime > 99.99 %
Pid=c401Pid=c401 gid=c001gid=c001
gid=c001gid=c001
service time < 2sservice time < 2s
service cost < $0.02service cost < $0.02
Pid=c1Pid=c1Pid=c001Pid=c001
Pid=c3301Pid=c3301
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Large-scale Business ProcessesVendorVendor
SaleSale
ManufactoryManufactory
FinanceFinance
Dispatch B
Out-stock B
Pick-up goods
Packaging
MarketingMarketing
Design
Out-stock B
Target price
Prototype
Out Take
Control
Assign
Confirm
Determinateplan
Check stock
Rawmaterials
Audit
Raw
Determinateplan
Executeplan
Processcontrol
Monitor
Process
Pay
Check
Signature
Print receipt
WarehouseWarehouse
Delivery
FedEx
Pick up
Monitoring
Statistic
Chart
StrategyStrategy DesignDesign MarketingMarketing OrderOrderManufactoryManufactory PaymentPayment
Requirementcollection
Feature selection
Goods selection
Confirmfeatures
Material
Make plan
Feedback
Check order
Fill order
Check dealer Check credit
Approval Approval
Validate
Affirm order
Sale prediction
SignContract
CCCadministrate
Goods delivery
Fill dispatch bill
Fill out-stock bill
Credit card
Case Study (Chinese Electronics Manufacturer):
• Department-level processes with 26 to 47 activities
• Global processes that compose departmental ones
• Thousands of concurrent instances
• Hundreds of collaborating partners
• Geographically distributed
• Administrative boundaries
Case Study (Chinese Electronics Manufacturer):
• Department-level processes with 26 to 47 activities
• Global processes that compose departmental ones
• Thousands of concurrent instances
• Hundreds of collaborating partners
• Geographically distributed
• Administrative boundaries
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
What Support is Required ?
De-coupling and loose coupling
Fine-grained event filtering
In-network event processing
Composite event detection
Event correlation
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Agenda
Enabler
The PADRES approach
Event-driven BPM with PADRES
SLA-driven BPM with PADRES
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
What Abstractions Enable BPM?
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
What Abstractions Do Not Work? Databases
Great for managing historic data But what about future data (e.g., events)
Data streams Great for managing structured streams of tuples But what about un-structured, multi-typed, sporadic, un-
ordered events from many sources Rule-based expert systems
Great for inference and reasoning But what about managing large numbers of fined-grained
filters in distributed environments
Cum grani salis
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
What Abstractions Enable BPM?
It is our opinion that the afore-mentioned requirements can best be addressed by The content-based publish/subscribe paradigm Realized by content-based message routing
Events represent state transitions in the environment. Conveyed as publications to the pub/sub system
Event filtering and correlation is based on Subscriptions managed by the pub/sub system
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
amount > $500K
amount > $500K
Input queue
Output queue
d2
Output queue
d3
subscription dest
Matching Engine
Routing Table
&
Class = Loan d2
Service RTT < 2s d3
B
B
B
B
B
Content-based Publish/Subscribe
Publisher Publisher
Subscriber Subscriber
Publications
Subscriptions
NotificationNotification
Service RTT <
2sService RTT <
2s
Service RTT <
150msService RTT <
150ms
Uptime > 99.99%
Uptime > 99.99%
class = Loan,
class = Loan,
Service = credit check
Service = credit check
status = approved,
status = approved,
1. Advertise1. Advertise
2. Subscribe2. Subscribe
9
Event-BasedEvent-Based
DecoupledDecoupled
FlexibleFlexible
ResponsiveResponsive
Content RoutingContent Routing
DeclarativeDeclarative
Service Summer, July 19th, 2010, KIT, Germany
Content-based Routing3. Publish3. Publish
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Application Modeling
Advertisements (schema or types) [class=Loan], [action=*], [customerID=*], [amount<$100K], [region=East]
Publications & events (data) [class, Loan], [action, request], [customerID, 876594], [amount, $50K]
Subscriptions (query) [class=Loan], [amount>$500K], [region=*]
Application semantics is expressed via advertisements (data sources), publications(data sources), and subscriptions (data sinks)
Service Summer, July 19th, 2010, KIT, Germany
A
S
P
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Benefits of Publish/Subscribe Simplifies IT development and maintenance by
decoupling enterprise components
Supports sophisticated interactions among components using expressive subscription languages
Supports fine-grained subscriptions for event management
Achieves scalability with in-network filtering and processing
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Many Applications are Event-based &Benefit from Publish/Subscribe
A
B C
D
E
F
RFID and sensor networksService oriented architectures
Workflows, business processes and job scheduling
Supply chain and logistics
Event-Based
Light
CallbackRFID: Razor SKU
Transform
Fault!
Temperature
Invoke Loan
Ordered
Delivered
In flightJob A done
Triggered
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Web start & open sourcepadres.msrg.org
Implemented in Java
Service Summer, July 19th, 2010, KIT, Germany
Our PADRES ESB for Event-driven BPM
First generation of students, when I looked away Peng Alex David aRno Eli Serge
PADRES is Publish/subscribe Applied to Distributed Resource Scheduling
PAdres is Distributed REsource Scheduling
http://www.padres.msrg.utoronto.ca
Enterprise Services Bus(Events & Services Bus)
13
Acknowledgements (2004-present):
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Our PADRES ESB Stack & Vision
Server Farm
Computers
ComputersDatabase
Laptops
Computers
Workstation
Laptops
DatabaseServer
ServerSwitch
Server
Switch
Computing, Storage, and Networking Resources
Content-based Routing (Publish/Subscribe)
Content-based RouterClients (publisher/subscriber)
PADRES ESB
Business Process Execution
Deploy Control UpdateVisualize
Monitor ...
6
43
7start halt
Business Process Management and Business Activity Monitoring
Redirectresume
addremove
Event Management Framework
Application Events
Business Events
Complex Events
Network & System Events
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
B
B
B
B
P
S
S
input queue
output queue dest2
output queue dest3
dest1
dest2
dest3
P
S
= publisher
= subscriber
subscription dest
Matching Engine
Routing Table
+
service time < 3s dest2
service time < 2s dest3
Publications
service time = 2.5sservice time = 1sservice time = 3s
PADRES ESB is an Overlay of P/S Brokers
output queue dest1
Service Summer, July 19th, 2010, KIT, Germany
Try out and download at:http://www.padres.msrg.org
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Innovative PADRES Features
A
B C
D
E
F
CompositeEvents
HistoricAccess
Management
Robustness
LoadBalancing
Security
ACM Middleware’2004IEEE ICDCS’2005
IEEE ICDCS’2009ACM Middleware’2008
IEEE ICDCS’2010ACM Middleware’2006
ACM Middleware’2007
CSRG TR 2009ACM DEBS’2007
ACM DEBS’2007
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Event-driven BPM with PADRES
Service Summer, July 19th, 2010, KIT, Germany
Content-based Routing (Publish/Subscribe)
Content-based RouterClients (publisher/subscriber)
PADRES ESB
Business Process Execution
Deploy Control UpdateVisualize
Monitor ...
6
43
7start halt
Business Process Management and Business Activity Monitoring
Redirectresume
addremove
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
B C
D
A
B C
D
E
F
Example: D executes, if B and C have completed (D depends on B and C).
Service Summer, July 19th, 2010, KIT, Germany
Modeling Business Processes
Dependency in processes and more complex process patterns require event correlation
Event correlation is enabled by the detection of composite events
Composite events are expressed via composite subscriptions
Composite subscription consists of atomic subscriptions Subscription language features for BPM modeling
E.g., AND, OR, and variables ($x)
A
B C
D
E
F
Exception
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Composite Subscription Examples
Expresses a structural property of a process
[class = Activity Status], [cmd. = Archived],[Process ID = $X ] AND[class = Activity Status], [cmd. = Signed Off],[Process ID = $X ]
Expresses a performance property of a process
[cmd. = Credit check request], [Process ID = $X ] AND[status = Approved], [Process ID = $X ]
Service Summer, July 19th, 2010, KIT, Germany
Checkscore
Creditcheck
Process
Approve
Singed Off
…Loan Process
Reject
Archive
> $50K
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Business Process Management Transformation of
process into pub/sub language
Deployment of transformed process
Execution of process by triggering instances
Monitor process & instance execution
Manage, i.e., control, version,…
A
B C
D
trigger
E
F
trigger multiple instances concurrently
Exception & compensation
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Business Process Execution
Receive
PADRES ESB1
3 4
5
BPELReceive
Assign
Flow
Invoke Wait
Reply
Wait Reply
Invoke
2
Assign
WS Gateway Agent
6
END
WS client
Web Service
Web Service
http/soappub/sub
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Sub4:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity2’],
[IID,eq,$X],
[status,eq,’SUCCESS’]
&&
[class,eq,LINK_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity2’],
[IID,eq,$X],
[status,isPresent,any]
Sub4:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity2’],
[IID,eq,$X],
[status,eq,’SUCCESS’]
&&
[class,eq,LINK_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity2’],
[IID,eq,$X],
[status,isPresent,any]
BPEL Transformation Example
Process 5Process 5activity1activity1
flow1flow1
activity2activity2 activity5activity5
activity3activity3 activity6activity6
activity4activity4 activity7activity7
activity8activity8
Sub1:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity1’],
[IID,isPresent,any],
[status,eq,’SUCCESS’]
Sub1:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity1’],
[IID,isPresent,any],
[status,eq,’SUCCESS’]
Pub1:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’flow1’],
[IID,’g001’],
[status,’STARTED’]
Pub1:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’flow1’],
[IID,’g001’],
[status,’STARTED’]
Sub2:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’flow1’],
[IID,isPresent,any],
[status,eq,’STARTED’]
Sub2:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’flow1’],
[IID,isPresent,any],
[status,eq,’STARTED’]
Pub2:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’actitiy2’],
[IID,’g001’],
[status,’SUCCESS’]
Pub2:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’actitiy2’],
[IID,’g001’],
[status,’SUCCESS’]
Pub3:
[class,LINK_STATUS],
[process,’Process5’],
[activityName,’actitiy2’],
[IID,’g001’],
[status,’POSITIVE’]
Pub3:
[class,LINK_STATUS],
[process,’Process5’],
[activityName,’actitiy2’],
[IID,’g001’],
[status,’POSITIVE’]
Pub4:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’actitiy6’],
[IID,’g001’],
[status,’SUCCESS’]
Pub4:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’actitiy6’],
[IID,’g001’],
[status,’SUCCESS’]
Sub5:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity4’],
[IID,isPresent,any],
[status,eq,’SUCCESS’]
&&
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity7’],
[IID,isPresent,any],
[status,eq,”SUCCESS”]
Sub5:
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity4’],
[IID,isPresent,any],
[status,eq,’SUCCESS’]
&&
[class,eq,ACTIVITY_STATUS],
[process,eq,’Process5’],
[activityName,eq,’activity7’],
[IID,isPresent,any],
[status,eq,”SUCCESS”]
Pub5:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’actitiy7’],
[IID,’g001’],
[status,’SUCCESS’]
Pub5:
[class, ACTIVITY_STATUS],
[process,’Process5’],
[activityName,’actitiy7’],
[IID,’g001’],
[status,’SUCCESS’]
Service Summer, July 19th, 2010, KIT, Germany
Cf. our ACM Trans Web’2010for full BPEL mapping
Sub1 (flow agent):
[class = ACTIVITY_STATUS],
[process = ’Process5’],
[activityName = ’activity1’],
[IID isPresent any],
[status = ’SUCCESS’]
Sub1 (flow agent):
[class = ACTIVITY_STATUS],
[process = ’Process5’],
[activityName = ’activity1’],
[IID isPresent any],
[status = ’SUCCESS’]
Sub4 (actvity6 agent):
( [class = ACTIVITY_STATUS],
[process = ’Process5’],
[activityName = ’activity5’],
[IID = $X],
[status = ’SUCCESS’] )
AND
( [class = LINK_STATUS],
[process = ’Process5’],
[activityName = ’activity2’],
[IID = $X],
[status isPresent any] )
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Evaluation: Changing Request Rate
P/S
P/S
P/S
P/S
P/S
PADRES ESBPADRES ESB
Clustered
Centralized
Distributed
Service Summer, July 19th, 2010, KIT, Germany
20 servers
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
SLA-driven BPM
Service Summer, July 19th, 2010, KIT, Germany
Content-based Routing (Publish/Subscribe)
Content-based RouterClients (publisher/subscriber)
PADRES ESB
Business Process Execution
Deploy Control UpdateVisualize
Monitor ...
6
43
7start halt
Business Process Management and Business Activity Monitoring
Redirectresume
addremove
http://eqosystem.msrg.org/
An eQoSystem for declarative distributed applications with SLAs
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Currently, business goals must be manually considered at every stage of the business
process development cycle
N
Y
Far?Get
destinationValidaterequest
Find flight
Find train
cost < $0.02
service time < 3s
Only trusted partners
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Layer SLA Metric Example
Business Process
Cost Cost of search service < $0.02 per use
Fidelity, quality, utility Map resolution > 300x300
Trust, reputation Only use trusted payment services
Deployment & Operations
Service time Execution time < 3s
Throughput Throughput > 100/min
Availability Uptime > 99.9%
Load balance Server utilization delta < 10%
Network Latency Service RTT < 100ms
Bandwidth Max bandwidth < 3Mbps
Jitter Delay jitter < 10ms
Service Level Agreements (SLAs)SLAs are contracts between service consumers and providers
that specify the expected behavior of each party and the penalties of violating the contract.
SLAs specify business goals declaratively.
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Runtime Uses of SLAs
A B C D
p
q
Web service Execution engine
2
1b service time < 1s
M
ESB broker topology
A,B
D
1a
C
service time < 2s
Dynamic service discoveryDiscover services with capabilities that satisfy goals.
MonitoringOnly monitor the business events related to goals.Feed back measurements to support runtime adaptations.
Distributed executionFine-grained allocation of process to available resources.Move portions of process to strategic locations.
ESB adaptationReconfigure the ESB topology to satisfy goals.
M Monitor ESB node (PADRES broker)
Process
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Agenda
Distributed process execution Architecture Components
Execution & optimization algorithms Design issues Evaluation
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Process Execution ArchitecturesCentralized
One execution engine May not scale Central point of failure
Agent-based Distributed execution engine In-network processing
Lower bandwidth and latency Fine-grained use of resources
Clustered Replicated execution engines Centralized control and data
High bandwidth and latency Still may not scale & administrative
limitations
ABCD
ABCD
ABCD
D
C
A,B
Problem: How to deploy activities in a distributed manner to satisfy SLAs?
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Large-scale Business ProcessesVendorVendor
SaleSale
ManufactureManufacture
FinanceFinance
Dispatch B
Out-stock B
Pick-up goods
Packaging
MarketingMarketing
Design
Out-stock B
Target price
Prototype
Out Take
Control
Assign
Confirm
Determinateplan
Check stock
Rawmaterials
Audit
Raw
Determinateplan
Executeplan
Processcontrol
Monitor
Process
Pay
Check
Signature
Print receipt
WarehouseWarehouse
Delivery
FedEx
Pick up
Monitoring
Statistic
Chart
StrategyStrategy DesignDesign MarketingMarketing OrderOrderManufactureManufacture PaymentPayment
Requirementcollection
Feature selection
Goods selection
Confirmfeatures
Material
Make plan
Feedback
Check order
Fill order
Check dealer Check credit
Approval Approval
Validate
Affirm order
Sale prediction
SignContract
CCCadministrate
Goods delivery
Fill dispatch bill
Fill out-stock bill
Credit card
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
31
Distributed Process Execution:Architecture & Components
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Execution Engine
Atomic Redeployer (IEEE ICDCS’2009)
Candidate Engine Discovery
(ACM DEBS’2009)
PADRES messaging layer
Activity Manager
Activities(ACM TWEB’2010)
Activity Profiler
Engine Profiler
Late
ncy
Ba
ndw
idth
En
gine
re
sour
ce
RedeploymentManager (CASCON)
SLAs, cost models
Estimators
Ranking algorithms
SLA Management Stack
Instance states
Input, output queues
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Activity Profiler Profiles execution of local activities Maintains profiles for various metric types
Message hops, disk I/O, energy usage, etc.Profile for
message hops metric
Activity Pred/Succ
Msg rate
T P 40/min
T S 10/min
1 4 7
Execution engineBroker
2
3
5
6
8
9
P
T
S
P T S
Process
ESB broker topology Profile for
execution time metric
Activity Exec time
T 0.3 s
Profile for memory usage
metric
Activity Mem
T 30 MB
Activity
Service Summer, July 19th, 2010, KIT, Germany
Example:
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Activity Profiler Summary
Service Summer, July 19th, 2010, KIT, Germany
APk
activity profiler for metric type Mk
APk
activity profiler for metric type Mk
activity lifecycle events
ai sk(ai)
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Engine Profiler (e.g., distance) Discover paths
e2→e5 , e5→e7
Probe paths e5→e4 (for candidate C)
Compute paths e2→e4 , e4→e7
Cases e4 in e2→e5
e4 in e5→e7
otherwise
1 4 7
Execution engineBroker
2
3
5
6
8
9
P
S C
P T S
Probed paths
Source Target Distance Probe @
5 4 1 1:34pm
Discovered paths
Source Target Distance Disc @
2 5 3 1:48pm
5 7 2 1:49pm
Computed paths
Source Target Distance Comp @
2 4 2 2:02pm
4 7 1 2:04pm
Computes and caches information about candidate engines
Cf. DEBS’2009 for our resource discovery algorithms to identify candidates
T
Process
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Engine Profiler Summary
Service Summer, July 19th, 2010, KIT, Germany
EPk
engine profiler for metric type Mk
EPk
engine profiler for metric type Mk
set of candidate engines
ej pk(ej)
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Redeployment Manager Estimator: Computes an estimate of the metric
cost ck(ai,ej) of hosting an activity ai at engine ej
Cost model: Computes an estimate of the cost c(ai,ej) of hosting activity ai on engine ej
Check deployment: Determines what to do with an activity ai Determine best engine e Compute benefit: c(ai) – c(ai,e) Compute resident time at current engine If resident long enough
If benefit is large enough move ai to e Otherwise, apply pressure to other activities
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Redeployment Manager Summary Compute the cost of deploying local activities
ai at candidate engines ej
GivenF(ai): Cost functionP(ai): PredecessorsS(ai): Successors
MeasurementsC(ai): Cost at local engineE(P(ai)): Location of predecessorsE(S(ai)): Location of successors
ComputeC(ai, ej) for every ai, ej :
Estimated cost of deploying activity ai at candidate engine ej
ComplexityMemory: O( |ai| |ej| )
Computation: O( |ai| | ej | |Navg(ai)| )Cost Model
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Redeployment Manager Summary
Service Summer, July 19th, 2010, KIT, Germany
Ek
estimator for metric type Mk
Ek
estimator for metric type Mk
ai
ej
ck(ai,ej)
APkAPk EPk
EPk
CM
cost model
CM
cost modelai
ej
f
c(ai,ej)
EkEk
EkEk
Check Deployment
Check Deployment
ai
ejredeployredeploy
{ej}pressurepressure
RM
Redeployment Manager
RM
Redeployment Manager
{ai}{ (ai,ej) }
redeployredeploy
{ (ai,{ej})}pressurepressure
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Atomic Redeployment
Traditional pub/sub client movement protocols are expensive and do not offer transactional properties
Transactional movement Formalized movement properties similar to ACID properties Efficient and guaranteed routing reconfiguration
For example, guarantee that no messages are lost, if an activity is re-deployed
See IEEE ICDCS’2009
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Execution Engine
Atomic Redeployer (IEEE ICDCS’2009)
Candidate Engine Discovery
(ACM DEBS’2009)
PADRES messaging layer
Activity Manager
Activities(ACM TWEB’2010)
Activity Profiler
Engine Profiler
Late
ncy
Ba
ndw
idth
En
gine
re
sour
ce
RedeploymentManager (CASCON)
SLAs, cost models
Estimators
Ranking algorithms
SLA Management Stack Summary
Instance states
Input, output queues
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
1. Distribution cost Cdist = f(Cd3, Cd1, Cd2)Cd1 Message rateCd2 Message sizeCd3 Latency
2. Engine cost Ceng = f(Ce1, Ce2,Ce3)Ce1 Load (number of instances)Ce2 Resources (CPU, memory, etc.)Ce3 Activity complexity
3. Service cost Cserv = f(Cs1, Cs2, Cs3)Cs1 Latency of external serviceCs2 Execution time of external serviceCs3 Marshalling/unmarshalling
Cost(activity) = f(wiCi)Cost(process) = ∑cost(activity)
The cost of a process is based on metrics
These metrics can be weighted to achieve different objectives
Optimize timewd1 = wd3 = we3 = wserv = 1, other wi = 0
Optimize network overheadwd2 = wd3 = 1, other wi = 0
Various optimization criteria can be specified
Threshold criteria: ∑wiCi > x E.g., Report SLA violations within 3 s.
Minimized criteria: min( ∑wiCi ) E.g., Minimize distribution overhead
Cost Model Components
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Examples of SLAs & Cost Functions Minimize message hops
f() = msg_hops_rate = msg_rate * engine_distance
Minimize bandwidth cost f() = msg_rate * link_cost $$$
Limit CPU & network energy usage f() = 0.3 * cpu_energy + 0.7 * link_energy < X
f() = 0.3 * (invocation rate * engine_unit_energy) + 0.7 * (msg_rate * link_unit_energy) < X
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Evaluation and design issues
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Red activities are pinned to
brokers
Process Hotspot – Illustration
Execution engineBroker
Process
ESB broker topology
SLAMinimize traffic
MetricMessage hops
D E F
p = 90% q = 10 %
B
CA I
G
H
Service Summer, July 19th, 2010, KIT, Germany
1 4 7
2
3
5
6
8
9
D F E
AB
C
GI
H
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Process Hotspot – Results Traffic with redeployment is 47% of the static case
Post-redeployment traffic is 10% Redeployment triggered in about 30 sec
47
10% of static
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Varying Hotspot – Illustration
D E F
p q
Execution engineBroker
Process
ESB broker topology
B
CA I
G
H
Service Summer, July 19th, 2010, KIT, Germany
1 4 7
2
3
5
6
8
9
D F E
AB
C
GI
H
Red activities are pinned to
brokers
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Varying Hotspot – Results Dynamic redeployment suffers temporarily
after process hotspot moves Traffic with redeployment is 42% of the static
case
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Summary on SLA-driven BPM Distributed execution engine has qualitative and quantitative
advantages Redeployment algorithm can optimize SLA in many cases Challenge 1: Local optima
Techniques to selectively expand knowledge can work Widen candidate radius Redeploy sets of activities
Challenge 2: Coordination Independent decisions can destabilize system Potential problem has not manifest in evaluations so far
Challenge 3: SLA granularity (more an engineering issue) Can’t specify SLA on portions of a process Can’t specify SLA on particular instances of a process
(e.g., VIP user)
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Benefits of Content-based Publish/Subscribe for BPM
Naturally enables centralized and distributed business process coordination
Coordination can span administrative domains and physically distributed resources
Supports process orchestration and choreography Monitoring & control is integral part of paradigm Agile on the fly process adaptation and versioning Correlation of application events with low-level
infrastructure events
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Summary: The PADRES Stack
Server Farm
Computers
ComputersDatabase
Laptops
Computers
Workstation
Laptops
DatabaseServer
ServerSwitch
Server
Switch
Computing, Storage, and Networking Resources
Content-based Routing (Publish/Subscribe)
Content-based RouterClients (publisher/subscriber)
PADRES ESB
Business Process Execution
Deploy Control UpdateVisualize
Monitor ...
6
43
7start halt
Business Process Management and Business Activity Monitoring
Redirectresume
addremove
Event Management Framework
Application Events
Business Events
Complex Events
Network and System Events
Download PADRES @ http://padres.msrg.org
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Outlook
Dynamic BPM for flexible service value chains
Ad hoc business processes
Business impact assessment
Business entity concept
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Conclusions
Many applications are inherently event-driven. Effective BPM requires capable event
processing abstractions. Content-based publish/subscribe is a powerful
event processing abstraction and paradigm. PADRES is based on the pub/sub paradigm. PADRES is an ESB targeted at event-based
BPM. PADRES enables real-time business analytics
and business activity monitoring.
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Acknowledgements: Current PADRES Team Chen Chen Alex Cheung Alton Chiu Amer Farroukh Patrick Lee Guoli Li
Bala Maniymaran Vinod Muthusamy Reza Sherafat Naweed Tajuddin Chunyang Ye Young Yoon
Service Summer, July 19th, 2010, KIT, Germany
Countless alumni (see our web site)http://padres.msrg.org
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
Questions & Discussion?
A D R E SP
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen
Selected Literature about PADRES All our papers are available from
http://msrg.org/tags/padres & hyperlinked below A Distributed Service Oriented Architecture for Business
Process Execution. ACM Trans. on the Web, 2010. Publisher Placement Algorithms in Content-based
Publish/Subscribe. IEEE ICDCS, 2010. Transactional Mobility in Distributed Content-Based
Publish/Subscribe Systems. IEEE ICDCS, 2009. Distributed Automatic Service Composition in Large-Scale
Systems. ACM DEBS, 2008. Adaptive Content-based Routing in General Overlay
Topologies. ACM Middleware, 2008. Historic Data Access in Publish/Subscribe. ACM DEBS, 2007. Papers on managing SLAs with PADRES
http://msrg.org/tags/sla
Service Summer, July 19th, 2010, KIT, Germany
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany
References The PADRES ESB project home
http://padres.msrg.utoronto.ca An eQoSystem for declarative distributed applications with SLAs
http://research.msrg.utoronto.ca/Eqosystem/ The Micro-ToPSS event processing middleware for sensor networks (RFID)
http://microToPSS.msrg.utoronto.ca/ Mobile-ToPSS – publish/subscribe for mobile and location-based applications
http://research.msrg.utoronto.ca/Mobile/ ToPSS - the Toronto Publish/Subscribe System Family
http://www.ToPSS.biz (coming soon ) Quantifying events in software to increase modularity & customization in C-
based systems and software-based product lines http://www.AspeCtC.net (ACC - the AspeCt-oriented C compiler)
The Middleware Systems Research Group http://www.msrg.utoronto.ca
My web site http://www.eecg.toronto.edu/~jacobsen
@ the University of Toronto
DEBS Conferencehttp://www.debs.org
July 2011 @ IBM in New York, US
MIDDLEWARE SYSTEMSRESEARCH GROUP
MSRG.ORG
© 2010 Hans-Arno Jacobsen Service Summer, July 19th, 2010, KIT, Germany