PowerPoint Presentation - Politecnico di Milano by ewghwehws

VIEWS: 224 PAGES: 21

									           Politecnico di Milano
     Dipartimento di Elettronica e Informazione




   Service Replacement
by Behavior: Service Mosaic

           Federico M. Facca
          facca@elet.polimi.it
Agenda
 Service Interoperability Issues
 The Service Mosaic Approach
  – Protocol Models
  – Protocol Algebra Operators
  – Analysis of Protocols
     • Protocol Compatibility
     • Protocol Replaceability
  – MDD of Protocol Adapters
  – Types of Mismatches
 A comparison with the WSMO approach
  – Process Mediation Example
 References
Service Interoperability Issues
 Messaging
  – support for different protocols (SOAP, REST)
 Basic coordination
  – requirements and properties of exchanged messages
    (WS-Transactions)
 Protocols
  – transferring messages among services showing
    different behaviors
 Policies and non functional properties
  – additional aspects that define compatibility of services
The Service Mosaic Approach
 Conceptual Protocol Modeling
  – formal definition of protocols to enable automated
    analysis and manipulation
 Algebra for Protocols
  – a set of predefined operators to query, analyze and
    manipulate protocol models
 Model-driven development of Protocol adapters
  – use of the protocol model and its algebra to semi
    automatically define adapters for mismatching
    protocols
Protocol Models
 Service protocols can be efficiently
  modeled using finite state
  machines
 States represent different phases
  that a service may go through
  during its execution
 Transitions are triggered by input
  (+) or output (-) messages
 Messages corresponds to the
  invocation of a service operation or
  to its reply.
Protocol Algebra Operators
 Compatible Composition
   – returns a protocol that describes the set of possible interactions
     between the two input protocols
 Intersection
   – returns a protocol that describes the set of complete interactions
     common between the two input protocols
 Difference
   – returns a protocol that describes the set of all complete
     interactions of P1 not common with P2
 Projection
   – a projection of P on the protocol P1 is a protocol obtained from P
     by projecting the states of P on P1 and defining the polarity
     function of the messages
Analysis of Protocols
 Compatibility
  – can service A and service B interoperate?
 Replaceability
  – can service A be used in place of service B?
 Consistency
  – is implementation of service A consistent with its
    protocol definition?
  – can be reduced to replaceability (protocol
    equivalence)
Protocol Compatibility
 Full Compatibility
  – P1 is fully compatible with P2 if P2 can understand
    every conversation originated by P1
  – i.e., Projection(CompatibleComposition(P1,P2),P1)=P1
Protocol Compatibility
 Partial Compatibility
   – P3 is partially compatible with P4 if exists a possible
     conversation between P3 and P4
   – i.e., CompatibleComposition(P3,P4)  




                                                  ERROR!
Protocol Replaceability
 Protocol Equivalence
  – P7 is equivalent to P8 if they support the same set of
    conversations
  – P7=P8
Protocol Replaceability
 Protocol Subsumption
  – P9 is subsumed by P10 if P9 supports at least all the
    conversations that P10 supports
  – Intersection(P9,P10)=P10
Protocol Replaceability
 Replaceability within respect to a client
   – Px can replace Py in a conversation with Pc if valid
     conversation between Pc and Py are valid also
     between Pc and Px
 Replaceability within respect to a role
   – Px can replace Py with respect to Pr if Px behave like
     Py when Px behave like Pr
   – i.e., Py support all conversation supported by Px and
     Py do not support all conversation not supported by Px
MDD of Protocol Adapters
 Interaction among services not fully compatible
  or equivalent requires for adaptations
 An adapter maps the interaction of a provided
  protocol with the client protocol
 Possible mismatches may be categorized into
  patterns so as to reduce the cost of adapters
  development
 For each mismatch pattern a template is
  provided
Types of Mismatches
 Solvable mismatches                           Unsolvable mismatches

           A         PM
Business                            Business
Partner1   B                  B     Partner2

           A         PM       B                                      PM   A
Business                            Business    Business         ?            Business
Partner1   B                  A     Partner2    Partner1                      Partner2

                     PM       A                            A         PM   B
Business   A and B                  Business    Business         ?            Business
Partner1                      B     Partner2    Partner1   B              A   Partner2

           A         PM                                     A        PM
Business                  A and B   Business    Business                      Business
           B                                               Ack   ?
Partner1                            Partner2    Partner1                      Partner2

           A         PM      A
Business                            Business
Partner1   AckA                     Partner2
A comparison with the WSMO approach
 In WSMO service behavior is described by ASMs (not so
  different from FSMs)
   – a state in ASMs is not simply a label like in FSMs, it may be a
     more complex data structure
 Replaceability and Compability is not only at protocol
  level
   – two services with the same protocol may provide different effects
 Adapters needed only to lift/lower XML messages
  to/from the conceptual level
 ASMs Choreography are enough to solve many protocol
  mismatches
   – no need for developing ad hoc protocol adapter for each new
     service deployed
   – runtime adaptation vs design time adaptation
Process Mediation Example

                       Processes Mediator         origin
  itinerary[origin,                                                S
R                                               destination
  destination, date]                                               E
E
                                               itinerary[origin,   R
Q
      time                                     destination]        V
U
                                                                   I
E
                                                    date           C
S     price
                                            itinerary [route,      E
T
                                            date, time, price]
Process Mediation Example

                       Processes Mediator         origin
  itinerary[origin,                                                S
R                                               destination
  destination, date]                                               E
E
                                               itinerary[origin,   R
Q
      time                                     destination]        V
U
                                                                   I
E
                                                    date           C
S     price
                                            itinerary [route,      E
T
                                            date, time, price]
Process Mediation Example

                       Processes Mediator         origin
  itinerary[origin,                                                S
R                                               destination
  destination, date]                                               E
E
                                               itinerary[origin,   R
Q
      time                                     destination]        V
U
                                                                   I
E
                                                    date           C
S     price
                                            itinerary [route,      E
T
                                            date, time, price]
Process Mediation Example

                       Processes Mediator         origin
  itinerary[origin,                                                S
R                                               destination
  destination, date]                                               E
E
                                               itinerary[origin,   R
Q
      time                                     destination]        V
U
                                                                   I
E
                                                    date           C
S     price
                                            itinerary [route,      E
T
                                            date, time, price]
Process Mediation Example

                       Processes Mediator         origin
  itinerary[origin,                                                S
R                                               destination
  destination, date]                                               E
E
                                               itinerary[origin,   R
Q
      time                                     destination]        V
U
                                                                   I
E
                                                    date           C
S     price
                                            itinerary [route,      E
T
                                            date, time, price]
References
 Boualem Benatallah, Fabio Casati, Farouk
  Toumani, Julien Ponge, Hamid Reza Motahari
  Nezhad: Service Mosaic: A Model-Driven
  Framework for Web Services Life-Cycle
  Management
 Boualem Benatallah, Fabio Casati,
  Farouk Toumani: Analysis and Management of
  Web Service Protocols
 Emilia Cimpian, Adrian Mocan: WSMX Process
  Mediation Based on Choreographies

								
To top