b721a8fa606c482fbd9a79c952fedb0c.ppt
- Количество слайдов: 47
Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005
Introducing my domain… 1965 1979 1 k. B Moore’s Law 2000 2 MB © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 1990 64 k. B 2
(1) Complexity © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 3
Price (2) Diversity Image UTV Connectivity quality Sound 1394 AC 3 100 Hz P 50 Dolby Broadcasting Standard Eu DTV AP US Region MTV Ti. Vo Txt menus TVCR EPG PTV HD Data Processing animation DVD Storage Device 3 D VCR FTV LCTV Video Output Device © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 User Interface 4
(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 © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 5
Related product families VCR DVD © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 STB Audio 6
Convergence TV + VCR = TVCR TV + DVD = TV-DVD TV + HD = Tivo TV + STB = Digital TV TV + Audio = Home Theater © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 7
Recent examples of convergence… PDA + GPS GSM + Dig. Cam GPS + GSM CD-RW, DVD, Card, TV © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 PDA + GSM + Dig. Cam 8
Summary… Software Grows Exponentially (Moore’s Law) Need more people. . . Need more time. . . Market demands. . . Shorter lead time… More product variation. . . © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 9
Decomposition paradigm Product Family A specific TV TV, FTV, PTV Composition paradigm Product Population TV, VCR, DVD, . . . Application Domain All CE Products Everything World Separate product information from component information © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 10
A 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. Single Product Family Decomposition Dedicated components © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 Product Population Unrelated Products Composition COTS 11
Koala is… - a component model - with an ADL - to build populations of - resource constrained products CC C 1 C 2 C 3 © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 12
Koala 101 © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 13
Component A Koala component is: - a unit of design/implementation - a unit of reuse Compare a Koala component to: - a Java or. Net class - a COM coclass A component is described in CDL (Component Definition Language) © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 CTuner component CTuner { … } 14
Provides Interface A Koala interface is: - a unit of specification - a unit of binding Compare a Koala interface to: - a Java or. Net interface - a COM interface An interface is described in IDL (Interface Definition Language) © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 interface ITuner { void Tune(int freq); } p CTuner component CTuner { provides ITuner p; } 15
Provides Interfaces interface IInit { void Init(void); } A component may (and usually will) provide more than one interface. An interface is a small set of functions that are semantically related. © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 interface ITuner { void Tune(int freq); } i p CTuner component CTuner { provides IInit i; ITuner p; } 16
ITuner CSearch. Tuner IVideo IInit CTuner IInit ITuner Variation IInit Commonality ISearch. Tuner Commonality and Variation CVideo © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 Components in the repository 17
Requires Interfaces interface IInit { void Init(void); } Components access functions in their environment through explicit requires interface IRtk { Sem Create. Sem(); } © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 interface ITuner { void Tune(int freq); } i p CTuner r m component CTuner { provides IInit i; ITuner p; requires IRtk r; IMem m; } interface IMem { void *malloc(int size); } 18
A 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 © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 19
Another Product CProduct 2 CApp 2 Same! Different! CTuner CRtk 2 CMem 2 © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 Requires interfaces are variation points! 20
Compound Component The component model is recursive CPlatform CTuner CMem © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 component CPlatform { provides … requires … contains … connects … } 21
Glue Module Sometimes interfaces are not connected 1: 1 CTuner We can then insert a glue module Examples: - interface mismatch - tracing / logging - special strategies © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 COs component CXxx { contains component CTuner tun; component COs os; module m; connects tun. m = m; m = os. m; … } 22
Code Module We also use modules to implement a component There is no distinction between code and glue modules! © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 component C { provides I 1 p 1; I 2 p 2; I 3 p 3; requires Ia ra; Ib rb; Ic rc; contains module m 1, m 2; connects p 1 = m 1; p 2 = m 1; p 3 = m 2; m 1 = ra; m 1 = rb; m 2 = rc; } 23
Implementing a Module Interface functions can be implemented in CDL… …or in the underlying implementation language (following the language binding conventions) © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 component CProduct { …. connects within m 1 { p 1. f(x) = ra. g(2*x); … } } 24
Diversity Interface interface IDiv { bool Fast; int Color; } Component can be parameterized… C …to postpone certain decisions to product time © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 component C { requires IDiv div; } 25
Switch Also the binding decision can be postponed. C 1 A switch can be statically evaluated or converted into run-time code. © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 C 2 C 3 component C { provides … requires … contains … connects switch div. Fast in { c 1. r } out { c 2. p } on false, { c 3. p } on true; } 26
Diversity Spreadsheet Parameters of subcomponents can be partially filled in… … and partially diverted to parameters of the compound component © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 C 1 C 2 27
Optional 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 © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 28
Sub-typing and evolution IA IB+ IC IB+ IB C C’ C’ C Koala subtypes interfaces based on set inclusion of functions Provide more. . . IB- IB C C’ C’ C IA IB IC Koala reports an error if a non-existing interface is bound…! IA IB- Require less…? ? ? © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 29
Reflection A component can observe whether interfaces are actually connected. C 1 This allows components to adapt themselves to their environment automatically. © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 30
My old digital camera… Dedicated “Dedicated” © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 31
The one I wanted to buy… © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 32
The one I bought… All general purpose components! © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 33
One snag though… But be careful! Can do 110 Volts and 220 Volts © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 34
Self-configuring components Components specify how many resources they require C 1 C 3 + C 1 This can be summed and provided to the component that delivers the resources at the product level © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 35
Multi threading Problem: many (>100) activities but few (<10) threads Step 2: bind these to pump engines (a real dispatcher loop) C 3 CFire. Brigade Step 1: use message pumps created on virtual pump engines required through a diversity interface Same thread, No synchronisation required © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 Different thread, Synchronisation required C 2 C 1 36
Threading Analysis Attribute interfaces with a symbolic thread label b b * a © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 a b c * 37
Threading calculus a a * * X X a b a * X a c X * * X a d © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 a O * a * 38
Unification q must be same as p Thread labels are unified p q a b b a b c p Prepared for call on different threads, but called on the same thread p p q © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 C is a new thread, and cannot be equal to q 39
© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 40
Using Koala © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 41
Our approach… Under a common architecture. . . … executed in projects! … a set of subsystems is developed. . . © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 …with which products can be built. . . 42
Domain vs application engineering Products Application Architecture Domain Subsystems © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 43
The structure of the organization should mirror the architecture of the software. Brugge Briarcliff Southampton Eindhoven Hamburg Source: David Weiss Yawnoc’s Law Wien Sunnyvale Knoxville Bangalore Singapore Surprisingly(? ), the development managers agree, but the architects protest… © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 44
In-house versus 3 rd party Source-code in MBytes © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 45
Leveraging & Architecture OS Middleware A/V platform OS Applications A/V platform Applications Middleware ? Drivers © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 46
The End © 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1 st 2005 47
b721a8fa606c482fbd9a79c952fedb0c.ppt