• Non ci sono risultati.

Service Oriented Architectural Design

N/A
N/A
Protected

Academic year: 2022

Condividi "Service Oriented Architectural Design"

Copied!
27
0
0

Testo completo

(1)

Service Oriented Architectural Design

R. Bruni 1 , A. Lluch Lafuente 1 , U. Montanari 1 , E. Tuosto 2

Department of Computer Science, University of Pisa {bruni,lafuente,ugo}@di.unipi.it

Department of Computer Science, University of Leicester [email protected]

3rd International Symposium on Trustworthy Global Computing

(2)

Outline

1 Introduction

2 Architectural Design Rewriting

3 Design and Reconfiguration for a Service Modelling Language

4 The end

(3)

Our world

Software Architectures Architectural Styles

Reconfigurations SOA

(4)

Principles of ADR (Architectural Design Rewriting)

Software Architectures

Designs: graphs with interfaces.

Partial designs: designs with holes.

Architectural styles

Set of design productions (operations over designs).

Inspired by context-free graph grammars (Le M´ etayer et al.).

A design term with type T is conformant to style T . Reconfigurations

Rewrite rules over design terms, not over graphs.

Hierarchical, inductive rules (term rewriting + SOS).

Style preservation immediate with rule d : T → d

0

: T .

No theorem or (non-terminating) algorithm needed!

(5)

Outline

1 Introduction

2 Architectural Design Rewriting

3 Design and Reconfiguration for a Service Modelling Language

4 The end

(6)

Scenario: Network of Chains or Triangular Meshes

Network (design of type NET) = interface + body.

Interface = NET-typed edge with one no de.

O O O

NET

oo

3hub

//

OO

3hub

11 //

OO

nn oo

3hub

OO

triangular mesh of 3hubs

NET

OO

O O O

NET

oo

2hub

//

• 2hub

11 aa

2hub

== nn

chain of 2hubs

Body

(7)

The notation of design productions

Traditional production rule notation L ::= R

•u1

oo

e:2N

//

•u2 ::= •u1

oo

e1:2N

//

oo

e2:2N

//

•u2

ADR notation L encapsulating R

e:2N

•u1

/o /o /o /o /o

oo

e1:2N

//

oo

e2:2N

//

o/ o/ o/

•u2

ADR functional reading link2 : 2N × 2N → 2N

(8)

Chain style 2N

A single 2hub . . . or . . . two concatenated 2Ns . basic2 : 2N

2N

/o /o /o /o

oo

2hub

//

o/ o/ o/

link2 : 2N × 2N → 2N

e:2N

/o /o /o /o

oo

e1:2N

//

oo

e2:2N

//

o/ o/ o/

(9)

Triangular mesh style

A single 3hub . . . or . . . a mesh of 3hubs

basic3 : 3N

O

3N •

/o

oo

3hub

OO //

••

o/ o/ o/

link3 : 3N × 3N × 3N → 3N

O O O

3N

oo

3N

OO //

/o

oo

3N

OO //

oo

3N

OO //

o/ o/ o/

(10)

Constructing NETs

A closed chain . . . or . . . triangular mesh net2 : 2N → NET

O O O

NET

2N

00 nn

net3 : 3N → NET

O O O

NET

3N

00 nnOO

(11)

Reconfiguring NETs

How can we transform any triangular NET into a chained one?

O O O

NET

oo

3hub

//

OO

3hub

11 //

OO

oo nn

3hub

OO

Þ

?

O O O

NET

oo

2hub

//

2hub

11 aa

2hub

== nn

(12)

A 3hub becomes a 2hub

basic3 3to2 −→ basic2 Type changes (3N to 2N),

but label 3to2 takes care of contexts.

O

3N •

/o /o /o /o

oo

3hub

OO //

••

o/ o/ o/

3to2

Þ

2N

/o /o /o /o

oo

2hub

//

o/ o/ o/

(13)

A 3N becomes a 2N

x 1 −→ x 3to2 1 0 x 2 3to2 −→ x 2 0 x 3 3to2 −→ x 3 0 link3(x 1 , x 2 , x 3 ) −→ link2(link2(x 3to2 2 0 , x 1 0 ), x 3 0 )

O

3N •

oo

x1:3N

//

OO

/o

oo

x2:3N

//

OO

oo

x3:3N

//

OO

o/

Rule is conditional and labelled.

2N

`` oo

x 01:2N

// >>

(14)

A triangular meshed NET becomes a chained NET

x −→ x 3to2 0 net3(x ) −→ net2(x 0 )

The last closing rule.

It can be applied in any context.

O O O

NET

x :3N

00 nn Þ

O O O

NET

x 0:2N

00 nnOO

(15)

Summary of reconfiguration rules

A 3hub becomes a 2hub

basic3 3to2 −→ basic2 A 3N becomes a 2N (if ...)

x 1 3to2

−→ x 1 0 x 2 3to2

−→ x 2 0 x 3 3to2

−→ x 3 0 link3(x 1 , x 2 , x 3 ) −→ link2(link2(x 3to2 2 0 , x 1 0 ), x 3 0 ) A triangular meshed NET becomes a chained NET (if ...)

x 3to2 −→ x 0

net3(x ) −→ net2(x 0 )

(16)

Outline

1 Introduction

2 Architectural Design Rewriting

3 Design and Reconfiguration for a Service Modelling Language

4 The end

(17)

Design, discover/select, bind...

Services are partial designs: required services are holes...

Components Wires Interfaces

NOTE: Our SML is SRML (Sensoria’s SML, inspired by IBM et al.’s

Software Component Architecture).

(18)

Design, discover/select, bind...

A required service is discovered and selected...

(19)

Design, discover/select, bind...

Binding reconfigures interfaces and wires...

(20)

Design, discover/select, bind...

The service is bound with a new wire...

(21)

SRML Diagrams as graphs

More or less shaped like this...

Components Interfaces Wires Services

∗+[F −]r r



p



c

//

i

oo //

. e

oo //

I i

oo //

c

oo

p

i

 OO

r



I i

oo //

i

oo //

.

c

OO

W

OO

(22)

Designing SRML diagrams

An excerpt of the design productions needed

smod wrap

M

B

pp // ..

.

oo

W I

/o

I

.

oo

W

W

.

/o

.

oo

E

//

I

oo

M

ewire

E

.

/o

.

oo

e

//

I

o/

I

(23)

Binding means dealing with things like this...

Lots of wires to be internalised

r



p



I

 

I

""

.

oo

e

//

I C

 

r



I

}}  

◦ .

oo

W

I C

 

r



I

ZZ // 00

◦ I

OO PP >> @@

. W

oo

pp oo

I

22

.

oo

W p

OO

I

ZZ // 00

◦ I

OO PP >> @@

. W

oo

r

OO

(24)

Binding step 1

Reconfiguring a pair of wires...

I

/o /o /o

oo

i

//

.

oo

e

//

I

oo

i

//

o/ o/ o/

Þ

int I

/o /o /o

oo

i

//

o/ o/ o/

(25)

Binding step 2

I

/o

 

u1:I



v1:I

  

o/

.

oo

e

//

I int

Þ

/o

u2:I

]] ]] BB

v2:I

\\ AA AA

o/

I

w 11 :I

  

/o

w 12 :I

oo  //

o/

/o

^^ oo

w 21 :I

// @@

o/

w 22 :I

OO ^^ @@ OO

(26)

Outline

1 Introduction

2 Architectural Design Rewriting

3 Design and Reconfiguration for a Service Modelling Language

4 The end

(27)

Concluding remarks

What is ADR?

An algebra of graphs with interfaces (designs).

Conditional, labelled rewrite rules on design terms.

What can I do with ADR?

Style-driven design of software architectures.

Style-preserving reconfigurations.

(Ordinary execution).

Architectural Design, Specification and Verification.

Run-time Configuration Management.

Where can I get more on ADR?

www.albertolluch.com/adr.html.

Style-Based Architectural Reconfigurations, Technical Report

TR-07-17, Dipartimento di Informatica, Universit` a di Pisa.

Riferimenti

Documenti correlati

public void setSender(String sender) { /* set sender;*/ } public void setReceiver(String receiver) { /* set receiver;*/ } public void setContent(String content) { /* set content;*/

Lipari (Scuola Superiore Sant’Anna) OO Design Principles October 28, 2011 1 /

You might be tempted to make the constructor private, so the only way to construct an instance is to use the static factory method however, keep in mind that, if the constructor

Lipari (Scuola Superiore Sant’Anna) Design Patterns November 11, 2011 4 / 60..

in the last two cases we can declare the pointer or the reference to refer to a constant object: it means the function cannot change it Passing by constant reference is equivalent,

Complex(const Complex &c); // copy constructor double real() const; // member function double imaginary() const; // member function double module() const; // member

if the base class virtual method returns a pointer or a reference to an object of the base class.. Overloading

We have concrete data classes for basic types (using templates) We can create user-defined concrete data classes..