architectures: design patterns for component-based … · joint work with: paul attie, eduard...
Post on 09-Aug-2018
217 Views
Preview:
TRANSCRIPT
Architectures: Design Patterns for Component-Based Systems
Short talk @ TGC, 5th of September, 2014
Simon BliudzeÉcole polytechnique fédérale de Lausanne
Joint work with: Paul Attie, Eduard Baranov, Marius Bozga, Mohamad Jaber and Joseph Sifakis
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Reusable design patterns• Systems are not built from
scratch
• Maximal re-use of building blocks (off-the-shelf components)
• Maximal re-use of solutions(libraries, design patterns, etc.)
• Express coordination constraints in declarative manner
2
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Applications• Concurrency:
(a)synchronous, time-triggered, token-ring, mutual exclusion
• Protocols:communication protocols, data access control, encryption, authentication
• Robustness:fault detection & recovery, resource management
• etc.
3
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Theory of architectures• How to model?
• How to specify?
• How to combine?
• How to implement efficiently?
4
Architectures enforce characteristic properties. The crucial question is whether these are preserved by composition?
How to model?
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Component-based design
• Three layers • Component behaviour • Coordination • Data transfer
6
Component design by refinement
Three layers:
1 Componentbehaviour
2 Coordination
3 Data transfer
SC 2011 — S. Bliudze, J. Sifakis, “Synthesizing Glue Operators...” — Zurich, June 30th , 2011 — 8 / 29
Component design by refinement
Three layers:
1 Componentbehaviour
2 Coordination
3 Data transfer
A
b1 r1
p1
f1
Bf2
b2
C
p3 f3
r3
b3
SC 2011 — S. Bliudze, J. Sifakis, “Synthesizing Glue Operators...” — Zurich, June 30th , 2011 — 9 / 29
Component design by refinement
Three layers:
1 Componentbehaviour
2 Coordination
3 Data transfer
A
b1 r1
p1
f1
Bf2
b2
C
p3 f3
r3
b3
SC 2011 — S. Bliudze, J. Sifakis, “Synthesizing Glue Operators...” — Zurich, June 30th , 2011 — 9 / 29
Component design by refinement
Three layers:
1 Componentbehaviour
2 Coordination
3 Data transfer
A
b1 r1
p1
f1
Bf2
b2
C
p3 f3
r3
b3
SC 2011 — S. Bliudze, J. Sifakis, “Synthesizing Glue Operators...” — Zurich, June 30th , 2011 — 9 / 29
A.x = max (B.y, C.z)
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Example in BIP
7
sleep
work
b1f1
b1 f1sleep
work
b2f2
b2 f2
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Example in BIP
7
sleep
work
b1f1
b1 f1sleep
work
b2f2
b2 f2free
taken
b12f12
b12 f12
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Example in BIP
7
sleep
work
b1f1
b1 f1sleep
work
b2f2
b2 f2free
taken
b12f12
b12 f12
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Example in BIP
7
b1 f1 b2 f2free
taken
b12f12
b12 f12
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Example in BIP
7
�12 = {;, b1b12, b2b12, f1f12, f2f12}
b1 f1 b2 f2free
taken
b12f12
b12 f12
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Architectures in BIP
8
A = (C, PA, �)
b1 f1 b2 f2free
taken
b12f12
b12 f12
Set of coordinating behaviours
Interface (ports)
Interaction model
[
C2CPC ✓ PA
The interface includes all ports of the coordinator components
How to combine?
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Constraints intuition
10
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Constraints intuition
10
Bad 1
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Constraints intuition
10
Bad 1
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Constraints intuition
10
Bad 1
Bad 2
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Constraints intuition
10
Bad 1
Bad 2
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Constraints intuition
10
Bad 1
Bad 2
Good
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Limits of white magic
11
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Limits of white magic
11
Bad 1
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Limits of white magic
11
Bad 1
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Limits of white magic
11
Bad 1Bad 2
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Limits of white magic
11
Bad 1Bad 2
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Limits of white magic
11
Bad 1Bad 2
How to implement efficiently?
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Architecture-basedExternal: component behaviour is not modified
13
baa
bdc
c
d
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Architecture-agnosticInternal: the coordination primitives mix-up with the
functional behaviour of the components
14
Task 1:!while (true) { free(S1); take(S2); do-a; free(S1); take(S2); do-b; }
Task 2:!while (true) { take(S1); free(S2); do-c; take(S1); free(S2); do-d; }
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 1715
• Architecture-based • External • Declarative • Highly abstract • Relies on an execution engine • Easy to understand, analyse
and manipulate
• Architecture-agnostic • Internal • Imperative • Detailed • Relies on low-level primitives • Efficient
Two sides of the same design
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 1715
• Architecture-based • External • Declarative • Highly abstract • Relies on an execution engine • Easy to understand, analyse
and manipulate
• Architecture-agnostic • Internal • Imperative • Detailed • Relies on low-level primitives • Efficient
Two sides of the same design
Internalisation
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Conclusion• Architectures solve coordination problems by enforcing
characteristic properties.
• First steps toward the study of a rigorous concept of architecture and its effective use for achieving correctness by construction in a system design flow. • A notion of architecture in BIP • Safety-preserving architecture composition operator
• [SEFM 2014] A General Framework for Architecture Composability • Architecture internalisation using Top/Bottom component model
• [CBSE 2014] Architecture internalisation in BIP
16
S.Bliudze @ TGC, Rome, 5th of September, 2014 / 17
Future work• Modelling
• Study and classification of real-life architectures in various domains (Embedded systems, web services, enterprise integration, etc.)
• Versatility of the model • Dynamic architectures
• Specification • Development of a simple powerful language for specifying architectures
and their characteristic properties
• Efficiency & distribution • Optimisation of internalised architectures • Implementation based on message-passing mechanisms (e.g. AKKA)
17
Thank you for your attention
top related