Behavioral Contracts and Service Substitutability: A Contribution - - PowerPoint PPT Presentation

behavioral contracts and service substitutability
SMART_READER_LITE
LIVE PREVIEW

Behavioral Contracts and Service Substitutability: A Contribution - - PowerPoint PPT Presentation

1 Behavioral Contracts and Service Substitutability: A Contribution to Dependable SOA Haldor Samset and Rolv Brk, Norwegian University of Science and Technology NTNU, Department of Telematics NTNU, June 2008 Dependable SOA 2 What is


slide-1
SLIDE 1

1

Dependable SOA

Behavioral Contracts and Service Substitutability:

A Contribution to Dependable SOA

Haldor Samset and Rolv Bræk, Norwegian University of Science and Technology – NTNU, Department of Telematics NTNU, June 2008

slide-2
SLIDE 2

2

Dependable SOA

What is a service?

A service is: an identified functionality aiming to establish some goals/effects among collaborating entities.

Captures:

  • end user services
  • active services
  • passive services
  • component interfaces

(Web Services, CORBA, JINI, …)

  • layered functionality (ISO OSI)

Layer n-1 Layer n

C1 C2 Cn

slide-3
SLIDE 3

3

Dependable SOA

Service fundamentals:

  • Service is functionality; it is behavior performed

by entities.

  • Service imply collaboration; it makes no sense to

talk about service unless at least two entities collaborate.

  • Service behavior is cross-cutting; it imply

coordination of two or more entity behaviors

  • Service behavior is partial; it is to be composed

with other services

slide-4
SLIDE 4

4

Dependable SOA

Service modeling using UML 2 collaborations

  • Matches the concept of service: Collaborative; Cross-

cutting; Partial; Functionality

  • Can model services separately in terms of role structures

and behaviours

  • Allows flexibility in binding roles to classes
  • Require conformance between roles and classes
  • Can model interfaces and contracts as two-party

collaborations

Actor1 Actor2 Actor3 Actor4 Actor5 Actor1 Actor2 Actor3 Actor4 Actor5 Service 3 Service 3 Service 2 Service 2 Service 1 Service 1

Horizontal composition (within a service) Vertical composition (within an actor)

r2 r3 r1

service 2 service 1

slide-5
SLIDE 5

5

Dependable SOA

Collaboration as behavior contract: example

slide-6
SLIDE 6

6

Dependable SOA

Collaboration as behavior contract:

  • Two connected roles with

– Static interfaces – Interface behaviors

  • Connector properties

– Asynchronous or synchronous – Bidirectional or unidirectional

  • Modelchecked to ensure

compatibility between roles

  • Publishable using WSDL
slide-7
SLIDE 7

7

Dependable SOA

Using contract roles to type interfaces

  • Compatibility of contract roles modelchecked at design time
  • Conformance with contract checked for each interface at

design time

  • Simple compatibility assurance at runtime

Sq:StockQuote

Application Stock Info Server <<Requests>> <<Provides>>

Sq:StockQuote

requestor provider

slide-8
SLIDE 8

8

Dependable SOA

Conformance with contract

1. Project component behavior to interface behavior 2. Compare interface behavior with contract role behavior: are they equivalent or substitutable?

Application Stock Info Server Project Project Compare Compare <<Requests>> <<Provides>>

slide-9
SLIDE 9

9

Dependable SOA

An extended contract

slide-10
SLIDE 10

10

Dependable SOA

With additional behavior

Sq:StockQuote Sq:StockQuoteandNews

slide-11
SLIDE 11

11

Dependable SOA

Safe substitution: equivalent reachable behavior

Sq:StockQuote Sq:StockQuoteandNews

<<Substitutes>>

slide-12
SLIDE 12

12

Dependable SOA

Safe substitution

  • Verified once at design time
  • Simple checks at run time
slide-13
SLIDE 13

13

Dependable SOA

Summing up

  • Contracts are modelchecked collaborations
  • Conformance ensured by

projection and role comparison

  • Run-time efficient

compatibility assurance

  • For active and

passive services

  • A basis for

meaningful lookup

Registry