48
Chapter 9, System Design – Addressing Design Goals O O Object-Oriented Software Construction Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit)

Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Chapter 9, System Design – Addressing Design Goals

O OObject-Oriented

SoftwareConstruction

Armin B. Cremers, Tobias Rho, Daniel Speicher & , , pHolger Mügge

(based on Bruegge & Dutoit)

Page 2: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Software Lifecycle Activities...and their models

SystemDesign

ObjectDesign

Implemen-tation TestingRequirements

Elicitation Analysis

Expressed in Terms of

Structured by

Realized by

Implemented by

Verified by

class...class...

by y

Sub-

class...class...

SourceSolution Domain

ApplicationDomain Test

? class....?

Use Case

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 2

Sub-systems

SourceCode

Domain Objects

Domain Objects

Test Cases

Use CaseModel

Page 3: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

OverviewFour Sessions on System Design

♦ System Design I – Software ArchitectureSystem Design ConceptsSystem Design ConceptsSubsystem Decomposition

♦ System Design II – Architecture OrganizationHardware/Software MappingPersistent Data ManagementPersistent Data ManagementGlobal Resource Handling and Access ControlSoftware ControlBoundary Conditions

System Design III Addressing Design GoalsToday

♦ System Design III - Addressing Design GoalsTactics for Performance, Security, Availability, Modifiability

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 3

Page 4: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Non-functional requirements (NFR)

♦ Non-functional requirements define the overall qualities or attributes of the resulting systemthe resulting system

♦ Non-functional requirements place restrictions on the product being developed, the development process, and specify external constraints th t th d t t tthat the product must meet.

♦ Some non-functional requirements can be rephrased as functional♦ Some non functional requirements can be rephrased as functional requirements

P j t t i ( t ti h d l ) ft♦ Project management issues (costs, time, schedule) are often considered as non-functional requirements as well

not handled in this session

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 4

Page 5: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

List of Non-Functional Requirements♦ Reliability♦ Modifiability

♦ Good documentation♦ Well-defined interfaces

♦ Maintainability♦ Understandability♦ Adaptability

♦ Usability♦ Reuse of components♦ Rapid development♦ Adaptability

♦ Availability♦ Efficiency

P t bilit

♦ Rapid development♦ Minimum # of errors♦ Readability

♦ Portability♦ Traceability of requirements♦ Fault tolerance

♦ Ease of learning♦ Ease of remembering♦ Ease of use

♦ Performance♦ Cost-effectiveness

Robustness

♦ Ease of use♦ Increased productivity♦ Low-cost

♦ Robustness♦ High-performance

♦ Flexibility♦ Tailorability

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 5

Page 6: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Relationship Between Roles & NFRs

End UserUsability

Low cost Increased ProductivityBackward Compatibility

RuntimeEfficiency

yFunctionalityUser-friendlinessEase of UseEase of learning

Reliability

Backward-CompatibilityTraceability of requirementsRapid developmentFlexibility

EfficiencyAvailability

Ease of learningFault tolerantRobustness

Reliabilityy

Client, Customer, Good Documentation

Sponsor

Minimum # of errors

Developer/Maintainer

Modifiability, ReadabilityReusability, AdaptabilityWell-defined interfaces,Tailorability

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 6

MaintainerTailorability

Page 7: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Insertion of NFRs in Use CasesTextual Representation

♦ Normally informal and high-level representation during the y g p grequirements phases:

Example (Performance):The response time shall be fast enough to avoid interrupting theThe response time shall be fast enough to avoid interrupting the user's flow of thought

♦ A bit more accuracy is useful:y

Example (Performance):Any interface between a user and the automated system shall have a maximum response time of 2 secondsmaximum response time of 2 seconds

♦ Quantitative and accurate non-functional requirements can be verified and tested during:verified and tested during:

Implementation (unit testing)Prototyping (during requirements)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 7

yp g ( g q )Testing (acceptance)

Page 8: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

From non-functional requirements towards design goals

♦ Interpreting nonfunctional requirements as concrete design goals for

g g

p g q g gthe chosen software architecture

♦ Turning high-level description towards more meaningful design statementsstatements

♦ Achievement of design goals relies on fundamental design decisions ll d t tior so-called tactics

♦ Much more technical background and experience is required♦ Much more technical background and experience is required

♦ Next: Presentation of tactics:Performance, Availability, Modifiability, Usability

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 8

Page 9: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsPropertiesp

♦ Availability quantifiesth t t l ti f t t d t dthe total up-time of a system as requested or expected by end-users.

• quantifies the total allowable failure rate of a system (i.e. when it no longer delivers a service consistent with the specification)

• Areas of concern:

• Failure Detection: How are failures detected?

• Failure Handling: How can occurred failures be handled?

• Failure Prevention: How can failures be avoided?

• Failure Notification: What kinds of notification are needed for delegating the event of a failure?

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 9

Page 10: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsFault Detection

Ping/echo

:clientComponent

:supplierComponent

sendPing()

confirmPing( data )[t exceeds]

Heartbeat

[t exceeds] handleException

:clientComponent

:supplierComponent

register()

sendHeartBeat( data )Component ComponentsendHeartBeat( data )[t exceeds]

handleException

♦ If the confirmation (heartbeat) is not received after a pre-defined time, the supplier component is said to be failed

♦ Local registry in the client component needed

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 10

g y p♦ Usually used for distributed architectures

Page 11: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsFault Detection

Exception Handling

:clientComponent

:supplierComponent

delegateException:3rdpartyComponent

SupplierComponent supplier = …;try {

handleException

try {supplier.useMethod( );….

}catch (UnavailabilityException e) {( y p ) {

handleException( );}

♦ Checked vs. unchecked Exceptions♦ Chain of Responsibility Design Pattern (Exception Delegation)♦ Usually used for local architectures but also for distributed ones (cf

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 11

♦ Usually used for local architectures, but also for distributed ones (cf. Sun’s RMI technology)

Page 12: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Exceptions in Java – Unchecked

♦ Runtime Exceptionsthe special case for exceptions (subtype RuntimeException)are not declared

i ll i t d f l ltmay occur in any call instead of a normal resultcaller may or may not catch them (call in try-block)if not catched the program/thread terminates and informationif not catched the program/thread terminates and information about the exception is printed to error output streamare used for unexpected exceptionare used when the caller typically can not repair the cause

♦ ExamplesArrayIndexOutOfBoundsCl C t

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 12

ClassCast

Page 13: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Exceptions in Java – Checked

♦ Statically checked Exceptionsthe standard case of exceptionsare declared in the method signature

l h d l d b h k d t ilcan occur only when declared => can be checked at compile timecaller must either catch or throw them further up the call stackpare used for “expected” exceptionsare used when the caller probably can help or react

i f lmeaningful♦ Example

Cl N tF dClassNotFoundIOException

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 13

Page 14: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Java Exception Class Hierarchy

• Throwable:superclass of all errors and exceptionssuperclass of all errors and exceptions

• Exceptions:signal abnormal conditions that cansignal abnormal conditions that can often be handled by some catcher

• Error:more serious problems, such as OutOfMemoryError

RuntimeException:Unchecked • RuntimeException:unchecked Exceptions

Unchecked

Unchecked

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 14

Page 15: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Using Exceptions in Java (1/2)

What about this?

try {// do something that can throw an exception.

} catch (ClassNotFoundException cnf exc) {catch (ClassNotFoundException cnf_exc) {}

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 15

Page 16: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Using Exceptions in Java (2/2)

… and what about this?

try {// do something that can throw an exception.

} catch (Exception e) {catch (Exception e) {

log(e); // logs to a persistent error log}}

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 16

Page 17: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Criteria on using Exceptions

Condition Contingency FaultIs considered to be A part of the design A nasty surpriseIs expected to happen Regularly but rarely Never

The upstream code that The people who need toWho cares about it The upstream code that invokes the method

The people who need to fix the problemProgramming bugs, h d lf ti

Examples Alternative return modeshardware malfunctions, configuration mistakes, missing files, unavailable serversservers

Best Mapping A checked exception An unchecked exception

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 17

Page 18: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Links about Exception Handling

♦ Bruce Eckel: (use only unchecked exceptions!)http://www.mindview.net/Etc/Discussions/CheckedExceptions

S ( l h k d ti !)♦ Sun: (always use checked exceptions!)java.sun.com/docs/books/tutorial/essential/exceptions/index.html

♦ Barry Ruzek: (differentiated view)http://dev2dev bea com/pub/a/2006/11/effective exceptions htmlhttp://dev2dev.bea.com/pub/a/2006/11/effective-exceptions.html

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 18

Page 19: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsFault Handling

Client-sided switch to alternative component

:supplierComponent1

:registryComponent

:clientComponent :supplier redundant

querypublish

p

♦ Upon failure a client locates an alternative supplier component

:supplierComponent2

redundantComponent

♦ Upon failure, a client locates an alternative supplier component which has an equivalent service

♦ Often mastered in combination with a global directory (SOA)♦ No coordination between supplier components, state of old supplier

component is lost♦ Scenario: Architecture with many state-less services (e.g. printer

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 19

y ( g pservice, atomic transactions)

Page 20: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsFault Handling

Active Redundancy (1/2)

:supplierComponent

e

:clientComponent

:supplierComponent

redundantComponentsBr

idge

:supplierComponent

♦ Request to a service is delegated by “Bridge” to all redundant supplier components

♦ Response is produced in parallel by all redundant components, “Bridge” takes the first as the response for the clientAll components are in the same state

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 20

All components are in the same state♦ Fault Handling: Rely on redundant component

Page 21: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsFault Handling

Active Redundancy (2/2)

:supplierComponent

e

:clientComponent

:supplierComponent

redundantComponentsBr

idge

:supplierComponent

♦ Bridge can be part of the client♦ Scenario: Architecture with stateful services, with quick responses , q p

even when a failure occurs♦ Drawbacks: massive resources needed, communication overhead,

reliable communications paths needed

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 21

reliable communications paths needed

Page 22: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsFault Handling

Voting

:supplierComponent

r:clientComponent

:supplierComponentVo

ter

equivalentinput

:supplierComponent

♦ Voter is capable of detecting faulty behavior of a single component. Upon detection, it skips the answer and waits for the next result.

♦ Detection of faulty algorithm and failure of components♦ Scenario: control systems with sensors as inputs

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 22

Page 23: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Availability TacticsFault Handling

Handling failure of non-redundant components

:clientComponent

:supplierComponent

handleException

♦ So far: all handling mechanisms assumed redundant componentsRedundancy cannot always be guaranteed or is not desiredRedundancy cannot always be guaranteed or is not desired

♦ Failure of non-redundant component: many possible options (context-dependent):

Integration of user to enhance decision makingLocal replacement or adaptation of componentDiscard of functionality

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 23

Discard of functionality♦ Scenario: Architecture holding crucial, secure data as a singleton

Page 24: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsProperties

♦ Supportability requirements are concerned with the ease of changes to the system after deployment Classes:to the system after deployment. Classes:

♦ AdaptabilityThe ability to change the system to deal with additional application domain concepts (adaptivity = autonomous adaptation)

♦ TailorabilityEnd-Users are able to make modification to a system during runtimeEnd-Users are able to make modification to a system during runtime

♦ Areas of concern:Localize and anticipate changesDefer design decisionTailorabilityTailorabilityPolicy-based agreements (cf. Performance)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 24

Page 25: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsLocalize Changes

Coupling – Reduction of consequencesCh h ld ff di l d d♦ Changes to a component should not affect directly dependent components

♦ Coupling metrics can be used to localize changes (cf. chapter 7)p g g ( p )

Identify Common Components – Reduction of costs:

:commonComponent

:concrete:concrete:concreteComponentCComponentBComponentA

♦ Modification to a common component only need to be done once rather f

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 25

than in each concrete component, where the service of that component is used (trade-off to coupling)

Page 26: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsDependency Types

:ComponentB:ComponentA

♦ Semantics of data and servicePre and Postcondition (cf Object Design)Pre- and Postcondition (cf. Object Design)

♦ Sequence of DataReception of data in a fixed orderp

♦ LocationRuntime location of B must be consistent with the assumptions of A (e g fixed address)(e.g. fixed address)

♦ Quality of Service

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 26

Page 27: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsLocation Tactics

:NameServer updateLocation( name, address )retrieve( name )

:ComponentB:ComponentA

♦ A name server (index) enables the location of A to be changed without affecting component Bwithout affecting component B

♦ B must maintain its current location♦ A can retrieve the current location of B with a specific key:

retrieve ( “ComponentB”) = 141.26.14.5♦ Scenario: distributed architectures with mobile services, unfixed

addresses (DHCP)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 27

addresses (DHCP)

Page 28: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsAnticipate changes

♦ Anticipate which component should be modified due to♦ Anticipate which component should be modified due toNew technologyNew implementation for an algorithmNew subcomponent by a new vendorNew error types

♦ Application of design patternsExample: Strategy Pattern for inserting and using different concrete algorithms at runtime (algorithms accord to a common abstract abstraction (strategy))

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 28

Page 29: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsDefer design decision

♦ Conventional development: all design decisions are made by developers during development

Result: monolithic architectures, no modification possible after deploymentdeployment

♦ Defer design decisions: Shift design decisions to the deployment time of the architecture

Non-developers (end-users) or administrator are able to modify the architecture

Deployment time: start- and runtime of the software

Result: open, flexible architecture

♦ Cost: Additional infrastructure to support late design decision

♦ Easy example: Configuration files

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 29

♦ Most common technique: late binding ( defer binding time)

Page 30: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsDefer design decision

Runtime Registration of Component (Hot deployment)

:client :supplier Serv

ice

Component Component

Mod

ific

atio

nS

Container Component

♦ Additional Container (Runtime Environment) component allows for:

M

Loading new componentsDefining new bindingsDeleting existing componentsDeleting existing componentsConfiguration of single componentsConfiguration of non-functional requirements (e.g. security)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 30

Configuration of implicit services (e.g. persistency of data, transactional behavior) … tbc …

Page 31: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsDefer design decision

Runtime Registration of Component (Hot deployment)

:client :supplier Serv

ice

Component Component

Mod

ific

atio

nS

Container Component

Defining workflow structuresf

M

Defining exception handling♦ Technical concerns

Adoption of dynamic object binding (polymorphism) cf chapter 2Adoption of dynamic object binding (polymorphism) cf. chapter 2Design PatternsClass loading mechanisms (e.g. in Java)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 31

Reflection (runtime analysis of classes)

Page 32: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsDefer design decision

Runtime Registration of Component (Hot deployment)

:client :supplier Serv

ice

Component Component

Mod

ific

atio

nS

Container Component

♦ Storage concerns

M

Storage of any design decision in flat files (deployment descriptor)Easy to read and to manipulate

♦ Examples:♦ Examples:Enterprise Java Beans (EJB)CORBA Component Architecture (CCM)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 32

Page 33: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsTailorability

Fields of application are differentiated and dynamically changingNew tasks and working contexts arise Instant modification often necessary

Tailorability is definedchanging aspects of an application‘s functionalitychanging aspects of an application s functionalityin a persistent wayduring the use of an application (at runtime)by end-users or local experts

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 33

Page 34: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Modifiability TacticsTailorability

♦ Problem: U d t h i ith t il iUser do not have experience with tailoring

♦ Goal: Provide tailoring routines on different levels of complexityProvide tailoring routines on different levels of complexity

♦ End-user with little experience can adopt to less complex routines♦ More experienced may use more sophisticated routines♦ Proposed Levels:

CustomizationModification of presentation objects among a set of pre definedModification of presentation objects among a set of pre-defined configuration options

IntegrationCreation or the combination of (existing) program behavior that results inCreation or the combination of (existing) program behavior that results in new behavior

ExtensionAddi l t l b h i ( i l t ti )

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 34

Adding completely new behavior ( re-implementation)

Page 35: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Performance TacticsProperties

♦ Performance requirements concern the speed of operationof a systemof a system

♦ Types of performance requirements:Response requirements (how quickly the system reacts to a user input)Throughput requirements (how much the system can accomplish within a specified amount of time))

♦ Areas of concernsReduction of computational overheadScheduling of eventsPolicy-based regulationsPolicy based regulations

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 35

Page 36: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Performance TacticsReduction of computational overhead (1/2)

liEvents are produced

d iResponse generated withinimplied time constraints:supplier

Componentand arrive implied time constraints

♦ Increase computational efficiency of supplier componentInspection of chosen algorithm p g

♦ Manage events rate from the perspective of the clients♦ Place a limit on execution time that is used to respond to an event

Scenario: iterative data processing: limit the number of iterations♦ Introduce efficient caching/queue structures

Fix a maxim number of events in such structureFix a maxim number of events in such structure♦ Provide more efficient communication path

Example: avoid marshalling of data (cf. RMI vs. direct object interaction)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 36

Page 37: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Performance TacticsReduction of computational overhead (2/2)

liEvents are produced

d iResponse generated withinimplied time constraints:supplier

Componentand arrive implied time constraints

♦ Bypass high layers in a layered architecture (open architecture!)♦ Introduce concurrency when events can be processed in parallely p p♦ Establish and maintain multiple copies of input events (data)

Degree of concurrency can be increasedData consistency must be ensured

♦ Increase available resourcesFaster processors additional resourcesFaster processors, additional resourcesCost vs. performance trade-off

♦ Scheduling of events to reduce contention for a resource

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 37

Page 38: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Performance TacticsScheduling of events

♦ A scheduler manages the assignment events to a resource R CPU b ff t kResource: CPU, buffer, network

♦ Two different parts:Priority assignment of eventsPriority assignment of eventsDispatching of events to a resource

♦ Prominent Scheduling implementationsFirst-in/First-out (FIFO)

No Assignment of priorities all events are equalNo Assignment of priorities, all events are equalFixed-priority scheduling

Semantic importance (assign priority to events w.r.t. to domain characteristic)characteristic)Deadline monotonic (assign higher priority to events with shorter deadlines)Rate Monotonic (assign higher priority to events with shorter periods)

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 38

Page 39: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Performance TacticsPolicy-based Regulations

:client :supplierComponent

ppComponent

Service contract between “client” and “supplier”:Availability: between 10 p.m. and 11 p.m.

♦ A policy regulates the interaction between client and supplier in terms of a contract (contract based collaboration)

Availability: between 10 p.m. and 11 p.m.

a contract (contract-based collaboration)SOA: Service Level Agreement (SLA)

♦ Different issues can be definedAvailability of a serviceGuaranteed performance of a serviceM difi ti ( tifi ti b f d t ti )

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 39

Modification concerns (e.g. notification before an adaptation occurs)

Page 40: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Performance TacticsPolicy-based Regulations

:client :supplierComponent

ppComponent

Service contract between “client” and “supplier”:Availability: between 10 p.m. and 11 p.m.

♦ The violation of a contract can limit the trustworthiness of a provider for future applications

Availability: between 10 p.m. and 11 p.m.

future applications♦ Reputation and trust models ( Peer-to-Peer architectures, ebay)♦ Establishment of contracts based on social negotiation between usersg♦ No real standards have emerged so far

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 40

Page 41: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Usability TacticsProperties

♦ Usability is concerned with how easy it is for the user to accomplish a desired task and the kind of support the system provides to the userdesired task and the kind of support the system provides to the user

♦ Usability is the ease with which a user can learn to operate, prepare inputs for, and interpret outputs of system or component

♦ Areas of concernsRuntime aspects (Nielsen’s heuristics)u e aspec s ( e se s eu s cs)

Support user during system executionUser interface design

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 41

Page 42: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Usability TacticsPrinciples according to Nielsenp g

♦ Visibility of system status♦ Visibility of system status♦ Match between system and the real world♦ User control and freedom♦ Consistency and standards♦ Recognition rather than recall♦ Aesthetic and minimalist design♦ Help users recognize, diagnose, and recover from errors♦ Help and documentation♦ Help and documentation

♦ Called “Nielsen’s heuristics of usability”, 1994♦ http://www.useit.com/

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 42

Page 43: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Usability TacticsPrinciples according to Nielsen (1/3)

Visibility of system status♦ The system should always keep users informed about what is going on,

through appropriate feedback within reasonable time♦ For example pay attention to response time♦ For example, pay attention to response time

0.1 sec: no special indicators needed 1.0 sec: user tends to lose track of data 10 sec: max duration if user to stay focused on action

♦ for longer delays, use percent-done progress bars

searching database for matches

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 43

Page 44: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Usability TacticsPrinciples according to Nielsen (2/3)

Match between system & real worldy♦ The system should speak the users' language, with words, phrases

and concepts familiar to the user, rather than system-oriented terms. Follow real world conventions making information appear in a natural♦ Follow real-world conventions, making information appear in a natural and logical order

♦ Bad example (old) Mac and Amiga desktopDragging disk to trashlogically should delete it, not eject it

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 44

Page 45: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Usability TacticsPrinciples according to Nielsen (3/3)

User control & freedom♦ Users often choose system functions by mistake and will need a

clearly marked "emergency exit" to leave the unwanted state without having to go through an extended dialogue.

♦ Support undo, cancel and redo♦ Wizards

“Surf” between statesSurf between statesFor infrequent tasks (e.g., modem configuration.)Not for common tasksGood for beginners

have 2 versions (WinZip), no fixed paths

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 45

Page 46: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Usability TacticsUser model

♦ During system execution, it must rely on some information of the user (user model) Contents:(user model). Contents:

User knowledge of the system or environmentUser Preferences (e.g. style of interface, response time)Location based information (e.g. residence, coordinates)Domain related preferences (e.g. hobbies, activities)

♦ Scenario: Location-based services

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 46

Page 47: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Usability TacticsUser interface design

♦ Many guidelines availableL t ( J )Layout manager (e.g. Java)Styles: MVC

♦ Basic message: separate user interface from the rest of the application

R U i t f i t d t h f tl d iReason: User interface is expected to change frequently during development and deploymentSeparation: localize changes

♦ More information:http://www.cs.uni-bonn.de/III/lehre/vorlesungen/SWT/RE05/slides/10 Interactive%20Systems.pdfp g _ % y p

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 47

Page 48: Chapter 9, System Design – Addressing Design Goals · Non-functional requirements (NFR) ♦Non-functional requirements define the overall qualities or attributes of the resulting

Summary

♦ Implementing non-functional requirements as design goals into an architecture is no trivial taskarchitecture is no trivial task

Incorporation of many technical issuesMany trade-off situationsyMany experience neededDependencies to many related disciplines

♦ Key success factor for a successful architecture design

Armin B. Cremers, Tobias Rho, Daniel Speicher & Holger Mügge (based on Bruegge & Dutoit) Object-Oriented Software Construction 48