Title: Constrainedbased QoSAware Service Adaptation
1Constrained-based QoS-Aware Service Adaptation
The Service and Software Architectures,
Infrastructures and Engineering (SSAIE) Summer
School
- Kyriakos Kritikos
- Post-doc Researcher
- Politecnico di Milano
2Outline
- Polimis IS group research
- Introduction
- Background
- Constrained-based QoS-Aware Service Adaptation
(CQSA)
3IS Group Research (I)
- Main research on services
- Mapping KPIs on QoS and their assessment in
service-based processes - Expressing KPIs in terms of QoS
- Measuring and assessment of KPIs
- Automated service negotiation
- Expressing negotiation concepts (e.g.
capabilities, cost models, strategies) through
ontologies - Ontologies rules -gt reasoning
- Protocol discovery delegation 1
4IS Group Research (II)
- Main research on services
- Energy-aware design of service-based processes
- GPIs like energy efficiency and consumption
- Constrained-based Service Concretization
- First two research topics performed within S-Cube
- More information at
- http//home.dei.polimi.it/pernici/ws-research.html
5Introduction (I)
- Facts
- Services operate in highly dynamic environments
- Variable execution context
- Service should change its behavior
- Runtime conditions differ from presupposed design
time ones - Service should be able to execute
6Introduction (II)
- Requirement Self-Adaptation
- Services have to be
- Flexible timely-respond to changes in their
context or user preferences and context (design) - Adaptable detect or even predict system
failures, react on them and compensate for
deviations in functionality or quality
(self-healing mechanisms) - Our work focuses on quality aspect of service
adaptation
7Introduction (III)
- Quality-aware Service Adaptation
- Agreed Service Level (SL) in Service Level
Agreement (SLA) must be met - SL set of quality guarantees (QG) on quality
metrics - QG is monitored evaluated
- If QG is violated, then service must be adapted
by executing some actions - E.g. service renegotiation, SLA termination,
adding more resources to service, nothing
(penalty will be paid), reselection for composite
service
8Introduction (IV)
- Research has been focused on re-active service
adaptation - Faulty services are executed resulting in loss of
money and executing additional activities - Adaptation activities take time and reduce system
performance - Monitoring events may arrive too late
9Introduction (V)
- Solution -gt Pro-active service adaptation
- Predict service quality
- Pro-actively respond to predicted deviations
- Main advantage
- Predict deviation and react before it occurs
- Main disadvantage
- Prediction is not always accurate
- False positives
- Usually reduces system performance
10Introduction (VI)
- End-to-End Quality Provision and SLA Conformance
(WP-JRA-1.3 S-CUBE)
11Background
- Facts
- SOA is based on the SOA triangle
- Service registry implementations have failed
- Service Discovery Problems
- Syntactic approaches in WS registries (WSDL)
- No means to select among functionally equivalent
WSs
12Background 1st Problem (I)
- 1st Problem
- Textual or XML-based descriptions lead to
accuracy problems - E.g. User requests for a function add(X,Y)
adding two reals, while service provides the same
function that adds two integers - Registry will return this service description to
the user
13Introduction 1st Problem (II)
- Solution
- Use of ontologies that provide a
machine-understandable and unambiguous vocabulary
of terms - Conceptualize a specific application domain
- Map each service object (i.e. WSDL element) to an
ontology concept - Use Semantic Web techniques in registry to infer
the similarity or equivalence of two terms (user
and service WSDL files) - Increased accuracy in service discovery
14Introduction 2nd Problem (I)
- Solution to second problem
- QoS set of non-functional properties
- Each property either measured by QoS metrics or
is unmeasurable - QoS spec is a combination of constraints on these
QoS metrics and unmeasurable properties
15Introduction 2nd Problem (II)
- Solution to second problem
- QoS in WS description and discovery
- Apart from the functional, the QoS aspect of
services is described - QoS specifications (offers and demands) are
matched based on a matchmaking metric - The best service is selected based on user
weights on QoS metrics and unmeasurable properties
16Introduction 2nd Problem (III)
- Domain-independent QoS attributes
- Response time (M), execution time (M),
availability (M), reliability (M), data
encryption (U), reputation (M), price (U) - Domain-dependent QoS attributes
- Traffic Monitoring application domain Refresh
time (M), covered area (U), routes set (U),
detail level (U), accuracy (M), completeness (M),
validity (M), timeliness (M), coverage (M) - M-gtMeasurable, U-gtUnmeasurable
17Introduction 2nd Problem (IV)
18Introduction 2nd Problem (V)
- Matchmaking Example
- Offer 1
- Offer 2
- Demand
- Both offers respect the constraints of the demand
- Selection example
- User Weights
- Offer 1
- Offer 2
- Offer 2 is selected for the user
19Introduction CP (I)
- Constraint Programming (CP)
- Solves Constraint Satisfaction Problems (CSPs)
V,D,C, Vset of variables, Dset of
domains, Cset of constraints - Solution to CSP is an assignment of every v in V
from the domain of v that does not violate any of
the constraints of C - Solution space of CSP is the set of all possible
solutions.
20Introduction CP (II)
- A CSP is satisfiable if its solution space is not
empty - E.g. CSP (x,y,0..2,0..2,xlty,xgt0) is
satisfiable as it contains the sole solution
x-gt1,y-gt2. - When an objective function over V is used to find
the solution that minimizes its expression, then
the CSP is actually a Constraint Satisfaction
Optimization Problem (CSOP)
21Introduction CP (III)
- Advantages
- non-linear constraints
- logical combination of constraints
- small domain integer variables
- close representation to physical problem
- Disadvantages
- use of real variables under research
- solving time increases with increase of domain of
variables - CP solvers do no deal well with optimization
problems and do not propagate well with
disjunctive constraints
22Constrained-Based QoS-aware Service Discovery
(CQSD)
- Main Approach followed
- Service providers and requesters express their
QoS spec in a common language - These QoS specifications are transformed to
different constraint descriptions - These constraint descriptions are matched based
on a specific matchmaking metric - QoS offers are categorized into two categories
fail and match - QoS offers are ranked based on selection algorithm
23Constrained-based QoS-aware Service Matchmaking
(CQSM)
- Matchmaking efforts fail
- Face accuracy problems
- Do not use correct matchmaking metrics
- Do not offer advanced categorization of results
- Offer valueless results for over-constrained
demands
24Incorrect Matchmaking Metrics (I)
- Matching (Degwekar et. al. 2004)
- Conformance (Cortes et. al. 2005)
O1
Better solutions
D
O2
O3
O4
25Incorrect Matchmaking Metrics (II)
- Example
- Two offers O1 and O2 and one demand D
- X measures Availability (positively monotonic)
and has value type (0.0,1.0) - Offer O1 has 0.9ltXlt0.96, Offer O2 has
0.96ltXlt0.9999 and demand D has 0.95ltXlt0.999.
- Matching metric Both offers match the demand
- Conformance metric None of the offers match the
demand - Reality Offer O2 should match with the demand D
26Advanced Categorization of Results (I)
- Matchmaking algorithms return only two types of
results - What happens when only fail results exist?
- Ideal there must be 4 cases
- Case 1 Super demands space is subspace or
lower than offers space - Case 2 Match offers space is subspace of
demands space - Case 3 Partial demands and offers spaces
intersect - Case 4 Fail demands and offers spaces do not
intersect and demand space is higher
27Advanced Categorization of Results (II)
- super, match, and partial results are useful for
service discovery and negotiation - partial results are also useful for optimization
i.e relaxing user constraints when super and
match results are not present - fail results are not useful at all!
28Advanced Categorization of Results (III)
Better solutions
Super O1
D
Exact O2
Partial O3
Fail O4
29Solution Matchmaking Metric (I)
- Conditional conformance an offer O matches a
demand D when its CSP PO has solutions that are
either contained in the solution space of the CSP
PD of the demand or are better than the demands
solutions. - Prefer better solutions only for insensitive
metrics
30Solution Matchmaking Metric (II)
- By analyzing conformance, we have
- sat(CSPO ? ?CSPD) false?
- sat(CSPO ? ?(con1D ? con2D ? ? conmD) false?
- sat(CSPO ? (?con1D ? ?con2D ? ? ?conmD)
false? - sat((CSPO ? ?con1D) ? (CSPO ? ?con2D) ? ? (CSPO
? ?conmD)) false? - sat(CSPO ? ?con1D) sat(CSPO ? ?con2D)
sat(CSPO ? ?conmD) false - So if demand D has m constraints, then we have to
solve m CSPs - If all CSPs are unsatisfiable, then offer O is
conformant to demand D - Trick take only into account the interesting
constraints of insensitive metrics only
31Solution Matchmaking Metric (III)
- Sensitive metric
- both low and upper bounds are interesting, they
matter the user - E.g. response time
- Insensitive metric
- Only low quality values matter the user
- Only low or upper bounds are interesting, for
posit. mon. or neg. mon. metrics, respectively - E.g. for availability only the low bound is
interesting
32Solution Matchmaking Metric (IV)
- Example
- Offer 0.96ltAvaillt0.9999
- Demand 0.95ltAvaillt0.999
- There is a match because we do not take into
account the upper bound for availability
33Solution CQSM
- Developed CP and LP algorithms of conditional
conformance metric - Still no advanced categorization of results,
optimization - Proposed two new algorithms unary and
optimization one - Unary 2 (wrt. the constraints of the demand) is
like exhaustive algorithms - Optimization 2 is quicker but has precision
problems
34Unary Algorithm (I)
- Composed of 2 steps
- matchmaking
- cons. relaxation
- Metrics are associated with weights
- Matchmaking step
- Solve all possible CSPs of an offer and demand
- If all interesting CSPs are inconsistent then
- If a non-interesting CSP is inconsistent, the
offer is super match - Otherwise, it is an exact match
35Unary algorithm (II)
- Matchmaking step (cont.)
- If some interesting CSPs are consistent then
offer is a partial match, weight counter updated - If all are consistent, then offer is a fail match
- Constraint relaxation step
- it is executed, if no super or exact matches
exist - All results are sorted (decreasing) according to
weight counter and the best ones promoted
36Unary Algorithm (III)
- Example
- Assume alignment process produces four CSPs
having the following definitions - X1 (0.0,86400.0, X2 (0,100000, X3
(0.0,1.0) - CSP1 X1 ? 10.0, X2 ? 100, X2 ? 50, X3 ? 0.9
- CSP2 X1/60 ? 0.08, X2 ? 50, X2 ? 40, X3 ? 0.95
- CSP3 X1/60 ? 0.06, X2 ? 40, X2 ? 30, 100?X3 ? 98
- CSPD X1 ? 15.0, X2 ? 40, 100?X3 ? 99
- X1 measures response time
- X2 measures throughput
- X3 measures availability
37Unary Algorithm (IV)
- Example (cont.)
- Matchmaking step checks satisfiability of 9 CSPs
and produces 4 lists SuperExactFailed,
Partial (O1,CSP1,1,10.0,100?X3 ? 99),
(O2,CSP2,1,10.0,100?X3 ? 99), (O3,CSP3,2,20.0,X2
? 40,100?X3 ? 99) - Constraint relaxation process sorts the partial
list and produces 2 lists Exact(O1,CSP1),
(O2,CSP2), X3, Partial (O3,CSP3, X2,,X3)
38CP-based Matchmaking (I)
- It is better than LP when
- There are non-linear expressions in constraints
- Non-linearity usefulness
- Express dependencies between quality metrics
- E.g. availability is inverse proportional to
response time - Express cost functions
- E.g.
39CP-based matchmaking (II)
- Examined Dynamic CP
- Chose re-active and more specifically reasoning
reuse approaches - Concluded explanation-based CP (eCP) is the best
- Implemented eCP versions 3 of conditional
conformance and unary algorithm with Choco
40(No Transcript)
41CQSA Background (I)
- In literature, service quality is established in
SLA - SLA-gtoutcome of service negotiation executed
after service discovery - SLA comprises of constraints on metrics measuring
quality attributes (i.e SLOs)
42CQSA Background (II)
- In 4, eCP is used to find inconsistencies in
SLA definition and the set of conflicting
constraints - By adopting the constraint approach, SLA
violation detection is easy - If coupled with monitoring
- Same goes for prediction of SLA violations
43CQSA Background (III)
- However, in literature there are two main
problems regarding service monitoring and quality
prediction - Single values are monitored predicted
- Confidence in prediction is low
- Monitored values are not always accurate
- Quality attributes are supposed to be independent
of each other - Wrong! Values on some attributes depend on each
other (e.g. response time availability)
44CQSA Proposed Approach (I)
- Use range constraints for predictions of quality
metrics - Confidence level will be higher than equality
constraints (weight) - Express dependencies between quality attributes
with constraints - Both quantitative and qualitative dependencies
can be modeled in this way - Qualitative can be characterized by a stochastic
quantitative model (e.g. function derived from
empirical data using regression)
45CQSA Proposed Approach (II)
- The set of dependency constraints D can be used
for validating correctness of monitoring or
prediction - By solving a CSP constructed from D
predicted/monitored range of values - The previous set plus another set of (probably
unary) constraints U constitute the service SLA
(UD)
46CQSA Proposed Approach (III)
- The whole set of constraints (UD) composes the
initial state of the service - Each prediction (executed in specific time
frequency) is a possible state of the system - Each predicted state is compared with the initial
one - So quality-based service matchmaking technique is
reused here - Initial state -gt Demand CSP
- Predicted states -gt Offer CSPs
47CQSA Proposed Approach (IV)
Initial State
Predicted State 1
Predicted State N
RTlt5 AVgt0.99 RTf(AV)
RTlt6 AVgt0.98
RTlt4 AVgt0.99
........
Dep. State
Mon. State N
Mon. State 1
THf(RT) RTf(AV)
5ltRTclt6
6ltRTlt7
48CQSA Proposed Approach (V)
- How do we detect a violation?
- For each quality metric
- If both its range constraints violate initial
service state - If confidence level gt threshold then sure
violation case - Else possible violation case
- If one range constraint violates initial service
state - If confidence level gt threshold then maybe
violation case - Else unlikely violation case
49CQSA Proposed Approach (VI)
- Adaptation strategy depends on number of
different types of cases (and their combination) - E.g. If one ore more sure violation cases
detected, then either the service gets more
system resources or service provider renegotiates
with requester to relax appropriate SLA
constraints - E.g. If only unlikely violation cases detected,
then time frequency of prediction increases and
the services system is warned
50CQSA - Architecture
Prediction Engine
Adaptation Engine
Execution Log
Assessment
Monitor
Execution Engine
51CQSA Discussion
- Initial approach
- Prediction technique should be chosen
- Define language describing adaptation policies
corresponding actions - Extend approach to SBAs/composite services
52References (I)
- Degwekar et. al. 2004
- S. Degwekar, S. Y. W. Su, and H. Lam, Constraint
specification and processing in web services
publication and discovery, in ICWS 04. San
Diego, CA, USA IEEE Computer Society, 2004, pp.
210217. - Cortes et. al. 2005
- A. R. Cortes, O. Martin-Diaz, A. D. Toro, and
M. Toro, Improving the automatic procurement of
web services using constraint programming, Int.
J. Cooperative Inf. Syst., vol. 14, no. 4, pp.
439468, 2005.
53References (II)
- 1
- M. Comuzzi, K. Kritikos, and P. Plebani, A
semantic based framework for supporting
negotiation in Service Oriented Architectures,
in IEEE CEC 2009. Vienna, Austria IEEE Computer
Society, 2009. - 2
- K. Kritikos and D. Plexousakis, Evaluation of
qos-based web service discovery algorithms, in
IEEE Transactions on Services Computing, 2009.
54References (III)
- 3
- K. Kritikos, QoS-based web service description
and discovery, Computer Science Department,
University of Crete, Heraklion, Greece, PhD
Thesis, December 2008. - 4
- C. Muller, A. Ruiz-Cortes, and Manuel Resinas,An
Initial Approach to Explaining SLA
Inconsistencies, in ICSOC 2008. Sydney,
Australia Springer, 2008.