Robust Design Strategies II GruiaCatalin Roman and Christopher
Robust Design Strategies II Gruia-Catalin Roman and Christopher Gill Washington University in St. Louis
Overview 1. Software Architecture Fundamentals 2. Software Architecture Specification 3. Robust Design Strategies 3 • 2
Robust Design Strategies Overview [3. 1] Motivating factors [3. 2] Design principles [3. 3] Architectural styles [3. 4] Design themes and design patterns 3 • 3
3. 3 Architectural Styles n Architectural styles are abstractions for classes of organizational patterns encountered in software engineering practice – structural patterns • composition – behavioral patterns • communication • coordination n n Themes address related design “forces” (specific concerns) Idioms capture frequently encountered “rules of thumb” Patterns capture reusable design solutions for frequently encountered problems Reference architectures relate classical and influential solutions proven in a specific domain 3 • 4
More about Architectural Styles n Characterization – vocabulary – configuration rules – semantics n Benefits – design reuse – predictability – corporate knowledge 3 • 5 n Taxonomic principle – The dominant strategy for separating of concerns • composition • communication • coordination
A Taxonomy of Styles n Composition n – static • • • layered controller client/server pipes and filters peer to peer proxy / object-based – explicit • message passing • event propagation n Coordination – implicit • blackboard • shared tuple space • database/futures – dynamic • object-oriented • software bus • service provision Communication n Emerging styles – new software domains • mobile computing • sensor networks 3 • 6
Style: Layered n n n Components at one layer share access to resources provided by the layer below It is critical to limit or structure sharing Hierarchical structuring facilitates – clean separation of constraints – limited impact of changes 3 • 7 refill controller pressure pump channel A/D converter D/A converter
Style: Controller n System behavior n Complexity control – abstracted as a set of finite state machines – distributed among a small number of decoupled controllers – limited information sharing – synchronization limited to situations that demand consistency among decisions refill controller pressure 3 • 8 – logical and structural separation into multiple modes of operation • simple and uniform transitions rules – object encapsulation of nonfinite state aspects – partitioning of the control logic – state reduction heating controller pump heating element panel controller panel
Style: Client/Server n n Natural extension of procedure calls to distributed computing Components are segregated into clients and servers – Interactions are via remote procedure calls – Servers do not need to know client identities – Clients must know the identity of the servers traffic manager sector manager 3 • 9 safety monitor trains in service emergency controls
Style: Pipes and Filters n n n Independent components process data in an incremental fashion Connectors are mechanisms for supporting data streaming between pairs of components Standardized and compatible interfaces are the key to composition Signal processing, UNIX shells, and image processing are common instances of this style Dataflow – a generalization to arbitrary directed acyclic graphs – image processing, workflow, etc. 3 • 10 satellite data reception packet filtering file, object, etc. image construction
Style: Peer to Peer n n Components are active objects that know (or learn about) each other Interactions are direct Server support is often required for discovery and some coordination Sample applications – music sharing – ad hoc network interactions 3 • 11 Bob Mary video conference connection manager Ann Jim
Style: Proxy (Object-Based) n Interface components decouple access to a resource from the resource itself – resource updates do not affect the clients – different clients may have different views – communication protocols are hidden inside the proxy – proxy may be remote – proxy may be mobile code 3 • 12 architect engineer @ construction plan floor plan mechanical design
Style: Object Oriented n n Components are objects and connectors are method invocations All architectural styles can have object oriented flavor – E. g. , allow substitution n The stereotypical object oriented style entails – web of cooperating objects – reference dissemination is often excessive 30 msec. cruise control wheel current speed driver desired speed brake 3 • 13 throttle
Style: Software Bus n Mechanism for decoupled access to – distributed data – services n n n Static and dynamic object communities are supported Specialized services facilitate object registration, discovery, creation, and invocation CORBA is one standard that facilitates software bus construction 3 • 14 out patient confidential screening specialist radiology blood tests admissions patient records
Style: Service Provision n Service providers register with service registries visitor – specialized ontologies facilitate understanding n Clients guide (proxy) museum service registry – services are discovered by querying service registries – interactions with services are standardized • proxy • service access protocols (e. g. , SOAP) 3 • 15 exhibit item
Style: Message Passing n Connectors are message passing capabilities – port (many to one) – channel (one to one) – mailbox (many to many) n n n Component or connector identity is required to enable communication Bootstrapping requires some initial acquaintance Shared message interpretation and format High degree of decoupling and modularity is achievable Analysis relies on sequence and interaction diagrams 3 • 16 thermostat 243 thermostat 813 thermostat 326 control panel thermostat 713 energy saver
Style: Event Propagation n Publish/subscribe models – are meant to function in distributed settings – achieve a high level of decoupling – client subscribes to specific events – notifications are delivered automatically n Explicit event propagation simplifies the design of reactive systems – low level events are mapped to abstract events – language support is available 3 • 17 0. 2 sec. low pressure refill controller pressure data ready A/D converter pump channel D/A converter pump failure
Style: Blackboard n A shared data repository – stores all key system data – controls system activities through its own state n Other components – communicate with each other via the blackboard – respond to changes in the state of the blackboard n Sample systems – planners – rule-based decision – compilers 3 • 18 trader 1…n regulator 1…m forecaster 1…k stocks and bonds
Style: Shared Tuple Space n The tuple space serves as a central data repository – out inserts a tuple n Retrieval is contents-based (pattern matching) – read obtains a tuple copy – in removes a tuple n n n High level of decoupling Minimal interface Databases – – 3 • 19 large scale complex queries optimized processing reuse checkout 1…n search 1…m inventory 1…k powerful operations needed library catalog
Style: Mobile Computing 3 • 20
Style: Sensor Networks 2 3 4 3 • 21 1
Observations n The architectural style impacts the properties of the system, but only to a certain extent – distinct architectures may share a common style – similar architectures may exhibit distinct properties n n n Design rules may determine the extent to which resulting architectures acquire specific properties Architectural styles may be associated with specific application domains Management and study of architectural styles – is mostly an art … – … but has strong engineering implications 3 • 22
- Slides: 22