Title: Managing Variability with Koala
1Managing Variability with Koala
Rob van Ommering Philips Research IPA Lentedagen
2005, April 1st, 2005
2Introducing my domain
1979
1965
2000
1990
3(1) Complexity
4(2) Diversity
Price
Image
UTV
quality
Connectivity
Sound
1394
AC3
100 Hz
P50
Dolby
Broadcasting Standard
AP
US
Region
Eu
DTV
MTV
TiVo
Txt
menus
EPG
TVCR
Data Processing
PTV
animation
HD
DVD
Storage Device
3D
FTV
LCTV
VCR
User Interface
Video Output Device
5(3) Lead Time
- Was
- Yearly cycle of product introduction
- Christmas
- World championship
- Is
- Decreasing to 6 or 3 months
- Otherwise loose shelf space in shop
6Related product families
7Convergence
8Recent examples of convergence
9Summary
Software Grows Exponentially (Moores Law)
Need more people... Need more time...
Shorter lead time More product variation...
Market demands...
10 Decomposition paradigm
Composition paradigm
Product Family
Product Population
Application Domain
Product
Everything
A specific TV
TV, FTV, PTV
TV, VCR, DVD, ...
All CE Products
World
Separate product information from component
information
11A product population is
- a set of products with many commonalities, -
but also with many differences, - developed by
different sub organizations, - each with its own
time-line / lifecycle.
SingleProduct
ProductFamily
ProductPopulation
UnrelatedProducts
DecompositionDedicated components
CompositionCOTS
12Koala is
- a component model - with an ADL - to build
populations of - resource constrained products
13Koala 101
14Component
A Koala component is - a unit of
design/implementation - a unit of reuse
CTuner
Compare a Koala component to - a Java or .Net
class - a COM coclass
component CTuner
A component is described in CDL (Component
Definition Language)
15Provides Interface
A Koala interface is - a unit of specification
- a unit of binding
interface ITuner void Tune(int freq)
p CTuner
Compare a Koala interface to - a Java or .Net
interface - a COM interface
component CTuner provides ITuner p
An interface is described in IDL (Interface
Definition Language)
16Provides Interfaces
interface IInit void Init(void)
interface ITuner void Tune(int freq)
i p CTuner
A component may (and usually will) provide more
than one interface.
component CTuner provides IInit i
ITuner p
An interface is a small set of functions that are
semantically related.
17Commonality and Variation
Commonality
Variation
ISearchTuner
ITuner
ITuner
IInit
IInit
CTuner
CSearchTuner
IVideo
IInit
CVideo
Components in the repository
18Requires Interfaces
interface IInit void Init(void)
interface ITuner void Tune(int freq)
component CTuner provides IInit i
ITuner p requires IRtk r
IMem m
i p CTuner r m
Components access functions in their environment
through explicit requires interfaces
interface IRtk Sem CreateSem()
interface IMem void malloc(int size)
19A Product
Also a component!
CProduct
CApp
component CProduct contains
component CApp app component CTuner
tun component CRtk rtk
component CMem mem connects app.i
tun.i app.p tun.p tun.r
rtk.r tun.m rtk.m
CTuner
CRtk
CMem
20Another Product
CProduct2
CApp2
Same!
CTuner
Different!
CRtk2
CMem2
Requires interfaces are variation points!
21Compound Component
The component model is recursive
CPlatform
CTuner
component CPlatform provides
requires contains
connects
CMem
22Glue Module
CTuner
Sometimes interfaces are not connected 11
component CXxx contains component
CTuner tun component COs os
module m connects tun.m m
m os.m
We can then insert a glue module
COs
Examples- interface mismatch- tracing /
logging- special strategies
23Code Module
We also use modules to implement a component
component C provides I1 p1 I2 p2
I3 p3 requires Ia ra Ib rb Ic rc
contains module m1, m2 connects
p1 m1 p2 m1 p3 m2
m1 ra m1 rb m2
rb m2 rc
There is no distinction between code and glue
modules!
24Implementing a Module
Interface functions can be implemented in CDL
component CProduct . connects
within m1 p1.f(x)
ra.g(2x)
or in the underlying implementation language
(following the language binding conventions)
25Diversity Interface
interface IDiv bool Fast int Color
Component can be parameterized
C
component C requires IDiv div
to postpone certain decisions to product time
26Switch
Also the binding decision can be postponed.
C1
component C provides requires
contains connects switch div.Fast
in c1.r out c2.p on
false, c3.p on true
A switch can be statically evaluated or converted
into run-time code.
27Diversity Spreadsheet
Parameters of subcomponents can be partially
filled in
and partially diverted to parameters of the
compound component
28Optional Interface
Parameters of subcomponents can be partially
filled in
C
component C provides requires
IX r optional
and partially diverted to parameters of the
compound component
29Sub-typing and evolution
IA
IB
IA
IB
IC
IB ? IB
Koala subtypes interfacesbased on set inclusion
offunctions
C
C
C ? C
Provide more...
IB- ? IB
Koala reports an error if anon-existing
interface isbound!
C
C
C ? C
IA
IB-
IA
IB
IC
Require less???
30Reflection
A component can observe whether interfaces are
actually connected.
C1
This allows components to adapt themselves to
their environment automatically.
31My old digital camera
Dedicated
Dedicated
Dedicated
32The one I wanted to buy
33The one I bought
All general purpose components!
34One snag though
Can do 110 Volts and 220 Volts
35Self-configuring components
Components specify howmany resources they require
C1
C3
C1
This can be summed and provided tothe component
that delivers theresources at the product level
36Multi threading
Problem many (100) activities but few (threads
Step 1 use message pumps created on virtual
pump engines required through a diversity
interface
C3
Different thread, Synchronisation required
CFireBrigade
Step 2 bind these to pump engines (a real
dispatcher loop)
C2
Same thread, No synchronisation required
C1
37Threading Analysis
Attribute interfaces witha symbolic thread label
a
b
b
a
b
c
38Threading calculus
a
a
a
X
X
a
b
a
X
X
a
c
a
X
O
a
d
a
39Unification
q must besame as p
Thread labelsare unified
p
p
q
a
b
b
Prepared forcall on differentthreads, but
calledon the same thread
a
b
c
C is a new thread,and cannot beequal to q
p
p
q
40(No Transcript)
41Using Koala
42Our approach
43Domain vs application engineering
Products
Application
Architecture
Domain
Subsystems
44Yawnocs Law
- The structure of the organization should mirror
the architecture of the software. - Surprisingly(?), the development managers agree,
but the architects protest
Source David Weiss
45In-house versus 3rd party
Source-code in MBytes
46Leveraging Architecture
?
47The End