formal modelling of service-oriented...

174
Abreu&Bocchi&Fiadeiro&Lopes2010 Formal Modelling of Service-Oriented Systems José Fiadeiro Laura Bocchi, João Abreu Antónia Lopes Friday, 9 July 2010

Upload: truongminh

Post on 28-Jan-2019

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Formal Modelling of Service-Oriented Systems

José FiadeiroLaura Bocchi, João Abreu

Antónia Lopes

Friday, 9 July 2010

Page 2: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Formal Modelling of Service-Oriented Systems

José FiadeiroLaura Bocchi, João Abreu

Antónia Lopes

Adresse LeicesterRoyaume Uni

Friday, 9 July 2010

Page 3: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

aims of this talk

Friday, 9 July 2010

Page 4: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

to provide you with an overview of a formal approach to service-oriented modelling that we started developing in the SENSORIA project

a ‘prototype’ modelling language — SRML

(part of) its semantics

methodological aspects of an engineering approach to service-oriented systems

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

aims of this talk

Friday, 9 July 2010

Page 5: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

to provide you with an overview of a formal approach to service-oriented modelling that we started developing in the SENSORIA project

a ‘prototype’ modelling language — SRML

(part of) its semantics

methodological aspects of an engineering approach to service-oriented systems

a companion paper is available from:www.cs.le.ac.uk/people/jfiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

aims of this talk

Friday, 9 July 2010

Page 6: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

plan of this talk

Friday, 9 July 2010

Page 7: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

plan of this talk

Setting the scenethe context — SENSORIA

what we mean by ‘service’what we mean by ‘modelling’

Friday, 9 July 2010

Page 8: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

plan of this talk

Setting the scenethe context — SENSORIA

what we mean by ‘service’what we mean by ‘modelling’

Engineering service-oriented systemswhy (we think that) it is not the same as for component-based systems

social complexity

service consumers (activities) vs service providersstatic vs dynamic aspects

Friday, 9 July 2010

Page 9: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

plan of this tutorial

Friday, 9 July 2010

Page 10: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

plan of this tutorial

SRMLUse Cases for SOC

A language and model of interactions for SOCOrchestration

‘Provides’ and ‘Requires’ interfaces

Connectors and interaction protocolsInternal configuration policies

External configuration policies — SLA’s

Friday, 9 July 2010

Page 11: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

plan of this tutorial

SRMLUse Cases for SOC

A language and model of interactions for SOCOrchestration

‘Provides’ and ‘Requires’ interfaces

Connectors and interaction protocolsInternal configuration policies

External configuration policies — SLA’s

Semantics of service discovery and binding

Friday, 9 July 2010

Page 12: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

more precisely…

An IST-FET Integrated Project Sept05–Feb10 

Software Engineering for

Service-Oriented Overlay Computers

The aim of SENSORIA is to develop a novel comprehensive approach to the engineering of software systems for service-oriented overlay computers where foundational theories, techniques and methods are fully integrated in a pragmatic software engineering approach.

Friday, 9 July 2010

Page 13: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

even more precisely…

An IST-FET Integrated Project Sept05–Feb10 

Software Engineering for

Service-Oriented Overlay Computers

WP1 Provide support for service-oriented modelling at high levels of abstraction, i.e. independently of the hosting middleware and hardware platforms, and the languages in which services are programmed.

T1.1+2 Develop a prototype language for service description and compositionincluding syntax and mathematical semantics.

Friday, 9 July 2010

Page 14: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

even more precisely…

An IST-FET Integrated Project Sept05–Feb10 

Software Engineering for

Service-Oriented Overlay Computers

WP1 Provide support for service-oriented modelling at high levels of abstraction, i.e. independently of the hosting middleware and hardware platforms, and the languages in which services are programmed.

T1.1+2 Develop a prototype language for service description and compositionincluding syntax and mathematical semantics.

…and this should be done

elegantly!

Friday, 9 July 2010

Page 15: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

social complexity

Friday, 9 July 2010

Page 16: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

social complexity

The major source of complexity in modern software-intensive systems is ‘social’:

Friday, 9 July 2010

Page 17: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

social complexity

The major source of complexity in modern software-intensive systems is ‘social’:

Systems are not necessarily ‘big chunks of software’…… but they may exhibit complex and dynamic/evolving interactions among possibly huge numbers of parties

‘software crisis’ of the 80’s

and 90‘s

Friday, 9 July 2010

Page 18: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

social complexity

The major source of complexity in modern software-intensive systems is ‘social’:

Systems are not necessarily ‘big chunks of software’…… but they may exhibit complex and dynamic/evolving interactions among possibly huge numbers of parties

‘software crisis’ of the 80’s

and 90‘s

structured concurrent programming…

Friday, 9 July 2010

Page 19: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

social complexity

The major source of complexity in modern software-intensive systems is ‘social’:

Systems are not necessarily ‘big chunks of software’…… but they may exhibit complex and dynamic/evolving interactions among possibly huge numbers of parties

‘software crisis’ of the 80’s

and 90‘s

structured concurrent programming…

coordination:externalising interactions

Friday, 9 July 2010

Page 20: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

social complexity

The major source of complexity in modern software-intensive systems is ‘social’:

Systems are not necessarily ‘big chunks of software’…… but they may exhibit complex and dynamic/evolving interactions among possibly huge numbers of partiesThe major concern is in having representations of the ‘business’ roles that parties play within a system…… and in having the means for procuring and interconnecting the parties required to execute a given business process, only when they are required (not so much in developing the parties themselves)

‘software crisis’ of the 80’s

and 90‘s

Friday, 9 July 2010

Page 21: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

engineering/programming in SOC

Friday, 9 July 2010

Page 22: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

engineering/programming in SOC

Stakeholdersservice providers

do not develop ‘bespoke’ software to user’s requirementsneed to offer services that correspond to ‘market’ demands

service consumersare applications, not peopleare decoupled from the providersbind to services at run time, not design time

service brokersmanage registriesbinds consumer and provideroffered as middleware in SOAs

Friday, 9 July 2010

Page 23: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

!

Current business configuration

(activities and their types)

Activity

A_Lau

Activity

A_Ant

Triggers

Reconfiguration

Discovery and selection Invocation

Business

IT teams

Service

providers

Publication Application

development

Ontology (including hierarchies of business protocols)

!

Service repository

Configuration Management

"

"!

Activity repository

Brokers – SOA

engineering architecture

Friday, 9 July 2010

Page 24: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

!

Current business configuration

(activities and their types)

Activity

A_Lau

Activity

A_Ant

Triggers

Reconfiguration

Discovery and selection Invocation

Business

IT teams

Service

providers

Publication Application

development

Ontology (including hierarchies of business protocols)

!

Service repository

Configuration Management

"

"!

Activity repository

Brokers – SOA

Activities are developed to meet requirements of

specific business organisations

engineering architecture

Friday, 9 July 2010

Page 25: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

!

Current business configuration

(activities and their types)

Activity

A_Lau

Activity

A_Ant

Triggers

Reconfiguration

Discovery and selection Invocation

Business

IT teams

Service

providers

Publication Application

development

Ontology (including hierarchies of business protocols)

!

Service repository

Configuration Management

"

"!

Activity repository

Brokers – SOA

Activities are developed to meet requirements of

specific business organisations

engineering architecture

Friday, 9 July 2010

Page 26: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

!

Current business configuration

(activities and their types)

Activity

A_Lau

Activity

A_Ant

Triggers

Reconfiguration

Discovery and selection Invocation

Business

IT teams

Service

providers

Publication Application

development

Ontology (including hierarchies of business protocols)

!

Service repository

Configuration Management

"

"!

Activity repository

Brokers – SOA

Services are developed to be published and discovered at run time

engineering architecture

Friday, 9 July 2010

Page 27: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

!

Current business configuration

(activities and their types)

Activity

A_Lau

Activity

A_Ant

Triggers

Reconfiguration

Discovery and selection Invocation

Business

IT teams

Service

providers

Publication Application

development

Ontology (including hierarchies of business protocols)

!

Service repository

Configuration Management

"

"!

Activity repository

Brokers – SOA

Services are developed to be published and discovered at run time

engineering architecture

Friday, 9 July 2010

Page 28: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

!

Current business configuration

(activities and their types)

Activity

A_Lau

Activity

A_Ant

Triggers

Reconfiguration

Discovery and selection Invocation

Business

IT teams

Service

providers

Publication Application

development

Ontology (including hierarchies of business protocols)

!

Service repository

Configuration Management

"

"!

Activity repository

Brokers – SOA

!"

Compatibility

Consistency

engineering architecture

Friday, 9 July 2010

Page 29: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

!

Current business configuration

(activities and their types)

Activity

A_Lau

Activity

A_Ant

Triggers

Reconfiguration

Discovery and selection Invocation

Business

IT teams

Service

providers

Publication Application

development

Ontology (including hierarchies of business protocols)

!

Service repository

Configuration Management

"

"!

Activity repository

Brokers – SOA

!"

Compatibility

Consistency

Brokers are part of the SOA middleware and, as such, are not

modelled by system designers

engineering architecture

Friday, 9 July 2010

Page 30: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

modelling

Friday, 9 July 2010

Page 31: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

modelling

different from programmingcloser to the business domain (addresses the business logic and reflects business roles)

not necessarily executablevalidation and verification independent of the implementation

Friday, 9 July 2010

Page 32: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

modelling

different from programmingcloser to the business domain (addresses the business logic and reflects business roles)

not necessarily executablevalidation and verification independent of the implementation

level of abstractionbuilds over the facilities offered by a SOA — brokers, session handling and message correlation mechanisms, …

Friday, 9 July 2010

Page 33: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

modelling

Friday, 9 July 2010

Page 34: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

modelling

static aspects:How can we account for the behaviour of services provided by collections of interconnected parties? — orchestration, conversation protocols (pledges, compensations, …)

dynamic aspects:How can we account for the run-time aspects of service-oriented systems that result from the SOA middleware mechanisms of service discovery, instantiation and binding?

Friday, 9 July 2010

Page 35: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Service modules model (possibly composite) services that can be published. Their discovery is triggered by activities (consumers).

Friday, 9 July 2010

Page 36: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Component-interfaces: describe

a distributed orchestration

Wire-interfaces: interaction protocols

between parties

Friday, 9 July 2010

Page 37: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Provides-interface: a

description of the properties provided

to the requester

Component-interfaces: describe

a distributed orchestration

Wire-interfaces: interaction protocols

between parties

Friday, 9 July 2010

Page 38: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Provides-interface: a

description of the properties provided

to the requester

Uses-interfaces: statically bound to persistent

resources

Component-interfaces: describe

a distributed orchestration

Wire-interfaces: interaction protocols

between parties

Friday, 9 July 2010

Page 39: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Provides-interface: a

description of the properties provided

to the requester

Uses-interfaces: statically bound to persistent

resources

Component-interfaces: describe

a distributed orchestration Requires-

interfaces: specify

properties expected of dynamically

bound external services

Wire-interfaces: interaction protocols

between parties

Friday, 9 July 2010

Page 40: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Provides-interface: a

description of the properties provided

to the requester

Uses-interfaces: statically bound to persistent

resources

Component-interfaces: describe

a distributed orchestration Requires-

interfaces: specify

properties expected of dynamically

bound external services

Wire-interfaces: interaction protocols

between parties

Internal configuration policies: triggers

Friday, 9 July 2010

Page 41: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Provides-interface: a

description of the properties provided

to the requester

Uses-interfaces: statically bound to persistent

resources

Component-interfaces: describe

a distributed orchestration Requires-

interfaces: specify

properties expected of dynamically

bound external services

Wire-interfaces: interaction protocols

between parties

External configuration policies:

quality of service constraints

Internal configuration policies: triggers

Friday, 9 July 2010

Page 42: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SRML service modules

Does not include any middleware actor

Friday, 9 July 2010

Page 43: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction types

Friday, 9 July 2010

Page 44: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction types

r&s stateful, 2-way asynchronous

The interaction is initiated by the co-party, which expects a reply. The co-party does not block while waiting for the reply.

s&r stateful, 2-way asynchronous

The interaction is initiated by the party and expects a reply from its co-party. While waiting for the reply, the party does not block.

rcv one-way asynchronous The co-party initiates the interaction and does not expect a reply.

snd one-way asynchronous The party initiates the interaction and does not expect a reply.

ask synchronous The party synchronises with the co-party to obtain data.

rpl synchronous The party synchronises with the co-party to transmit data

tll synchronous The party requests the co-party to perform an operation and blocks.

prf synchronous The party performs an operation and frees the co-party that requested it.

Friday, 9 July 2010

Page 45: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction types

r&s stateful, 2-way asynchronous

The interaction is initiated by the co-party, which expects a reply. The co-party does not block while waiting for the reply.

s&r stateful, 2-way asynchronous

The interaction is initiated by the party and expects a reply from its co-party. While waiting for the reply, the party does not block.

rcv one-way asynchronous The co-party initiates the interaction and does not expect a reply.

snd one-way asynchronous The party initiates the interaction and does not expect a reply.

ask synchronous The party synchronises with the co-party to obtain data.

rpl synchronous The party synchronises with the co-party to transmit data

tll synchronous The party requests the co-party to perform an operation and blocks.

prf synchronous The party performs an operation and frees the co-party that requested it.

Friday, 9 July 2010

Page 46: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction types

r&s stateful, 2-way asynchronous

The interaction is initiated by the co-party, which expects a reply. The co-party does not block while waiting for the reply.

s&r stateful, 2-way asynchronous

The interaction is initiated by the party and expects a reply from its co-party. While waiting for the reply, the party does not block.

rcv one-way asynchronous The co-party initiates the interaction and does not expect a reply.

snd one-way asynchronous The party initiates the interaction and does not expect a reply.

ask synchronous The party synchronises with the co-party to obtain data.

rpl synchronous The party synchronises with the co-party to transmit data

tll synchronous The party requests the co-party to perform an operation and blocks.

prf synchronous The party performs an operation and frees the co-party that requested it.

Friday, 9 July 2010

Page 47: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction types

r&s stateful, 2-way asynchronous

The interaction is initiated by the co-party, which expects a reply. The co-party does not block while waiting for the reply.

s&r stateful, 2-way asynchronous

The interaction is initiated by the party and expects a reply from its co-party. While waiting for the reply, the party does not block.

rcv one-way asynchronous The co-party initiates the interaction and does not expect a reply.

snd one-way asynchronous The party initiates the interaction and does not expect a reply.

ask synchronous The party synchronises with the co-party to obtain data.

rpl synchronous The party synchronises with the co-party to transmit data

tll synchronous The party requests the co-party to perform an operation and blocks.

prf synchronous The party performs an operation and frees the co-party that requested it.

Friday, 9 July 2010

Page 48: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

events associated with an interaction a

! ! !

Friday, 9 July 2010

Page 49: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

events associated with an interaction aa: the event of initiating a

! ! !

Friday, 9 July 2010

Page 50: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

events associated with an interaction aa: the event of initiating a

a: the reply-event of a

! ! !

Friday, 9 July 2010

Page 51: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

events associated with an interaction aa: the event of initiating a

a: the reply-event of aa: the commit-event of a

! ! !

Friday, 9 July 2010

Page 52: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

events associated with an interaction aa: the event of initiating a

a: the reply-event of aa: the commit-event of aa✘: the cancel-event of a

! ! !

Friday, 9 July 2010

Page 53: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

events associated with an interaction aa: the event of initiating a

a: the reply-event of aa: the commit-event of aa✘: the cancel-event of aa: the revoke-event of a

! ! !

Friday, 9 July 2010

Page 54: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

events associated with an interaction aa: the event of initiating a

a: the reply-event of aa: the commit-event of aa✘: the cancel-event of aa: the revoke-event of a

! ! !

a: the pledge associated with a — a condition that is guaranteed to hold from the moment a positive reply-event occurs until either the commit-event, the cancel-event or the expiration time occurs.

a: the validity interval associated with the pledge

Friday, 9 July 2010

Page 55: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY YWIRE w

a computational model

Friday, 9 July 2010

Page 56: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY YWIRE w

a computational model

Friday, 9 July 2010

Page 57: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY Ya

WIRE w

a computational model

Friday, 9 July 2010

Page 58: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY Y

a

WIRE w

a computational model

Friday, 9 July 2010

Page 59: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY YaWIRE w

a computational model

Friday, 9 July 2010

Page 60: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY Y

a

WIRE w

a computational model

Friday, 9 July 2010

Page 61: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY Ya

WIRE w

a computational model

Friday, 9 July 2010

Page 62: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY Y

a

WIRE w

a computational model

Friday, 9 July 2010

Page 63: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Events occur in state transitions of both parties involved in the interaction

When a party publishes an event (event!), the event is transferred to the buffer of the wire that connects the party with the co-party.

The wire delivers the event to the co-party, which stores it for processing.

The co-party can either execute the event (event?) or discard it (event¿)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY YWIRE w

a computational model

Friday, 9 July 2010

Page 64: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY YWIRE w

a computational model

The occurrence of event! and event? may not coincide in time

!

Friday, 9 July 2010

Page 65: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

Example: Two-way interaction a from X to Y (connected by w)

Invoked Invoked

Pending

PARTY X PARTY YWIRE w

a computational model

The occurrence of event! and event? may not coincide in time

!

L. Bocchi, J. Fiadeiro, S. Gilmore, J. Abreu, M. Solanki, V. Vankayala (2009) A Formal Model for Timing Aspects of Service-Oriented Systems. Submitted.

Friday, 9 July 2010

Page 66: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

A computation state is a tuple <PND, INV, TIME, PLG> where:

PND — the set of events that are pending in each wire

INV — the set of events that are waiting (invoked) to be processed in each component

TIME — the instant of time at which the state is observed

PLG — the set of pledges that hold in that state

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

computation states

Friday, 9 July 2010

Page 67: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

A computation state is a tuple <PND, INV, TIME, PLG> where:

PND — the set of events that are pending in each wire

INV — the set of events that are waiting (invoked) to be processed in each component

TIME — the instant of time at which the state is observed

PLG — the set of pledges that hold in that state

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

computation states

A coordination model for service-oriented interactions.Abreu, Fiadeiro. CORDINATION 2008

Friday, 9 July 2010

Page 68: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

!

A computation step is a tuple <SRC, TRG, DLV, EXC, DSC, PUB> where:

SRC, TRG — source and the target

DLV — events that are delivered

EXC — events that are executed

DSC — events that are discarded

PUB — events that are published

furthermore

PRC = EXC + DSC — events that areprocessed

PNDTRG = (PNDSRC \ DLV ) U PUB

INVTRG = (INVSRC \ PRC) U DLV

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

computation steps

Friday, 9 July 2010

Page 69: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

the Languages of SRML

BusinessRoles

BusinessProtocols

InteractionProtocols

LayerProtocols

Interactions+

Orchestration

Interactions+

Behaviour

Interactions+

Behaviour

Interactions+

Coordination

Friday, 9 July 2010

Page 70: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

logi

cs o

f int

erac

tions

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

the Languages of SRML

BusinessRoles

BusinessProtocols

InteractionProtocols

LayerProtocols

Interactions+

Orchestration

Interactions+

Behaviour

Interactions+

Behaviour

Interactions+

Coordination

Friday, 9 July 2010

Page 71: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

signatures

Friday, 9 July 2010

Page 72: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

signaturesEach party defines a signature — the interactions in which it can be involved

Friday, 9 July 2010

Page 73: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

signatures

INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue r&s askProposal idData:usrdata,

income: moneyvalue,   proposal:mortgageproposal,

loanData:loandata,accountIncluded:bool,insuranceRequired:bool

... snd confirmation contract:loancontractask getLenders(prefdata):setidstll regContract(loandata,loancontract)

Each party defines a signature — the interactions in which it can be involved

For example, the signature of the business role MortgageAgent is defined as follows

Friday, 9 July 2010

Page 74: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

signatures

INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue r&s askProposal idData:usrdata,

income: moneyvalue,   proposal:mortgageproposal,

loanData:loandata,accountIncluded:bool,insuranceRequired:bool

... snd confirmation contract:loancontractask getLenders(prefdata):setidstll regContract(loandata,loancontract)

Each party defines a signature — the interactions in which it can be involved

For example, the signature of the business role MortgageAgent is defined as follows

stateful interaction type

interaction name

Friday, 9 July 2010

Page 75: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

signatures

INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue r&s askProposal idData:usrdata,

income: moneyvalue,   proposal:mortgageproposal,

loanData:loandata,accountIncluded:bool,insuranceRequired:bool

... snd confirmation contract:loancontractask getLenders(prefdata):setidstll regContract(loandata,loancontract)

Each party defines a signature — the interactions in which it can be involved

For example, the signature of the business role MortgageAgent is defined as follows

stateful interaction type

interaction name

event typesparameters (names and types) for each event type

}

Friday, 9 July 2010

Page 76: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

signatures

INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue r&s askProposal idData:usrdata,

income: moneyvalue,   proposal:mortgageproposal,

loanData:loandata,accountIncluded:bool,insuranceRequired:bool

... snd confirmation contract:loancontractask getLenders(prefdata):setidstll regContract(loandata,loancontract)

Each party defines a signature — the interactions in which it can be involved

For example, the signature of the business role MortgageAgent is defined as follows

stateful interaction type

interaction name

event typesparameters (names and types) for each event type

}

synchronous interaction type

parameters

Friday, 9 July 2010

Page 77: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

BUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles – local state

Friday, 9 July 2010

Page 78: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

BUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles – local state

state variables are used for storing data that may be needed for the orchestration

Friday, 9 July 2010

Page 79: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

BUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles – local state

state variables are used for storing data that may be needed for the orchestration

s is used for control flow (i.e. for encoding an internal state machine)

Friday, 9 July 2010

Page 80: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

BUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles – local state

state variables are used for storing data that may be needed for the orchestration

s is used for control flow (i.e. for encoding an internal state machine)

other variables may be used for storing data received during interactions

Friday, 9 July 2010

Page 81: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles: transitionsBUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

transition GetClientRequest

triggeredBy getProposal

guardedBy s=INITIAL

effects lenders’=getLenders(prefdata)

∧ ¬empty(lenders’) ⊃ s’=WAIT_PROPOSAL

∧ empty(lenders’) ⊃ s’=FINAL

sends ¬empty(lenders’) ⊃ askProposal

∧ askProposal.idData=getProposal.idData

∧ askProposal.income=getProposal.income

∧ empty(lenders’) ⊃ getProposal

∧ getProposal.Reply=false

Friday, 9 July 2010

Page 82: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles: transitionsBUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

transition GetClientRequest

triggeredBy getProposal

guardedBy s=INITIAL

effects lenders’=getLenders(prefdata)

∧ ¬empty(lenders’) ⊃ s’=WAIT_PROPOSAL

∧ empty(lenders’) ⊃ s’=FINAL

sends ¬empty(lenders’) ⊃ askProposal

∧ askProposal.idData=getProposal.idData

∧ askProposal.income=getProposal.income

∧ empty(lenders’) ⊃ getProposal

∧ getProposal.Reply=false

The orchestration is defined by a number of transitions

Friday, 9 July 2010

Page 83: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles: transitionsBUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

transition GetClientRequest

triggeredBy getProposal

guardedBy s=INITIAL

effects lenders’=getLenders(prefdata)

∧ ¬empty(lenders’) ⊃ s’=WAIT_PROPOSAL

∧ empty(lenders’) ⊃ s’=FINAL

sends ¬empty(lenders’) ⊃ askProposal

∧ askProposal.idData=getProposal.idData

∧ askProposal.income=getProposal.income

∧ empty(lenders’) ⊃ getProposal

∧ getProposal.Reply=false

The orchestration is defined by a number of transitions

A trigger is either an interaction event or a state condition

Friday, 9 July 2010

Page 84: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles: transitionsBUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

transition GetClientRequest

triggeredBy getProposal

guardedBy s=INITIAL

effects lenders’=getLenders(prefdata)

∧ ¬empty(lenders’) ⊃ s’=WAIT_PROPOSAL

∧ empty(lenders’) ⊃ s’=FINAL

sends ¬empty(lenders’) ⊃ askProposal

∧ askProposal.idData=getProposal.idData

∧ askProposal.income=getProposal.income

∧ empty(lenders’) ⊃ getProposal

∧ getProposal.Reply=false

The orchestration is defined by a number of transitions

A trigger is either an interaction event or a state condition

A guard identifies the states in which the transition can take place

Friday, 9 July 2010

Page 85: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles: transitionsBUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

transition GetClientRequest

triggeredBy getProposal

guardedBy s=INITIAL

effects lenders’=getLenders(prefdata)

∧ ¬empty(lenders’) ⊃ s’=WAIT_PROPOSAL

∧ empty(lenders’) ⊃ s’=FINAL

sends ¬empty(lenders’) ⊃ askProposal

∧ askProposal.idData=getProposal.idData

∧ askProposal.income=getProposal.income

∧ empty(lenders’) ⊃ getProposal

∧ getProposal.Reply=false

The orchestration is defined by a number of transitions

A trigger is either an interaction event or a state condition

Effects on the local state (lenders’ denotes the value of lenders after the transition)

A guard identifies the states in which the transition can take place

getLenders is a synchronous interaction. The returned value is stored in the variable lenders

Friday, 9 July 2010

Page 86: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business roles: transitionsBUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION local s:[INITIAL, WAIT_PROPOSAL, WAIT_DECISION,

PROPOSAL_ACCEPTED, SIGNING, FINAL], lenders:setidsneedAccount, needInsurance:boolinsuranceData:insurancedata, accountData:accountdata

transition GetClientRequest

triggeredBy getProposal

guardedBy s=INITIAL

effects lenders’=getLenders(prefdata)

∧ ¬empty(lenders’) ⊃ s’=WAIT_PROPOSAL

∧ empty(lenders’) ⊃ s’=FINAL

sends ¬empty(lenders’) ⊃ askProposal

∧ askProposal.idData=getProposal.idData

∧ askProposal.income=getProposal.income

∧ empty(lenders’) ⊃ getProposal

∧ getProposal.Reply=false

The orchestration is defined by a number of transitions

A trigger is either an interaction event or a state condition

Effects on the local state (lenders’ denotes the value of lenders after the transition)

A guard identifies the states in which the transition can take place

Events published during the transitions and values taken by their parameters

getLenders is a synchronous interaction. The returned value is stored in the variable lenders

Reply is a default parameter...

Friday, 9 July 2010

Page 87: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

default parameters

Friday, 9 July 2010

Page 88: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

default parametersEach reply event e has two default parameters

Reply: boolean

UseBy: time

Friday, 9 July 2010

Page 89: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

default parametersEach reply event e has two default parameters

Reply: boolean

UseBy: time

If e.Reply is true, the co-party ensures the pledge a until e.UseBy, and enables a and a✘.

!

UseBy

Friday, 9 July 2010

Page 90: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

BUSINESS ROLE MortgageAgent is INTERACTIONS … ORCHESTRATION … transition TimeOutProposal

triggeredBy now>getProposal.UseBy

guardedBy s=WAIT_DECISION

effects s’=FINAL

sends askProposal✘

now is a system function that returns the current time

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

default parametersEach reply event e has two default parameters

Reply: boolean

UseBy: time

If e.Reply is true, the co-party ensures the pledge a until e.UseBy, and enables a and a✘.

!

UseBy

Friday, 9 July 2010

Page 91: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

using UML state machines

Friday, 9 July 2010

Page 92: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

using UML state machines

the language of business roles is declarative and permits under-specification, leaving room for stepwise refinement

Friday, 9 July 2010

Page 93: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

using UML state machines

the language of business roles is declarative and permits under-specification, leaving room for stepwise refinement

other notations can be used (such as UML state machines) when the orchestration is fully specified or one wishes to reuse existing specifications

Friday, 9 July 2010

Page 94: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

using UML state machines

the language of business roles is declarative and permits under-specification, leaving room for stepwise refinement

other notations can be used (such as UML state machines) when the orchestration is fully specified or one wishes to reuse existing specifications

UML state machines are also used when we want to analyse behavioural properties of services through model checkers such as UMC

Friday, 9 July 2010

Page 95: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

PROPOSAL_ACCEPTED

start

getProposal! / askProposal!

INITIAL

WAIT_PROPOSAL

WAIT_DECISION

askProposal"[¬askProposal.Reply] / getProposal"

FINALgetProposal! / askProposal !

SIGNING/ signOutLoan!

signOutLoan" /

confirmation!

end

T_INIT

[askProposal.needInsurance] /

getInsurance!

[askProposal.needAccount] /

openAccount!

T_1

B_INIT B_1

getInsurance" T_FIN

B_FINopenAccount"

[¬ askProposal.needAccount]

askProposal"[askProposal.Reply] / getProposal"

now>getProposal.UseBy / askProposal !

getProposal! / askProposal!

[¬ askProposal.needInsurance]

using UML state machines

Friday, 9 July 2010

Page 96: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business protocols

Friday, 9 July 2010

Page 97: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

business protocols

Friday, 9 July 2010

Page 98: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

“In particular, a trend that is gathering momentum is that of including, as part of the service description, not only the service interface, but also the business protocol supported by the service, i.e. the specification of which message ex-change sequences are supported by the service, for example expressed in terms of constraints on the order in which service operations should be invoked”

G. Alonso, F. Casati, H. Kuno, V. Machiraju (2004) Web Services. Springer

business protocols

Friday, 9 July 2010

Page 99: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

patterns

Friday, 9 July 2010

Page 100: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

¬ e¿

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

“e is never discarded until it is executed”

initiallyEnabled e

patterns

Friday, 9 July 2010

Page 101: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

¬ e¿

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

“e is never discarded until it is executed”

initiallyEnabled e

a after e

“a holds forever after e is executed”

patterns

Friday, 9 July 2010

Page 102: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

¬ e¿

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

“e is never discarded until it is executed”

initiallyEnabled e

a after e

“a holds forever after e is executed”

“e is not published before a holds, and it is published sometimes after a becomes true”

a ensures e

patterns

Friday, 9 July 2010

Page 103: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

patterns

Friday, 9 July 2010

Page 104: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

“The event e cannot be executed before a holds and remains enabled after a becomes true until it is either executed or b becomes true (if ever)”

a enables e until b

patterns

Friday, 9 July 2010

Page 105: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

“The event e cannot be executed before a holds and remains enabled after a becomes true until it is either executed or b becomes true (if ever)”

a enables e until b

“The event e cannot be executed before a holds and remains enabled after a becomes true until it is executed”

a enables e

patterns

Friday, 9 July 2010

Page 106: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

patterns

Friday, 9 July 2010

Page 107: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

restrictions on that conversation or to correlate events of different interactions.Both types of properties need to be model-checked for the provides-interface ofa module — since they depend on the correct orchestration of the componentswhen connected to the required services — and therefore need to be encodedas UCTL formulas. We will first address the encoding of the patterns that areused to specify behaviour constraints and then we will adress the encoding ofthe conversational protocol that is associated with the interaction types.

3.1 Behaviour constraints

In order to specify behaviour constraints SRML relies on a set of pre-defined pat-terns of behaviour that are encoded by abbreviations of UCTL formulas. Thesepatterns capture how the events of different interactions are typically correlatedin service-oriented architectures. The following table presents the abbreviationsthat encode three of the most commonly used patterns (a complete list will bepresented in [1]), for an event e:

initiallyEnabled e A[true{¬e¿}W{e?}true].a enables e

AG[a]¬EF < e¿ > true

A[true{¬e?}W{a}true

a ensures eAG[a]AF [e!]true

A[true{¬e!}W{a}true]

The abbreviation ”initiallyEnabled e” states that the event e will never bediscarded (until it is actually executed) — this abbreviation is typically used todefine the first interaction to take place during a session with a service. For in-stance Customer (shown in figure ??), the interface provided by TravelBooking,defines that the event login� is ready to be executed (as soon as TravelBooking isinstantiated) by declaring the property ”initiallyEnabled login�”. The abbrevia-tion ”a enables e” states that after b happens the event e will not be discardedand also that before b it will never be executed. In Customer the property ”lo-ginB! ∧ login.Reply enables bookTrip�?” means that after the login is accepted(but not before) the service will be ready to execute a request to book a trip.Finally the abbreviation ”a ensures e” states that after a happens the event ewill for certain be published, but not before. This abbreviation is exemplified bythe property ”bookTrip✞? ensures refund�!”, in Customer, that states that aftera request to revoke a booking is executed (but not before), a refund will be sent.

3.2 The two-party interaction pattern

In the interaction declaration of a business protocol, two-way interactions aretyped by s&r (send and receive) or r&s (receive and send) to define that theservice being specified engages in the interaction as the requester or as the sup-plier, respectively. Each of these two roles, requester and supplier, has a set ofproperties associated with it — the conversational protocol that is associatedwith two-way interactions, and that is illustrated in Fig. 2, is characterized by

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

patterns

patterns have a translation in temporal logic (UCTL) so that they can be model-checked

Friday, 9 July 2010

Page 108: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

restrictions on that conversation or to correlate events of different interactions.Both types of properties need to be model-checked for the provides-interface ofa module — since they depend on the correct orchestration of the componentswhen connected to the required services — and therefore need to be encodedas UCTL formulas. We will first address the encoding of the patterns that areused to specify behaviour constraints and then we will adress the encoding ofthe conversational protocol that is associated with the interaction types.

3.1 Behaviour constraints

In order to specify behaviour constraints SRML relies on a set of pre-defined pat-terns of behaviour that are encoded by abbreviations of UCTL formulas. Thesepatterns capture how the events of different interactions are typically correlatedin service-oriented architectures. The following table presents the abbreviationsthat encode three of the most commonly used patterns (a complete list will bepresented in [1]), for an event e:

initiallyEnabled e A[true{¬e¿}W{e?}true].a enables e

AG[a]¬EF < e¿ > true

A[true{¬e?}W{a}true

a ensures eAG[a]AF [e!]true

A[true{¬e!}W{a}true]

The abbreviation ”initiallyEnabled e” states that the event e will never bediscarded (until it is actually executed) — this abbreviation is typically used todefine the first interaction to take place during a session with a service. For in-stance Customer (shown in figure ??), the interface provided by TravelBooking,defines that the event login� is ready to be executed (as soon as TravelBooking isinstantiated) by declaring the property ”initiallyEnabled login�”. The abbrevia-tion ”a enables e” states that after b happens the event e will not be discardedand also that before b it will never be executed. In Customer the property ”lo-ginB! ∧ login.Reply enables bookTrip�?” means that after the login is accepted(but not before) the service will be ready to execute a request to book a trip.Finally the abbreviation ”a ensures e” states that after a happens the event ewill for certain be published, but not before. This abbreviation is exemplified bythe property ”bookTrip✞? ensures refund�!”, in Customer, that states that aftera request to revoke a booking is executed (but not before), a refund will be sent.

3.2 The two-party interaction pattern

In the interaction declaration of a business protocol, two-way interactions aretyped by s&r (send and receive) or r&s (receive and send) to define that theservice being specified engages in the interaction as the requester or as the sup-plier, respectively. Each of these two roles, requester and supplier, has a set ofproperties associated with it — the conversational protocol that is associatedwith two-way interactions, and that is illustrated in Fig. 2, is characterized by

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

patterns

patterns have a translation in temporal logic (UCTL) so that they can be model-checked

“A model-checking approach for service-component architectures”

talk by João Abreu, tomorrow, FMOODS/FORTE (session 3)

Friday, 9 July 2010

Page 109: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

a business protocolBUSINESS PROTOCOL Customer is INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue snd confirmation contract:loancontract SLA VARIABLES

CHARGE:[0..100] BEHAVIOURS

initiallyEnabled getProposal?getProposal.cost ≤750*(CHARGE/100+1) after getProposal! ∧ getProposal.Reply

getProposal? ensures confirmation!

Friday, 9 July 2010

Page 110: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

a business protocolBUSINESS PROTOCOL Customer is INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue snd confirmation contract:loancontract SLA VARIABLES

CHARGE:[0..100] BEHAVIOURS

initiallyEnabled getProposal?getProposal.cost ≤750*(CHARGE/100+1) after getProposal! ∧ getProposal.Reply

getProposal? ensures confirmation!

A request for getProposal is enabled when the service is activated

Friday, 9 July 2010

Page 111: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

a business protocolBUSINESS PROTOCOL Customer is INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue snd confirmation contract:loancontract SLA VARIABLES

CHARGE:[0..100] BEHAVIOURS

initiallyEnabled getProposal?getProposal.cost ≤750*(CHARGE/100+1) after getProposal! ∧ getProposal.Reply

getProposal? ensures confirmation!

A request for getProposal is enabled when the service is activated

The service brokerage has a base price that can be subject to an extra charge, subject to negotiation.

Friday, 9 July 2010

Page 112: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

a business protocolBUSINESS PROTOCOL Customer is INTERACTIONS r&s getProposal idData:usrdata,

income: moneyvalue,preferences:prefdata

proposal:mortgageproposal, cost:moneyvalue snd confirmation contract:loancontract SLA VARIABLES

CHARGE:[0..100] BEHAVIOURS

initiallyEnabled getProposal?getProposal.cost ≤750*(CHARGE/100+1) after getProposal! ∧ getProposal.Reply

getProposal? ensures confirmation!

A request for getProposal is enabled when the service is activated

The service brokerage has a base price that can be subject to an extra charge, subject to negotiation.

A confirmation carrying the loan contract will be issued upon receipt of the commit to getProposal

Friday, 9 July 2010

Page 113: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

layer protocols

LAYER PROTOCOL Registry is INTERACTIONS

rpl getLenders(prefdata):setidsprf registerContract(loanData,loanContract)

BEHAVIOUR

Friday, 9 July 2010

Page 114: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

layer protocols

LAYER PROTOCOL Registry is INTERACTIONS

rpl getLenders(prefdata):setidsprf registerContract(loanData,loanContract)

BEHAVIOUR

Layer Protocols involve persistent components, typically through synchronous blocking interactions

Friday, 9 July 2010

Page 115: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

layer protocols

LAYER PROTOCOL Registry is INTERACTIONS

rpl getLenders(prefdata):setidsprf registerContract(loanData,loanContract)

BEHAVIOUR

The registry can be queried about the registered lenders that meet given users preferences

Layer Protocols involve persistent components, typically through synchronous blocking interactions

Friday, 9 July 2010

Page 116: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

layer protocols

LAYER PROTOCOL Registry is INTERACTIONS

rpl getLenders(prefdata):setidsprf registerContract(loanData,loanContract)

BEHAVIOUR

The registry can be queried about the registered lenders that meet given users preferences

The registry is able to register new contracts

Layer Protocols involve persistent components, typically through synchronous blocking interactions

Friday, 9 July 2010

Page 117: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

layer protocols

LAYER PROTOCOL Registry is INTERACTIONS

rpl getLenders(prefdata):setidsprf registerContract(loanData,loanContract)

BEHAVIOUR

The registry can be queried about the registered lenders that meet given users preferences

The registry is able to register new contracts The properties of synchronous

interactions are typically in the style of pre/post-condition specifications

Layer Protocols involve persistent components, typically through synchronous blocking interactions

Friday, 9 July 2010

Page 118: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction protocols

Friday, 9 July 2010

Page 119: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction protocols

Wires are typed with (binary) connectors

Interaction protocols describe how the interactions between two parties (ROLE A and ROLE B) are coordinated

Friday, 9 July 2010

Page 120: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction protocols

INTERACTION PROTOCOL Straight.I(d1,d2)O(d3) is ROLE A s&r S1

i1:d1,i2:d2 o1:d3 ROLE B

r&s R1 i1:d1,i2:d2 o1:d3 COORDINATION

S1 ≡ R1S1.i1 = R1.i1 S1.i2 = R1.i2 S1.o1 = R1.o1

Wires are typed with (binary) connectors

Interaction protocols describe how the interactions between two parties (ROLE A and ROLE B) are coordinated

Friday, 9 July 2010

Page 121: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction protocols

INTERACTION PROTOCOL Straight.I(d1,d2)O(d3) is ROLE A s&r S1

i1:d1,i2:d2 o1:d3 ROLE B

r&s R1 i1:d1,i2:d2 o1:d3 COORDINATION

S1 ≡ R1S1.i1 = R1.i1 S1.i2 = R1.i2 S1.o1 = R1.o1

Wires are typed with (binary) connectors

Interaction protocols describe how the interactions between two parties (ROLE A and ROLE B) are coordinated

The interaction protocol Straight defines simple transmission of events between the corresponding parties

Friday, 9 July 2010

Page 122: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

interaction protocols

INTERACTION PROTOCOL Straight.I(d1,d2)O(d3) is ROLE A s&r S1

i1:d1,i2:d2 o1:d3 ROLE B

r&s R1 i1:d1,i2:d2 o1:d3 COORDINATION

S1 ≡ R1S1.i1 = R1.i1 S1.i2 = R1.i2 S1.o1 = R1.o1

Wires are typed with (binary) connectors

Interaction protocols describe how the interactions between two parties (ROLE A and ROLE B) are coordinated

To allow reuse, we parametrise Straight with the types of the interaction parameters

The interaction protocol Straight defines simple transmission of events between the corresponding parties

Friday, 9 July 2010

Page 123: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

configuration policies

Configuration policies model the dynamic aspects of services

Friday, 9 July 2010

Page 124: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Internal configuration policies — concern service instantiation:

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

configuration policies

Configuration policies model the dynamic aspects of services

Friday, 9 July 2010

Page 125: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Internal configuration policies — concern service instantiation:the initialisation/termination of the components that instantiate business roles

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

configuration policies

MA: MortgageAgentintBR init: S=INITIAL

intBR term: S=FINAL

Configuration policies model the dynamic aspects of services

Friday, 9 July 2010

Page 126: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Internal configuration policies — concern service instantiation:the initialisation/termination of the components that instantiate business roles

the triggering of the discovery of required services

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

configuration policies

LE: LenderintLE trigger: getproposal ?

BA: BankintBA trigger: default

IN: InsuranceintIN trigger: default

MA: MortgageAgentintBR init: S=INITIAL

intBR term: S=FINAL

Configuration policies model the dynamic aspects of services

Friday, 9 July 2010

Page 127: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Internal configuration policies — concern service instantiation:the initialisation/termination of the components that instantiate business roles

the triggering of the discovery of required services

External configuration policies — concern service discovery and selection (service-level agreements)

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

configuration policies

LE: LenderintLE trigger: getproposal ?

BA: BankintBA trigger: default

IN: InsuranceintIN trigger: default

MA: MortgageAgentintBR init: S=INITIAL

intBR term: S=FINAL

Configuration policies model the dynamic aspects of services

Friday, 9 July 2010

Page 128: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLAs

Friday, 9 July 2010

Page 129: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLAs

In SRML we adopt a c-semiring-based approach to constraint satisfaction and optimisation that can express classical, fuzzy, weighted,..., constraint satisfaction problems

S.Bistarelli, U. Montanari, F. Rossi (1997) Semiring-based constraint satisfaction and optimization. Journal of the ACM (JACM) 44(2): 201-236

Friday, 9 July 2010

Page 130: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLAs

In SRML we adopt a c-semiring-based approach to constraint satisfaction and optimisation that can express classical, fuzzy, weighted,..., constraint satisfaction problems

S.Bistarelli, U. Montanari, F. Rossi (1997) Semiring-based constraint satisfaction and optimization. Journal of the ACM (JACM) 44(2): 201-236

A c-semiring is an algebraic structure <A,+,×,0,1> where:

A is a set of values such that {0,1}∈A

+ is a binary operation on A that is commutative, associative, idempotent and with unit element 0

× is another binary operation on A that is commutative, associative with unit element 1 and absorbing element 0

× distributes over +

Friday, 9 July 2010

Page 131: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLAs

In SRML we adopt a c-semiring-based approach to constraint satisfaction and optimisation that can express classical, fuzzy, weighted,..., constraint satisfaction problems

A c-semiring is an algebraic structure <A,+,×,0,1> where:

A is a set of values such that {0,1}∈A

+ is a binary operation on A that is commutative, associative, idempotent and with unit element 0

× is another binary operation on A that is commutative, associative with unit element 1 and absorbing element 0

× distributes over +

A is the domain of the degree of satisfaction<{0,1},∨,∧,0,1> for yes/no<[0,1],max,min,0,1> for intermediate degrees

Friday, 9 July 2010

Page 132: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLAs

In SRML we adopt a c-semiring-based approach to constraint satisfaction and optimisation that can express classical, fuzzy, weighted,..., constraint satisfaction problems

A c-semiring is an algebraic structure <A,+,×,0,1> where:

A is a set of values such that {0,1}∈A

+ is a binary operation on A that is commutative, associative, idempotent and with unit element 0

× is another binary operation on A that is commutative, associative with unit element 1 and absorbing element 0

× distributes over +

A is the domain of the degree of satisfaction<{0,1},∨,∧,0,1> for yes/no<[0,1],max,min,0,1> for intermediate degrees

+ is a comparison primitivea<b ⇔ a+b=b

(b is better than a)

Friday, 9 July 2010

Page 133: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLAs

In SRML we adopt a c-semiring-based approach to constraint satisfaction and optimisation that can express classical, fuzzy, weighted,..., constraint satisfaction problems

A c-semiring is an algebraic structure <A,+,×,0,1> where:

A is a set of values such that {0,1}∈A

+ is a binary operation on A that is commutative, associative, idempotent and with unit element 0

× is another binary operation on A that is commutative, associative with unit element 1 and absorbing element 0

× distributes over +

A is the domain of the degree of satisfaction<{0,1},∨,∧,0,1> for yes/no<[0,1],max,min,0,1> for intermediate degrees

+ is a comparison primitivea<b ⇔ a+b=b

(b is better than a)

× is a composition primitive

Friday, 9 July 2010

Page 134: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLAsA constraint system is a triple < S, D, V > where

S is a C-semiring

D is a finite set (domain of possible elements taken by the variables)

V is a totally ordered set (of variables)

A constraint is a pair < def, con > wherecon ⊆ V is called the type of the constraint

def : D|con| → A is the value (mapping) of the constraint

<a1,a2,..,a|con|>

degree of satisfaction

Friday, 9 July 2010

Page 135: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLA variables

Friday, 9 July 2010

Page 136: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

SLA variables

standard configuration variables include external interfaces

availability, responseTimeServiceId — service identifiers (e.g., URI’s).

for wireswire.Delay — the maximum delivery delay for events sent over wire

for interactionsinteraction for every interaction of type r&s — the length of time the pledge is valid after interaction is issued

Friday, 9 July 2010

Page 137: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

EXTERNAL POLICY

<[0..1],max,min,0,1>

SLA VARIABLES MA.CHARGE, MA.getProposal,

LE.ServiceID,

LE.requestMortgage

CONSTRAINTS

C1: {c:MA.CHARGE, t:MA.getProposal}

C2: {s:LE.ServiceId}

C3: {t1:MA.getProposal,t2:LE.requestMortgage}

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

an example

!

1 if t " 10 #c

1 + 2 # c $ 0.2 # t if 10 # c < t " 5 + 10 # c

0 otherwise

%

& '

( '

!

!

1 if s " BR .lenders

0 otherwise

# $ %

!

1 if t2 > t1+ CC.Delay + CL.Delay

0 otherwise

" # $

!

Friday, 9 July 2010

Page 138: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

EXTERNAL POLICY

<[0..1],max,min,0,1>

SLA VARIABLES MA.CHARGE, MA.getProposal,

LE.ServiceID,

LE.requestMortgage

CONSTRAINTS

C1: {c:MA.CHARGE, t:MA.getProposal}

C2: {s:LE.ServiceId}

C3: {t1:MA.getProposal,t2:LE.requestMortgage}

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

an example

the greater the CHARGE applied to the base price of the brokerage service, the longer the interval during which the proposal is valid

!

1 if t " 10 #c

1 + 2 # c $ 0.2 # t if 10 # c < t " 5 + 10 # c

0 otherwise

%

& '

( '

!

!

1 if s " BR .lenders

0 otherwise

# $ %

!

1 if t2 > t1+ CC.Delay + CL.Delay

0 otherwise

" # $

!

Friday, 9 July 2010

Page 139: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

EXTERNAL POLICY

<[0..1],max,min,0,1>

SLA VARIABLES MA.CHARGE, MA.getProposal,

LE.ServiceID,

LE.requestMortgage

CONSTRAINTS

C1: {c:MA.CHARGE, t:MA.getProposal}

C2: {s:LE.ServiceId}

C3: {t1:MA.getProposal,t2:LE.requestMortgage}

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

an example

the greater the CHARGE applied to the base price of the brokerage service, the longer the interval during which the proposal is valid

the selected lendermust belong to the set BR.lenders

!

1 if t " 10 #c

1 + 2 # c $ 0.2 # t if 10 # c < t " 5 + 10 # c

0 otherwise

%

& '

( '

!

!

1 if s " BR .lenders

0 otherwise

# $ %

!

1 if t2 > t1+ CC.Delay + CL.Delay

0 otherwise

" # $

!

Friday, 9 July 2010

Page 140: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

EXTERNAL POLICY

<[0..1],max,min,0,1>

SLA VARIABLES MA.CHARGE, MA.getProposal,

LE.ServiceID,

LE.requestMortgage

CONSTRAINTS

C1: {c:MA.CHARGE, t:MA.getProposal}

C2: {s:LE.ServiceId}

C3: {t1:MA.getProposal,t2:LE.requestMortgage}

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

an example

the validity of the loan proposal offered by the lender must be greater than the sum of the validity offered to the customer and the delays of the wires

the greater the CHARGE applied to the base price of the brokerage service, the longer the interval during which the proposal is valid

the selected lendermust belong to the set BR.lenders

!

1 if t " 10 #c

1 + 2 # c $ 0.2 # t if 10 # c < t " 5 + 10 # c

0 otherwise

%

& '

( '

!

!

1 if s " BR .lenders

0 otherwise

# $ %

!

1 if t2 > t1+ CC.Delay + CL.Delay

0 otherwise

" # $

!

Friday, 9 July 2010

Page 141: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

the dynamic aspect of services

Friday, 9 July 2010

Page 142: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

the dynamic aspect of services

Services add a ‘business‘ layer of abstraction over a component infrastructure in sense that they structure the evolution of software applications seen as systems of interconnected components

Friday, 9 July 2010

Page 143: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

the dynamic aspect of services

Services add a ‘business‘ layer of abstraction over a component infrastructure in sense that they structure the evolution of software applications seen as systems of interconnected components

From structured programming to ‘structured interactions’

Services address the ‘social’ complexity of software-intensive systems

Friday, 9 July 2010

Page 144: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

states as configurations

A configuration F consists of:

A simple graph whose nodes are components, and edges are wires.

A labelling function that assigns a state to every node and edge

states are as discussed earlier on...

Friday, 9 July 2010

Page 145: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

an example

Friday, 9 July 2010

Page 146: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

an example

component

wire (connector)

Friday, 9 July 2010

Page 147: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

an example

component

wire (connector)

Although we use the same icons,these are instances, not specifications

Friday, 9 July 2010

Page 148: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

configurations are typed

Friday, 9 July 2010

Page 149: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

configurations are typed

Friday, 9 July 2010

Page 150: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

activity modules

Friday, 9 July 2010

Page 151: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

activity modules

serves-interface

Friday, 9 July 2010

Page 152: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

modules as graphs

Friday, 9 July 2010

Page 153: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

An activity module M consists of:

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

modules as graphs

Friday, 9 July 2010

Page 154: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

An activity module M consists of:

A labelled graph:

Nodes are classified as:components(M), labelled with business roles

uses(M), labelled with layer protocols

requires(M), labelled with business protocols

{serves(M)}, labelled with a layer protocol

Edges (wires) are labelled with connectors (interaction glue and attachments)

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

modules as graphs

Friday, 9 July 2010

Page 155: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

An activity module M consists of:

A labelled graph:

Nodes are classified as:components(M), labelled with business roles

uses(M), labelled with layer protocols

requires(M), labelled with business protocols

{serves(M)}, labelled with a layer protocol

Edges (wires) are labelled with connectors (interaction glue and attachments)

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

modules as graphs

reflect different dynamics

Friday, 9 July 2010

Page 156: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

An activity module M consists of:

A labelled graph:

Nodes are classified as:components(M), labelled with business roles

uses(M), labelled with layer protocols

requires(M), labelled with business protocols

{serves(M)}, labelled with a layer protocol

Edges (wires) are labelled with connectors (interaction glue and attachments)

An internal configuration policy

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

modules as graphs

reflect different dynamics

Friday, 9 July 2010

Page 157: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

An activity module M consists of:

A labelled graph:

Nodes are classified as:components(M), labelled with business roles

uses(M), labelled with layer protocols

requires(M), labelled with business protocols

{serves(M)}, labelled with a layer protocol

Edges (wires) are labelled with connectors (interaction glue and attachments)

An internal configuration policy

An external configuration policy

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

modules as graphs

reflect different dynamics

Friday, 9 July 2010

Page 158: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes@

SFM’0

9

business configurations

A business configuration consists of:

A set of activity names (chosen from a domain)

A state configuration F

A mapping B that assigns a module B(a) to every activity a – the workflow performed by a in F

For every activity a, a homomorphism B(a) of graphs between the body of B(a) and F

This homomorphism makes configurations reflective

Friday, 9 July 2010

Page 159: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

the state transitions

Friday, 9 July 2010

Page 160: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

the state transitions

while they execute, certain components may trigger the discovery of external services

trigger

Friday, 9 July 2010

Page 161: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

discovery and selection

Friday, 9 July 2010

Page 162: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

discovery and selection

satisfaction of requirements

Friday, 9 July 2010

Page 163: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

Friday, 9 July 2010

Page 164: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

Friday, 9 July 2010

Page 165: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

Friday, 9 July 2010

Page 166: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

component-interfaces bind to new instances

Friday, 9 July 2010

Page 167: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

uses-interfaces bind to existing

componentscomponent-interfaces bind to new instances

Friday, 9 July 2010

Page 168: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

Friday, 9 July 2010

Page 169: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

Friday, 9 July 2010

Page 170: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

instantiation and binding

the activity has a new type…

…and a new configuration

Friday, 9 July 2010

Page 171: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

what else?

Friday, 9 July 2010

Page 172: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

what else?

Qualitative analysisDoubly-labelled transition systems and temporal logic

Model-checking using UMC

Friday, 9 July 2010

Page 173: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

what else?

Qualitative analysisDoubly-labelled transition systems and temporal logic

Model-checking using UMC

Analysis of timing properties using PEPA

Friday, 9 July 2010

Page 174: Formal Modelling of Service-Oriented Systemsd3s.mff.cuni.cz/teaching/seminars/2010-06-01-Fiadeiro-Foundations... · es2010 Formal Modelling of Service-Oriented Systems José Fiadeiro

Abreu

&Bocch

i&Fiad

eiro&

Lopes2

010

what else?

Qualitative analysisDoubly-labelled transition systems and temporal logic

Model-checking using UMC

Analysis of timing properties using PEPA

A number of case studiesTravel booking

ProcurementAutomotive

Telco

Friday, 9 July 2010