Professional Documents
Culture Documents
J.L.Fiadeiro
Plan 2
Motivation:
why Evolution and Mobility matter
Social vs physiological complexity
Software Architectures
Usage vs interaction
Components, connectors and configurations
Coordination primitives for evolution
Externalisation of interaction in connectors
Location primitives for mobility
Externalisation of distribution in connectors
SEFM’04
Contributions 3
ATX Software
SEFM’04
Coping with change 4
SEFM’04
Architectures in Software Design 5
Requirements high-level
domain
Architecture
machine
Code low-level
SEFM’04
What is it? 6
SEFM’04
Module structures 7
Architectures of Usage
Code/implementation structures
Address the global structure of a system in terms
of
what its modules and resources are
how they fit together in the system
Definition/usage graphs
Modelling Interconnection Languages for
programming-in-the-large (DeRemer and Kron 75)
Evolution: maintenance
SEFM’04
Two different relationships 8
Implements
a given module is defined in terms of facilities provided
by/to other modules;
composition mechanisms glue pieces together by
indicating for each use of a facility where its
corresponding definition is provided
Interacts
components are treated as independent entities that
may interact with each other along well defined lines of
communication (connectors)
SEFM’04
Two different notions of complexity 9
“Physiological” complexity
static, linear interaction based on
identities
compile or design time integration
contracts of usage
“Social” complexity
dynamic, mobile and unpredictable
interactions based on properties
“late” or “just-in-time” integration
quality and trust
SEFM’04
Run-time Architectures 10
SEFM’04
The challenge of evolution 12
SEFM’04
Summary 13
Architecture-based approaches
X
Y ⊆ Y’
A Y’
Y B’
B Y A Coordination
A B ⊆ B’
C
X C
C €
Computation
SEFM’04
Some FAQs… 14
Can’t we do it Or with
with objects? components?
What about
design patterns?
Where is the
catch?
SEFM’04
An example from Banking 15
Solution 2: 1:
Subclassing
New Operation Account
on AccountBalance:money
Account
…
This and on the is
solution business
still Withdrawal(Amount)
VIP_Withdrawal(Amount)
logic:
intrusive theon customers
precondition on VIP_Withdrawal(A):
Withdrawal(Amount)
are VIPs,
customer… not
Balance+C.Credit≥A
the
accounts!
(for the same reasons) Withdrawal
precondition on Withdrawal(A):
Balance≥A
In a typical
This solution classroom exercise,
is intrusive the
on: ofto
Customer Consider
How the VIP_Account
can we typical
evolve situation
this model
method withdrawal will be
bank accounts
accommodate
Typically,
Customer
Account
VIP_Withdrawal –a–its that have
different
VIPs keep
VIP-customers
interface a balance
solution
to
and that
change
specified with a precondition that
and
are
would
callsfrom
allowedwhich
have
implementation to
been customers
overdraw
chosen…
needs
my_account.withdrawal(n)to becanto
their
prevents the account from being
make
accountwithdrawals.
extended upwith
to an theagreed limit?
new operation
my_account.VIP_withdrawal(n)
overdrawn.
SEFM’04
An example from Banking 16
SEFM’04
A
Butbetter
still some
solution
problems 17
If
A the
Model association
better way
the is toisuse
relationshipimplemented
abetween
mediator through
throughattributes
customers which theand
and accounts
… and specialise it to evolve the business
on which the “business rule” can be placed rule
direct
calls
as calls,
an can be we getclass…
the and
redirected
association samemanaged…
problems as before…
Withdrawal(Customer,Amount)
Customer Account
Owner
preconditions on A.Withdrawal(C,X):
owner(C,A)&& A.Balance≥X
preconditions on A.Withdrawal(C,X):
Credit:money VIP_Owner owner(C,A)&&
A.Balance+Credit≥X
SEFM’04
Mediator 18
SEFM’04
OO is identity-based 19
SEFM’04
Contracts for Change 20
The contract may refuse the call when when C calls A.withdrawal(X)
Credit:money areVIP_Owner
certain pre-conditions not met with A.Balance+C.credit≥X
do A.withdrawal(X)
SEFM’04
The CCC approach 21
An Academia/Industry partnership
SEFM’04
The CCC approach 22
The Strategy
SEFM’04
The CCC approach 23
SEFM’04
The CCC approach 24
SEFM’04
The CCC approach 25
The Strategy
SEFM’04
The CCC approach 26
?
behavior of basic
behavior of basic
Layer
components
components
Contract
ContractParticipant
Participant
Computation
relationship
relationship
Layer
Layer
Layercontaining
containing AA B
the
thestable
stable
independent
independent
components
components
Component
Component
SEFM’04
The CCC approach 27
The Strategy
SEFM’04
The CCC approach 28
Computation Coordination
Resources Configuration Layer Resources
SEFM’04
The CCC approach 29
SEFM’04
Semantic primitives for coordination 30
SEFM’04
Overview 31
SEFM’04
Just-in-time integration 32
SEFM’04
Instantiation 33
Coordination
CoordinationRule
Rule
Coordination
Coordination laws
laws modelling
modelling
Business Modelling
business
businessrules
rules
Layer
Coordination Interface
Coordination Interface
Business architecture
run-time configuration
Units fitting components and
Units fitting components and
interconnections
interconnectionstotothe
themodel
Bindng
Layer
model
Binding
BindingContract
Contract
Coordination
Core
Corestable
stablecomponents
components Component
Component
Computation
SEFM’04
Coordination interfaces 34
SEFM’04
Coordination interfaces 35
SEFM’04
Coordination interfaces 36
SEFM’04
Coordination laws 37
SEFM’04
Coordination rules 38
SEFM’04
Coordination rules 39
SEFM’04
Coordination rules 40
SEFM’04
Example: VIP-withdrawal 41
The credit-limit is assigned to the law itself rather than the customer
or the account. This is because we may want to be able to assign
different credit limits to the same customer but for different
accounts, or for the same account but for different owners.
Would it make sense to have a separate partner of the law providing
the credit?
SEFM’04
Interfacing with external events 42
SEFM’04
Example: interfaces for transfers 43
SEFM’04
Example: law for transfers 44
SEFM’04
Monitoring behaviour 45
SEFM’04
Example: monitoring big credits 46
SEFM’04
Regulating behaviour 47
SEFM’04
Example: commission on balances 48
SEFM’04
Example: openplan 49
when c.balance()>maximum()
do let N=c.balance()–maximum()
in s.credit(N)and c.debit(N)
end law
SEFM’04
Example: openplan 50
SEFM’04
Instantiation 51
SEFM’04
Design primitives for coordination 52
Coordination
Coordinationrule
rule
Coordination contract =
Rule:
Rule:when when<trigger>
<trigger>
Coordination unit with <condition>
with <condition>
do
do<transaction>
<transaction>
Coordination
CoordinationContract
Contract
Contracts
Contractsmay
mayhave
have
Coordination
?
operations and attributes
operations and attributes
Layer
like
likeaanormal
normalclass,
class,but
but
these are not public
these are not public
Contract
ContractPartner
Partnerbinding
binding
(class-instance
(class-instancerelationship)
relationship)
Component
Layer
AA B
Component
Component
SEFM’04
Coordination contracts 53
SEFM’04
Notation 54
SEFM’04
Notation 55
SEFM’04
Intuitive semantics 56
SEFM’04
Another FAQ… 57
SEFM’04
The answer to the FAQ 58
SEFM’04
Coordination runs in Java… 59
The
Coordination
Development
Environment
can be downloaded from
www.atxsoftware.com/CDE
SEFM’04
However 60
Mobility
A new factor of complexity in the development of
software systems (Web, mobile communication) that
cannot be relegated to lower level design.
SEFM’04
However 61
Business
Many businesses are selling the same services through
different channels, each of which has specific features.
SEFM’04
Architectures for Mobility 62
X
Y
A Y B Y A F Coordination
G
A B
C
X C
F
C
Computation
F
G
Distribution
SEFM’04
Location laws 63
SEFM’04
Be in touch 64
SEFM’04
Reach 65
SEFM’04
Location interfaces 66
SEFM’04
Instantiation 67
standard
VIP
withdrawal
BANK ATM
withdrawal withdrawal
SEFM’04
Other Work 68
SEFM’04
Other Work 69
Mathematical semantics in
Context-awareness
SEFM’04
Join us… 70
SEFM’04