1 computer systems & architecture lesson 6 11. building systems from off-the-shelf components

20
1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shel Components

Upload: meagan-kelley

Post on 02-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

1

Computer Systems & Architecture Lesson 6

11. Building Systems from Off-the-Shelf Components

Page 2: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

2

11. Building Systems from Off-the-Shelf Components

ObjectivesObjectives• Explain the impact of components architecture.

• Discuss about architectural mismatch.

• Discuss the components based Design as search.

Page 3: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

3

11.1 Impact of components on architecture

• Consider the following situation. You are producing software to control a chemical plant. Within chemical plants, specialized displays keep the operator informed as to the state of the reactions being controlled.

• A large portion of the software you are constructing is used to draw those displays. A vendor sells user interface controls that produce them.

Page 4: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

4

• Because it is easier to buy than build, you decide to purchase the controls-which, by the way, are only available for Visual Basic.

• What impact does this decision have on your architecture? Either the whole system must be written in Visual Basic with its built-in callback-centered style or the operator portion must be isolated from the rest of the system in some fashion.

Page 5: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

5

• This is a fundamental structural decision, driven by the choice of a single component for a single portion of the system.

• The use of off-the-shelf components in software development, while essential in many cases, also introduces new challenges.

Page 6: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

6

11.2 Architectural mismatch

• Not all components work together-even if they are commercial products that claim compatibility.

• Components are often ‘almost compatible’, where ‘almost’ is a euphemism for ‘not.’

• More insidious is the case where components appear to work together-the assembled code compilers and even executes-but the system produces the wrong answer because the components do not work together quite as expected.

Page 7: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

7

• The errors can be subtle, especially in real-time or parallel systems in which the components might rely on seemingly innocuous assumptions about the timing or relative ordering of each other’s operations.

• In short, components that were not developed specifically for your system may not meet all of your requirements-they may not even work with the components you pair with them.

Page 8: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

8

• Worse, you may not know if they are suitable or not until you buy them and try them because component interfaces are notoriously poor at specifying their quality attributes:

– How secure is the compiler you are using right now?

– How reliable is the mail system on your desktop?

– How accurate is the math library that your application depend on?

Page 9: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

9

• Architectural mismatch is a special case of interface mismatch, where the interface is as Parnas defined it: the assumptions that components can make about each other.

• This definition goes beyond what has, unfortunately, become the standard concept of interface in current practice: a component's API.

Page 10: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

10

• What can you do about interface mismatch? Besides changing your requirements so that yesterday’s bug is today’s feature, there are three things:– Avoid it by carefully specifying and inspecting the

components for your system.– Detect those cases you have not avoided by

careful qualification of the components.– Repair those cases you have detected by adapting

the components.

Page 11: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

11

Techniques for repairing interface mismatch• To date, mismatch correction has received little

systematic attention. • Terms such as ‘component glue’ are evocative of

the character of the integration code and reflect the second-class status we assign to its development.

• Often repairing interface mismatches is seen as a job for hackers whose sense of aesthetics is not offended by the myriad ‘hacks’ involved in integrating off-the-shelf components.

Page 12: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

12

• The alternative to changing the code of one or both mismatched components is to insert code that reconciles their interaction in a way that fixes the mismatch.

• There are three classes of repair code:• Wrappers• Bridges• Mediators

Page 13: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

13

Techniques for detecting interface mismatch

• In order to mismatches, we must first detect or identify them. We present the process of identifying mismatches as an enhanced form of component qualification.

• The term component qualification has been used to describe the process of determining whether a commercial component satisfies various ‘fitness for use’ criteria.

• Some component qualification processes include prototype integration of candidate components as an essential step in qualifying a component.

Page 14: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

14

Techniques for avoiding interface mismatch

• This integration step discovers subtle forms of interface mismatch that are difficult, such as resource contention.

• One technique for avoiding interface mismatch is to undertake, from the earliest phases of design, a disciplined approach to specifying as many assumptions about a component's interface as feasible.

Page 15: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

15

• It is feasible or even possible to specify all of the assumptions a component makes about its environment, or that the components used are allowed to make about it? Of course not.

• Is there any evidence that it is practical to specify an important subset of assumptions, and that it pays to do so? Yes.

Page 16: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

16

11.3 Component-based design as search

• Since component capabilities and liabilities are a principle source of architectural constraint in system development, and since systems use multiple components, component-based system design becomes a search for compatible ensembles of off-the-shelf components that come the closest to meeting the system objectives.

• The architect must determine if it is feasible to integrate the components in each ensemble and, in particular, to evaluate whether an ensemble can live in the architecture and support system requirements.

Page 17: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

17

• In effect, each possible ensemble amounts to a continued path of exploration.

• This exploration should initially focus on the feasibility of the path to make sure there are no significant architectural mismatches that cannot be reasonably adapted.

• It must also take into account the feasibility of the repair and the residual risk remaining once the repair is completed.

Page 18: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

18

• Of course, the simultaneous exploration of multiple path is expensive.

• The focus will be on a primary path with additional paths treated as secondary.

• The important point is to view the selection of components in terms of ensembles rather than singly and to keep in mind that a particular path constitutes a hypothesis to be verified rather than a definitive design.

Page 19: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

19

• An illustration of the model problem work flow is shown in your book page number 464, figure 18.1.

• The process consists of the following six steps that can be executed in sequence.

1. The architect and the engineers identify a design questions.

2. The architect and the engineers define the star.

Page 20: 1 Computer Systems & Architecture Lesson 6 11. Building Systems from Off-the-Shelf Components

20

3. The architect and the engineers define the implementation constraints.

4. The engineers produce a model solution in the design context.

5. The engineers identify ending evaluation criteria.

6. The architect performs an evaluation of the model solution against the ending criteria.