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
Outline
1 Introduction
2 Architectural Design Rewriting
3 Design and Reconfiguration for a Service Modelling Language
4 The end
Our world
Software Architectures Architectural Styles
Reconfigurations SOA
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!
Outline
1 Introduction
2 Architectural Design Rewriting
3 Design and Reconfiguration for a Service Modelling Language
4 The end
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
3hubOO
triangular mesh of 3hubs
•
NET
OO
•
O O O
NET
•
•
oo
2hub//
• 2hub11 aa
2hub
== nn
chain of 2hubs
Body
The notation of design productions
Traditional production rule notation L ::= R
•u1
oo
e:2N//
•u2 ::= •u1oo
e1:2N//
•oo
e2:2N//
•u2ADR notation L encapsulating R
e:2N
•u1
/o /o /o /o /o
•oo
e1:2N//
•oo
e2:2N//
•o/ o/ o/
•u2ADR functional reading link2 : 2N × 2N → 2N
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/
•Triangular mesh style
A single 3hub . . . or . . . a mesh of 3hubs
basic3 : 3N
•
O
3N •
•
/o
•oo
3hubOO //
••
o/ o/ o/
•link3 : 3N × 3N × 3N → 3N
•
O O O
3N
•
•
oo
3NOO //
•
•
/o
•oo
3NOO //
•
oo
3NOO //
•
o/ o/ o/
•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
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
3hubOO
Þ
?•
O O O
NET
•
•
oo
2hub//
•2hub
11 aa
2hub
== nn
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
3hubOO //
••
o/ o/ o/
• 3to2Þ
2N
•
/o /o /o /o
•oo
2hub//
•o/ o/ o/
•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// >>
•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
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 )
Outline
1 Introduction
2 Architectural Design Rewriting
3 Design and Reconfiguration for a Service Modelling Language
4 The end
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).
Design, discover/select, bind...
A required service is discovered and selected...
Design, discover/select, bind...
Binding reconfigures interfaces and wires...
Design, discover/select, bind...
The service is bound with a new wire...
SRML Diagrams as graphs
More or less shaped like this...
Components Interfaces Wires Services
∗+[F −]r r
p
c//
◦ ioo //
. eoo //
I ioo //
◦ coo
p
i
OO
r
I ioo //
◦ ioo //
.c
OO
W
OO
Designing SRML diagrams
An excerpt of the design productions needed
smod wrap
M
B
pp // ..
.
oo
W I/o
I.
oo
WW
.
/o
.oo
E//
Ioo
Mewire
E
.
/o
.oo
e//
Io/
IBinding means dealing with things like this...
Lots of wires to be internalised
r
p
I
I
""
.
oo
e//
I Cr
I}}
◦ .
oo
WI C
r
I
ZZ // 00
◦ IOO PP >> @@
. Woo
◦
pp oo
I22
.
oo
W pOO
I
ZZ // 00
◦ IOO PP >> @@
. Woo
r
OO
Binding step 1
Reconfiguring a pair of wires...
I
◦
/o /o /o
◦oo
i//
.oo
e//
Ioo
i//
◦o/ o/ o/
◦Þ
int I◦
/o /o /o
◦oo
i//
◦o/ o/ o/
◦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 :Ioo //
◦
o/
◦◦
/o
◦^^ oo
w 21 :I// @@
◦o/
◦w 22 :I