optimal adaptation in web processes with coordination constraints kunal verma, prashant doshi,...
TRANSCRIPT
Optimal Adaptation in Web Processes with
Coordination Constraints Kunal Verma, Prashant Doshi, Karthik Gomadam,
John A. Miller, Amit P. Sheth
LSDIS Lab, Dept of Computer Science, University of Georgia
Outline
• Motivation
• Process Adaptation
• Empirical Evaluation
• Conclusions, Related Work and Future Agenda
Motivation• Evolution of business needs drives IT innovation
• Initial focus on automation led to workflow technology
• In order to facilitate efficient inter-organizational processes distributed computing paradigms were developed– CORBA, JMS, Web Services
• The current and future needs include:– Creating highly adaptive process that react to changing
conditions• Focus on real time events and data – RFID and ubiquitous devices
– Have the ability to quickly collaborate with new partners– Aligning business goals and IT processes
Motivation• Current Tools focus on allowing businesses to have greater
dynamism and agility– Microsoft Dynamics, IBM Websphere Business Integration, SAP
Netweaver• All of these Current focus on dynamic and agility through human
interaction using GUIs• All of them list SOA (WS) as a technology for realization
• The future– Move focus to greater automation
• Capture domain knowledge and declaratively specify criteria for process configuration (Dynamic process configuration)
• Add decision making support to process execution tools for process adaptation (Process Adaptation)
“Each enterprise will measure and aspire to its own unique level of dynamism based on its individual purpose. It is about being nimble and adaptable. A fully integrated business platform can respond faster, and completely, to change. Whether it involves fulfilling a new mandate or embracing a new market opportunity. Some organizations will push the envelope, automating event-triggered responses for highly integrated closed-loop processes, setting the stage for self-optimizing systems.”
Sandra Rogers, White Paper: Business Forces Driving Adoption of Service Oriented Architecture, Sponsored by: SAP AG
Levels of autonomic maturity
Basic Level1
ManagedLevel 2
PredictiveLevel 3
AdaptiveLevel 4
AutonomicLevel 5
Levels of Autonomic Maturity
No Established Standards
Established Standards
Manual Analysis
Manual Analysis
Centralized tools and manual analysis
Centralized tools and manual analysis
Correlation and
guidance
Correlation and
guidance
System monitors,
correlates and takes action
System monitors,
correlates and takes action
Dynamic Business
policy based management
Dynamic Business
policy based management
Motivating Scenario
• Consider a simplified supply chain process of a computer manufacturer– Most parts are multiple sourced (overseas and
internal suppliers)• Suppliers characterized as preferred or secondary• Overseas goods cheaper but greater lead times
– There often exist part compatibility constraints• Choosing a certain motherboard restricts choices of
RAMs, processors
– Usually important to maintain production schedule in the presence of delayed orders
Process Adaptation
• Ability to adapt the processes to external events– Expected events– Unexpected events
• Two kinds of failures– Failures of physical components like services, network
• Can replace services using dynamic configuration– Logical failures like violation of SLA
constraints/Agreements such as Delay in delivery, partial fulfillment of order
• Need additional decision making capabilities
Process Adaptation
Adaptation Problem
Optimally adapt to events like delays in ordered goods
Conceptual Approach
1. Maintain states of the process – normal states, error states, goal states
2. Capture costs while transitioning from error states to goal state
3. Ability to decide optimal actions on the basis of state
Process Adaptation• Research Challenges
– Creating a model to recover from failures and handle external events
– Model must deal with two important factors • Uncertainty about when a failure occurs• Cost based recovery
• Scenario– After order for MB and RAM are placed, they may get delayed– The manufacturer may have severe costs if assembly is halted – It must evaluate whether it is cheaper to cancel/return and
reorder or take the penalty of delay– Caveat: possible that reordered goods may be delayed too
New Framework
• Introduce a framework within which to study process adaptation
• Two criteria– Cost-based optimality– Computational Efficiency
Decreasing OptimalityDecreasing Computational Efficiency
Centralized Adaptation
DecentralizedAdaptation
Hybrid approaches
High Level Architecture
METEOR-S MIDDLEWARE
Workflow Engine(IBM BPWS4J)
Web Services
Discovery
Constraint Analysis
Configuration Module
Adaptation Module
MDP
Deployed Web Process
Configuration/Invocation Request Message
Configuration/Invocation Response Message
Eve
nt fr
om s
ervi
ce
Service invocation
Process and
Service Managers
Entities
Process Manager (PM): Responsible for global process configuration
Service Manager (SM): Responsible for interaction of process with service
Configuration Module (CM):Discovery and constraint analysis
Adaptation Module (AM): Process adaptation from exceptions/events
Modeling Decision Making Process of Service Managers using MDPsEach Service Manager is controlled by a MDPSM = <S, A, PA, T, C, OC> , where
• S is the set of local states of the service manager.
• A is the set of actions of the service manager. The actions include invoking Web service operations and calling the configuration manager.
• PA : S → A is a function that gives the permissible actions of the service manager from a particular state.
• T : S × A × S → [0, 1] is the local Markovian transition function. The transition function gives the probability of ending in a state j by performing action a in state i.
• C : S × A → R is the function that gives the cost of performing an action from some state of the service manager.
• OC is the optimality criterion. We minimize the expected cost over a finite number of steps, N, also called the horizon.
Policy Computation• The optimal action at each state is represented using a
policy. • In order to compute the policy, a value is associated to
each state. – The value represents long term expected cost of performing
the optimal action from that state and is calculated the following dynamic programming equation.
n na PA( s )
pi ( s ) arg min Q ( s,a )
1
n na PA( s )
n ns'
V ( s ) min Q ( s,a )
Q ( s,a ) C( s,a ) T( s' | s,a )V ( s')
The policy pi : S × N → R is then computed as:
N is the number of steps to go and Gamma is the discount factorAlgorithm developed by Bellman in 57
Generating States using preconditions and effects
Operation: Order
Pre: Ordered = False
Post: Ordered = True
Operation: Cancel
Pre: Ordered = True & Received = false
Post: Canceled=True & Ordered = false
Operation: Return
Pre: Ordered = True & Received = True
Post :Returned = True & Ordered = false and
Received = false
Event: Delayed
Pre: Ordered = True & Received = false
Post: Delayed=True & Ordered = True
Event: Received
Pre: Ordered = True & Received = false
Post: Received = True
Actions
EventsChance Variables
Ordered
Received
Delayed
Cancelled
Returned
Generated State Transition Diagram
<OC R Del Rec
<OC R Del Rec
<OC R Del Rec
<OC R Del Rec
<OC R Del Rec
<OC R Del Rec
<OC R Del Rec
<OC R Del Rec
State No.
Values of Boolean variables
Explanation
1 Ordered
2 Ordered and Canceled
3 Ordered and Delayed
4 Ordered, Received and Returned
5 Ordered, Delayed and Cancelled
6 Ordered, Delayed, Received and Returned
7 Ordered, Delayed and Received
8 Ordered and Received
s2
s3
s6 s7
s8
s4
s5
W
W
WW
O
R
Rec
Del
Rec
C
O
C
R
OO
s1
Costs and Probabilities
• Costs of ordering taken from configuration module– From first two service sets
• Optimal supplier and alternate supplier
• Probability of delay and cost of returning and canceling taken from supplier policy– Can be represented using WS-Policy or WS-
Agreement
Supplier Policy– The supplier gives a probability of 55% for delivering the
goods on time.– The manufacturer can cancel or return goods at any
time based on the terms given below.• If the order is delayed because of the supplier, the order
can be cancelled with a 5% penalty to the manufacturer.• If the order has not been delayed, but it has not been
delivered yet, it can be cancelled with a penalty of 15% to the manufacturer.
• If the order has been received after a delay, it can be returned with a penalty of 10% to the manufacturer.
• If the order has been received without a delay, it can be returned with a penalty of 20% to the manufacturer.
Costs and Probabilities
Current State Action Next State Cost
<O CR Del Rec NOP <O CR Del Rec 0
<O CR Del Rec CANCEL <O CR Del Rec 150
<O CR Del Rec DEL <O C R Del Rec 0
<O CR Del Rec RECEIVE <O C R Del Rec 0
<O CR Del Rec ORDER <O CR Del Rec 100
<O C R Del Rec NOP <O C R Del Rec DelayCost = {200, 300, 400}
<O C R Del Rec CANCEL <O C R Del Rec 50
<O C R Del Rec RECEIVE <O C R Del Rec 0
<O CR Del Rec ORDER <O CR Del Rec 100
<O C R Del Rec ORDER <O CR Del Rec 100
<O C R Del Rec ORDER <O CR Del Rec 100
<O C R Del Rec CANCEL <O C R Del Rec 150
<O C R Del Rec NOP <O C R Del Rec 0
<O C R Del Rec RETURN <O CR Del Rec 200
<O C R Del Rec NOP <O C R Del Rec 0
s2
s3
s6 s7
s8
s4
s5
W
W
WW
O
R
Rec
Del
Rec
C
O
C
R
OO
0.45
0.35
0.85
s1
Handling Coordination Constraints• Since the RAM and Motherboard must be
compatible, the actions of service managers (SMs) must be coordinated
• For example, if MB delivery is delayed, and MB SM wants to cancel order and change supplier, the RAM SM must do the same
• Hence, coordination must be introduced in SM-MDPs
Centralized Approach• State space created by Cartesian
product of transition diagrams
• Joint actions from each state
• Transition probability created by multiplying states
• Costs created by adding cost per action from each state– Compatible actions given rewards– Incompatible actions given penalties
• Optimal but exponential with number of manager
Decentralized Approach
• Simple coordination mechanism
• If one service manager changes suppliers– All dependent managers
must change suppliers
• Low complexity but sub-optimal
Hybrid Approach• If the policy of some SM dictates it to change suppliers, the
following actions happen:– it sends a coordinate request to PM – PM gets the current cost of changing suppliers or current
optimal action by polling all SMs
• It takes the cheapest action (change supplier or continue)
• A bit like decentralized voting- will change suppliers if majority are delayed
• It mirrors performance of centralized approach and has complexity like the decentralized approach
Evaluating Process Adaptation• Evaluation with the help of the supply chain
scenario
• Two main parameters used for the evaluation– Probability of Delay – (probability that an item ordered
from a supplier will be delayed)– Penalty of Delay – (cost for the manufacturer for not
reacting to delay)
• Total process cost = $1000 and cost of changing suppliers (CS) =$200
Cost of Waiting = 200
900
1300
1700
2100
2500
0.1 0.2 0.3 0.4 0.5 0.6 0.7
Probability of delay
Ave
rag
e C
ost
M-MDP
Random
Hyb. MDP
MDP-CoM
Evaluating Adaptation
KEY
M-MDP: Centralized
Random: Random process (changes suppliers for 50% of delays)
Hyb. Com: Hybrid
MDP-Com: Decentralized
Evaluating Adaptation
Cost of Waiting = 300
900
1300
1700
2100
2500
0.1 0.2 0.3 0.4 0.5 0.6 0.7
Probability of delay
Ave
rag
e C
ost
M-MDP
Random
Hyb. MDP
MDP-CoM
Evaluating Adaptation
Cost of Waiting = 400
900
1300
1700
2100
2500
0.1 0.2 0.3 0.4 0.5 0.6 0.7
Probability of delay
Ave
rag
e C
ost
M-MDP
Random
Hyb. MDP
MDP-CoM
Observations
• Results– For Penalty = 200 (cost of CS = cost of delay), MDP always
waits
– For Penalty = 300, 400 (cost of CS < cost of delay), MDP changes at lower prob., waits at higher prob.
• Conclusions– Thus MDP makes intelligent decisions and outperforms random
adaptation that changes suppliers 50% of the time it is delayed
– Centralized MDP performs the best, followed by Hybrid MDP
Related work• Focus on correctness of changes to control flow structure
– Adept[1], Workflow inheritance [2], METEOR
• Use of ECA rules [3] to automatically make changes
• Change of service providers based on migration rules in E-Flow [4]
• We extend previous work in this area by using:– Cost based adaptation – Coordination Constraints across services
[1] M. Reichert and P. Dadam. Adeptflex-supporting dynamic changes of workflows without losing control. Journal of Intelligent Information Systems, 10(2):93–129, 1998[2] W. van der Aalst and T. Basten. Inheritance of workflows: an approach to tackling problems related to change. Theoretical Computer Science, 270(1-2):125–203, 2002.[3] R. Muller, U. Greiner, and E. Rahm. Agentwork: a workflow system supporting rule-based workflow adaptation. Journal of Data and Knowledge Engineering, 51(2):223–256, 2004.[4] Fabio Casati, Ski Ilnicki, Li-jie Jin, Vasudev Krishnamoorthy, Ming-Chien Shan: Adaptive and Dynamic Service Composition in eFlow. CAiSE 2000: 13-31
Conclusions and Future Work• Showed the utility of Markov Decision Processes for optimal
adaptation of Web processes– Adaptation is need to handle logical failures and events– Whether to adapt or not depends on the cost of the failure
• For this evaluation it was the cost of the delay
• In the real world things often go wrong or not as expected– Earlier processes were static or real time events were not available as
easily– Many researchers/industry vendors seeking to create adaptive
business process frameworks– This is one of the first works that provides cost based adaptation
• Future Work– Move towards autonomic Web processes