You are on page 1of 30

Designing Architectures

Objectives
 Creativity
u Enhance your skillset
u Provide new tools
 Method
u Focus on highly effective techniques
 Develop judgment: when to develop novel solutions, and when to follow established
method
Engineering Design Process
 Feasibility stage: identifying a set of feasible concepts for the design as a whole
 Preliminary design stage: selection and development of the best concept.
 Detailed design stage: development of engineering descriptions of the concept.
 Planning stage: evaluating and altering the concept to suit the requirements of production,
distribution, consumption and product retirement.
Potential Problems
 If the designer is unable to produce a set of feasible concepts, progress stops.
 As problems and products increase in size and complexity, the probability that any one
individual can successfully perform the first steps decreases.
 The standard approach does not directly address the situation where system design is at
stake, i.e. when relationship between a set of products is at issue.
 à As complexity increases or the experience of the designer is not sufficient, alternative
approaches to the design process must be adopted.
Alternative Design Strategies
 Standard
u Linear model described above
 Cyclic
u Process can revert to an earlier stage
 Parallel
u Independent alternatives are explored in parallel
 Adaptive (“lay tracks as you go”)
u The next design strategy of the design activity is decided at the end of a given stage
 Incremental
u Each stage of development is treated as a task of incrementally improving the
existing design
Identifying a Viable Strategy
 Use fundamental design tools: abstraction and modularity.
u But how?
 Inspiration, where inspiration is needed. Predictable techniques elsewhere.
u But where is creativity required?
 Applying own experience or experience of others.
Abstraction and the Simple Machines
 What concepts should be chosen at the outset of a design task?
u One technique: Search for a “simple machine” that serves as an abstraction of a
potential system that will perform the required task
u For instance, what kind of simple machine makes a software system embedded in a
fax machine?
 At core, it is basically just a little state machine.
 Simple machines provide a plausible first conception of how an application might be built.
 Every application domain has its common simple machines.
Simple Machines
Domain Simple Machines
Graphics Pixel arrays
Transformation matrices
Widgets
Abstract depiction graphs
Word processing Structured documents
Layouts
Process control Finite state machines
Income Tax Software Hypertext
Spreadsheets
Form templates
Web pages Hypertext
Composite documents
Scientific computing Matrices
Mathematical functions
Banking Spreadsheets
Databases
Transactions

Choosing the Level and Terms of Discourse


 Any attempt to use abstraction as a tool must choose a level of discourse, and once that is
chosen, must choose the terms of discourse.
 Alternative 1: initial level of discourse is one of the application as a whole (step-wise
refinement).
 Alternative 2: work, initially, at a level lower than that of the whole application.
u Once several such sub-problems are solved they can be composed together to form
an overall solution
 Alternative 3: work, initially, at a level above that of the desired application.
u E.g. handling simple application input with a general parser.
Separation of Concerns
 Separation of concerns is the subdivision of a problem into (hopefully) independent parts.
 The difficulties arise when the issues are either actually or apparently intertwined.
 Separations of concerns frequently involves many tradeoffs
 Total independence of concepts may not be possible.
 Key example from software architecture: separation of components (computation) from
connectors (communication)
The Grand Tool: Refined Experience
 Experience must be reflected upon and refined.
 The lessons from prior work include not only the lessons of successes, but also the lessons
arising from failure.
 Learn from success and failure of other engineers
u Literature
u Conferences
 Experience can provide that initial feasible set of “alternative arrangements for the design as
a whole”.
Patterns, Styles, and DSSAs

Domain-Specific Software Architectures


 A DSSA is an assemblage of software components
u specialized for a particular type of task (domain),
u generalized for effective use across that domain, and
u composed in a standardized structure (topology) effective for building successful
applications.
 Since DSSAs are specialized for a particular domain they are only of value if one exists for the
domain wherein the engineer is tasked with building a new application.
 DSSAs are the pre-eminent means for maximal reuse of knowledge and prior development
and hence for developing a new architectural design.
Architectural Patterns
 An architectural pattern is a set of architectural design decisions that are applicable to a
recurring design problem, and parameterized to account for different software development
contexts in which that problem appears.
 Architectural patterns are similar to DSSAs but applied “at a lower level” and within a much
narrower scope.
State-Logic-Display: Three-Tiered Pattern
 Application Examples
u Business applications
u Multi-player games
u Web-based applications

Model-View-Controller (MVC)
 Objective: Separation between information, presentation and user interaction.
 When a model object value changes, a notification is sent to the view and to the controller.
So that the view can update itself and the controller can modify the view if its logic so
requires.
 When handling input from the user the windowing system sends the user event to the
controller; If a change is required, the controller updates the model object.

Sense-Compute-Control
Objective: Structuring embedded control applications
The Lunar Lander: A Long-Running Example
 A simple computer game that first appeared in the 1960’s
 Simple concept:
u You (the pilot) control the descent rate of the Apollo-era Lunar Lander
 Throttle setting controls descent engine
 Limited fuel
 Initial altitude and speed preset
 If you land with a descent rate of < 5 fps: you win (whether there’s fuel left
or not)
u “Advanced” version: joystick controls attitude & horizontal motion
Sense-Compute-Control LL

Architectural Styles
 An architectural style is a named collection of architectural design decisions that
 are applicable in a given development context
 constrain architectural design decisions that are specific to a particular
system within that context
 elicit beneficial qualities in each resulting system
 A primary way of characterizing lessons from experience in software system design
 Reflect less domain specificity than architectural patterns
 Useful in determining everything from subroutine structure to top-level application structure
 Many styles exist and we will discuss them in detail in the next lecture
Definitions of Architectural Style
 Definition. An architectural style is a named collection of architectural design decisions that
u are applicable in a given development context
u constrain architectural design decisions that are specific to a particular system
within that context
u elicit beneficial qualities in each resulting system.
 Recurring organizational patterns & idioms
u Established, shared understanding of common design forms
u Mark of mature engineering field.
 Shaw & Garlan
 Abstraction of recurring composition & interaction characteristics in a set of architectures
 Taylor
Basic Properties of Styles
 A vocabulary of design elements
u Component and connector types; data elements
u e.g., pipes, filters, objects, servers
 A set of configuration rules
u Topological constraints that determine allowed compositions of elements
u e.g., a component may be connected to at most two other components
 A semantic interpretation
u Compositions of design elements have well-defined meanings
 Possible analyses of systems built in a style
Benefits of Using Styles
 Design reuse
u Well-understood solutions applied to new problems
 Code reuse
u Shared implementations of invariant aspects of a style
 Understandability of system organization
u A phrase such as “client-server” conveys a lot of information
 Interoperability
u Supported by style standardization
 Style-specific analyses
u Enabled by the constrained design space
 Visualizations
u Style-specific depictions matching engineers’ mental models

Style Analysis Dimensions


 What is the design vocabulary?
u Component and connector types
 What are the allowable structural patterns?
 What is the underlying computational model?
 What are the essential invariants of the style?
 What are common examples of its use?
 What are the (dis)advantages of using the style?
 What are the style’s specializations?
Some Common Styles
 Traditional, language-influenced u
styles  Interpreter
u Main program and u Interpreter
subroutines u Mobile code
u Object-oriented  Implicit invocation
 Layered u Event-based
u Virtual machines u Publish-subscribe
u Client-server  Peer-to-peer
 Data-flow styles  “Derived” styles
u Batch sequential u C2
u Pipe and filter u CORBA
 Shared memory
u Blackboard
u Rule based

Main Program and Subroutines LL


Main Program and Subroutines

Object-Oriented Style
 Components are objects
u Data and associated operations
 Connectors are messages and method invocations
 Style invariants
u Objects are responsible for their internal representation integrity
u Internal representation is hidden from other objects
 Advantages
u “Infinite malleability (flexibility)” of object internals
u System decomposition into sets of interacting agents
 Disadvantages
u Objects must know identities of servers
Object-Oriented LL
The object-oriented design of the Lunar Lander game has three encapsulations: the spacecraft, the
user’s interface, and the environment (essentially a physics model that allows calculation of the
descent rate)

Some details of the object-oriented design are apparent in figure which is a Unified Modelling
Language characterization of the objects.

Layered Style
 Hierarchical system organization
u “Multi-level client-server”
u Each layer exposes an interface (API) to be used by above layers
 Each layer acts as a
u Server: service provider to layers “above”
u Client: service consumer of layer(s) “below”
 Connectors are protocols of layer interaction
 Example: Operating Systems
 Virtual Machine Style results from fully opaque (unclear) layers
 Advantages
u Increasing abstraction levels
u Evolvability
u Changes in a layer affect at most the adjacent two layers
 Reuse
u Different implementations of layer are allowed as long as interface is preserved
u Standardized layer interfaces for libraries and frameworks
 Disadvantages
u Not universally applicable
u Performance
 Layers may have to be skipped
Layered Systems/Virtual Machines

Layered LL
A five-level version of the lunar lander game is
shown in Figure 4-11.
The top layer handles inputs received from
the user through the keyboard; it calls the
second layer to service those inputs,

The second layer includes all the details of the


lunar lander that pertain to the game logic
and the environment simulator.
It calls the third layer to begin the process of
displaying the updated Lander state to the
user.

The third layer is a generic, two-dimensional


game engine.
Such a layer is capable of supporting any of a
wide variety of games that only require two-
dimensional graphics.
The fourth layer is the operating system,
which provides, among other things, platform-
specific user interface (UI) support.
The bottom layer is provided by firmware or
hardware, and
Client-Server Style
 A kind of two layer virtual machine style with network connections
 Server is a virtual machine that is below the Client
 Components are clients and servers
 Servers do not know number or identities of clients
 Clients know server’s identity
 Connectors are RPC-based network interaction protocols

Client-Server LL
 In the system shown, three players simultaneously and independently play the game.
 All game state, game logic, and environment simulation is performed on the server.
 The clients perform the user interface functions.
 The connectors in this example are Remote Procedure Calls (RPC), which are procedure call
connectors combined with a distributor,
 A distributor identifies network interaction paths and subsequently routes communication
along those paths.
Data-Flow Styles
Batch Sequential
u Separate programs are executed in order; data is passed as an aggregate (collective)
from one program to the next.
u Connectors: “The human hand” carrying tapes between the programs, a.k.a.
“sneaker-net ”
u Data Elements: Explicit, aggregate elements passed from one component to the
next upon completion of the producing program’s execution.
 Typical uses: Transaction processing in financial systems.
Batch-Sequential: A Financial Application
Batch-Sequential LL

Each functional processing step of the game is performed by a separate program.


Upon performing the step’s function, the program produces an updated version of the game state,
which is then handed off to the next program in the process.
After the final step of displaying the game state is performed, the produced tape is carried back to
the first program for another pass.
Pipe and Filter Style
 Components are filters
u Transform input data streams into output data streams
u Possibly incremental production of output
 Connectors are pipes
u Conduits for data streams
 Style invariants
u Filters are independent (no shared state)
u Filter has no knowledge of up- or down-stream filters
 Examples
u UNIX shell signal processing
u Distributed systems parallel programming
 Example: ls invoices | grep -e August | sort
 Variations
u Pipelines — linear sequences of filters
u Bounded pipes — limited amount of data on a pipe
u Typed pipes — data strongly typed
 Advantages
u Intermediate files unnecessary, but possible. File system clutter is avoided and
concurrent execution is made possible.
u Flexibility by filter exchange. It is easy to exchange one filter element for another
with the same interfaces and functionality.
u Flexibility by recombination. It is not difficult to reconfigure a pipeline to include
new filters or perhaps to use the same filters in a different sequence.
u Reuse of filter elements. The ease of filter recombination encourages filter reuse.
Small, active filter elements are normally easy to reuse if the environment makes
them easy to connect.
u Rapid prototyping of pipelines. Flexibility of exchange and recombination and ease
of reuse enables the rapid creation of prototype systems.
u Efficiency by parallel processing. Since active filters run in separate processes or
threads, pipes-and-filters systems can take advantage of a multiprocessor.
 Disadvantages
u Sharing state information is expensive or inflexible. The information must be
encoded, transmitted, and then decoded.
u Efficiency gain by parallel processing is often an illusion. The costs of data transfer,
synchronization, and context switching may be high.
u Data transformation overhead. The use of a single data channel between filters
often means that much transformation of data must occur, for example, translation
of numbers between binary and character formats.
u Error handling. It is often difficult to detect errors in pipes-and-filters systems.
Recovering from errors is even more difficult.

• GetBurnRate runs continuously on its own, prompting the user for a new burn rate.
• In this design the Compute new values determines how much time has passed.

Shared memory
Blackboard Style
 Two kinds of components
u Central data structure — blackboard
u Components operating on the blackboard
 System control is entirely driven by the blackboard state
 Examples
u Typically used for AI systems
u Integrated software environments (e.g., Interlisp*)
u Compiler architecture
 See other PPT file for more …

Black-board LL
A single connector regulates access from the various experts in manipulating the information on the
blackboard.
The blackboard maintains the game state; the experts perform the independent tasks of (1) updating
the descent engine burn rate based upon input from the user, (2) displaying to the user the current
state of the spacecraft and any other aspect of the game state, and (3) updating the game state
based upon a time and physics model.
Rule-Based Style
Inference engine parses user input and determines whether it is a fact/rule or a query. If it is
a fact/rule, it adds this entry to the knowledge base. Otherwise, it queries the knowledge base for
applicable rules and attempts to resolve the query.
 Components: User interface, inference engine, knowledge base
 Connectors: Components are tightly interconnected, with direct procedure calls and/or
shared memory.
 Data Elements: Facts and queries
 Behavior of the application can be very easily modified through addition or deletion of rules
from the knowledge base.
 Caution: When a large number of rules are involved understanding the interactions between
multiple rules affected by the same facts can become very difficult.

With regard to the user interaction model, the user enters the value of burn rate as a fact:
burnrate(25)
To see what the status of the spacecraft is, the user can switch to the goal mode and asks whether
the spacecraft has landed safely:
landed (spacecraft)
To handle this query, the inference engine queries the database, If the existing facts and other
production rules satisfy the conditions “altitude <= 0” and “velocity < 3 ft/s,” then the engine returns
true to the user interface. Otherwise, it returns false
Interpreter Style
Interpreter parses and executes input commands, updating the state maintained by the
interpreter
 Components: Command interpreter, program/interpreter state, user interface.
 Connectors: Typically very closely bound with direct procedure calls and shared state.
 Highly dynamic behavior possible, where the set of commands is dynamically modified.
System architecture may remain constant while new capabilities are created based upon
existing primitives.
 Superb for end-user programmability; supports dynamically changing set of capabilities
 Care should be taken to make the interpreter as flexible as possible, so that the
implementation can be changed at later stages without having tight coupling.
 Other advantage of Interpreter is that you can have more than one interpreter for the same
output and create the object of interpreter based on the input
Interpreter LL
• When the user enters “BurnRate(50),” the interpreter takes BurnRate as the command and
the parameter as the amount of fuel to burn.
• It then calculates the necessary updates to the altitude, fuel level, and velocity.
• Time is simulated by having t incremented each occasion the user enters a BurnRate
command.
• When the user enters the CheckStatus command, the user receives the current state of
altitude, fuel, time, and velocity.
Mobile-Code Style
 It enable code to be transmitted to a remote host for interpretation.
 This may be due to a lack of local computing power, lack of resources, or due to large data
sets remotely located.
 Mobile code may be classified as: -
u code on demand,
u remote evaluation, or
u mobile agent
depending on where the code is being transmitted, who requested the transmission, and
where the program state resides.
 Code on demand is when the initiator has resources and state but downloads code from
another site to be executed locally,
 Remote evaluation is when the initiator has the code but lacks the resources (such as the
interpreter) to execute the code, Thus, it transmits code to be processed at a remote host,
such as in grid computing. Results are returned to the initiator.
 Mobile agent is when the initiator has the code and the state but some of resources are
located elsewhere. Thus the initiator moves to a remote host with the code, the state, and
some of the resources. Processing need not return to the initiator.
 Summary: a data element (some representation of a program) is dynamically transformed
into a data processing component.
 Components: “Execution dock”, which handles receipt of code and state; code
compiler/interpreter
 Connectors: Network protocols and elements for packaging code and data for transmission.
 Data Elements: Representations of code as data; program state
 Variants: Code-on-demand, remote evaluation, and mobile agent.

One client Web browser


downloads code-on-demand in the
form of a Lunar Lander game
applet via HTTP.

A second browser loads a


JavaScript Lunar Lander;

a third uses some other form


that is not detailed.
• Here, all the game logic moves to the client machines, freeing the server’s computing
resources.
• In the figure as shown, each client machine maintains the game state independently of other
clients.
Implicit Invocation
Implicit Invocation Style
 Such styles are characterized by calls that are invoked (called up) indirectly and implicitly
(unconditionally) as a response to a notification or an event
 Ease of adaptation and enhanced scalability are benefits of the indirect interaction between
very loosely coupled components.
 Event announcement instead of method invocation
 “Listeners” register interest in and associate methods with events
 System invokes all registered methods implicitly
 Component interfaces are methods and events
 Two types of connectors
 Invocation is either explicit or implicit in response to events
 Style invariants
 “Announcers” are unaware of their events’ effects
 No assumption about processing in response to events
 Advantages
 Component reuse
 System evolution
 Both at system construction-time & run-time
 Disadvantages
 No knowledge of what components will respond to event
 No knowledge of order of responses
Publish-Subscribe
 Subscribers register/de-register to receive specific messages or specific content.
 Publishers broadcast messages to subscribers either synchronously or asynchronously.
 Components: Publishers, subscribers, proxies for managing distribution
 Connectors: Typically a network protocol is required. Content-based subscription requires
sophisticated connectors.
 Data Elements: Subscriptions, notifications, published information
 Topology: Subscribers connect to publishers either directly or may receive notifications via a
network protocol from intermediaries
 Qualities yielded Highly efficient one-way dissemination (broadcast) of information with very
low-coupling of components
 In the example, the lunar lander software is deployed to various network hosts.
 Players, who are the subscribers, register their hosts to a game server that publishes
information, such as:-
u new Lunar terrain data, new spacecraft, and the (Lunar) locations of all the
registered spacecraft currently playing the game.
 Once registered, the subscribed hosts receive notifications when any of the information
they have registered for has been updated.
Event-Based Style
 Independent components asynchronously emit and receive events communicated over
event buses
 Components: Independent, concurrent event generators and/or consumers
 Connectors: Event buses (at least one)
 Data Elements: Events – data sent as a first-class entity over the event bus
 Topology: Components communicate with the event buses, not directly to each other.
 Variants: Component communication with the event bus may either be push or pull based.
 Highly scalable, easy to evolve, effective for highly distributed applications.
Event-based LL
 The clock component drives the game. Every fraction of a second, the clock component
sends out a tick notification to the event bus, which distributes that event to the other
components.
 The spacecraft component maintains the state of the spacecraft (its altitude, fuel level,
velocity, and throttle setting).
 Upon receiving a predefined number of notifications from the clock, the spacecraft
component recalculates the altitude, fuel level, and velocity (corresponding to simulated
flight for that number of ticks) and then emits those values to the event bus.
 GUI component drives the game player’s display.
 Receipt of events providing the spacecraft’s altitude, fuel, and velocity causes the GUI
component to update its display based on those values.
 The GUI component also obtains new burn rate settings from the user; when this happens
the component emits a notification of this new value onto the event bus.
 The game logic component, receiving both information about the state of the spacecraft
and the amount of time that has passed (by counting clock ticks), determines the player’s
score.
Peer-to-Peer (P2P) Style
 This architectural style consists of a network of loosely coupled autonomous peers (nodes)
which can act as either clients or servers
 Peers communicate using a network protocol.
 Unlike the client-server style where state and logic are centralized on the server, P2P
decentralizes both information and control.
 Peers: independent components, having their own state and control thread.
 Connectors: Network protocols, often custom.
 Data Elements: Network messages
 Topology: Network (may have redundant connections between peers); can vary arbitrarily
and dynamically
 Supports decentralized computing with flow of control and resources distributed among
peers.
 Highly robust (strong) in the face of failure of any given node. Scalable in terms of access to
resources and computing power.
In the example of Figure, a
group of lunar lander
spacecraft are on their way to
land in different parts of the
moon.

Multiple Landers are used in


this example to highlight that
the P2P architectural style is
designed to support interaction
between highly autonomous
components.

Lunar Lander 1 (LL1) wants to


find out if another spacecraft
has already landed in a
specific area, so that
collisions can be avoided.

Each of the spacecraft is


configured to communicate with
the others using a P2P
protocol over a network.

A spacecraft will only be able


to communicate with others
that are within a specified,
More Complex Styles
Heterogeneous Styles
 More complex styles created through composition of simpler styles
 REST
u Complex history presented later in course
 C2
u Implicit invocation + Layering + other constraints
 Distributed Objects
u OO + client-server network style
u CORBA
C2 Style
An indirect invocation style in which independent components communicate exclusively
(entirely) through message routing connectors.
Strict rules on connections between components and connectors induce layering.
 Components: Independent, potentially concurrent message generators and/or consumers
 Connectors: Message routers that may filter, translate, and broadcast messages of two
kinds: notifications and requests.
 Data Elements: Messages – data sent as first-class entities over the connectors. Notification
messages announce changes of state. Request messages request performance of an action.
 Topology: Layers of components and connectors, with a defined “top” and “bottom”,
wherein notifications flow downwards and requests upwards.
KLAX
Distributed Objects: CORBA

 “Objects” (coarse- or fine-grained) run on heterogeneous hosts, written in heterogeneous


languages. Objects provide services through well-defined interfaces. Objects invoke methods
across host, process, and language boundaries via remote procedure calls (RPCs).

 Components: Objects (software components exposing services through well-defined


provided interfaces)

 Connector: (Remote) Method invocation

 Data Elements: Arguments to methods, return values, and exceptions

 Topology: General graph of objects from callers to callees.

 Additional constraints imposed: Data passed in remote procedure calls must be serializable.
Callers must deal with exceptions that can arise due to network or process faults.

 Location, platform, and language “transparency”. CAUTION

CORBA Concept and Implementation


CORBA LL
Observations

 Different styles result in


u Different architectures
u Architectures with greatly differing properties
 A style does not fully determine resulting architecture
u A single style can result in different architectures
Style
uSummary
Considerable room for Use It When Avoid It When
Category &
Name  Individual judgment
Language-influenced styles Variations among architects
Main Program Main program controls
 A style defines domain Application is small and simple.
of discourse Complex data structures needed.
and program execution, calling Future modifications likely.
Subroutines About
umultiple problem (domain)
subroutines.
u About resulting state
Object-oriented Objects encapsulate system Close mapping between external Application is distributed in a
and accessing functions entities and internal objects is heterogeneous network.
sensible. Strong independence between
Many complex and interrelated components necessary.
data structures. High performance required.
Layered
Virtual Virtual machine, or a Many applications can be based Many levels are required (causes
STYLE SUMMARY:
Machines layer, offers services to upon a single, common layer of inefficiency).
layers above it services. Data structures must be accessed
Interface service specification from multiple layers.
resilient when implementation of
a layer must change.
Client-server Clients request service Centralization of computation Centrality presents a single-point-
from a server and data at a single location (the of-failure risk; Network bandwidth
server) promotes manageability limited; Client machine capabilities
and scalability; end-user rival or exceed the server’s.
processing limited to data entry
and presentation.
Data-flow styles

Batch Separate programs Problem easily formulated as a Interactivity or concurrency


sequential executed sequentially, set of sequential, severable between components
with batched input steps. necessary or desirable.

Random-access to data
required.

Pipe-and-filter Separate programs, [As with batch-sequential] Interaction between


a.k.a. filters, executed, Filters are useful in more than components required.
potentially concurrently. one application. Data Exchange of complex data
Pipes route data structures easily serializable. structures between components
streams between filters required.

Shared memory

Blackboard Independent programs, All calculation centers on a Programs deal with


access and common, changing data independent parts of the
communicate structure; common data.
exclusively through a
global repository known Order of processing Interface to common data
as blackboard dynamically determined and susceptible to change. When
data-driven. interactions between the
independent programs require
complex regulation.

Rule-based Use facts or rules Problem data and queries Number of rules is large.
entered into the expressible as simple rules
knowledge base to over which inference may be Interaction between rules
resolve a query performed. present.

High-performance required.

Interpreter

Interpreter Interpreter parses and Highly dynamic behavior High performance required.
executes the input required. High degree of end-
stream, updating the user customizability.
state maintained by the
interpreter

Mobile Code Code is mobile, that is, it When it is more efficient to Security of mobile code cannot
is executed in a remote move processing to a data set be assured, or sandboxed.
host than the data set to
processing. When tight control of versions of
deployed software is required.
When it is desirous to
dynamically customize a local
processing node through
inclusion of external code

Implicit Invocation

Publish- Publishers broadcast Components are very loosely When middleware to support
subscribe messages to coupled. Subscription data is high-volume data is unavailable.
subscribers small and efficiently
transported.

Event-based Independent Components are concurrent Guarantees on real-time


components and independent. processing of events is
asynchronously emit required.
and receive events Components heterogeneous
communicated over and network-distributed.
event buses

Peer-to-peer Peers hold state and Peers are distributed in a Trustworthiness of independent
behavior and can act as network, can be peers cannot be assured or
both clients and servers heterogeneous, and mutually managed.
independent.
Resource discovery inefficient
Robust in face of independent without designated nodes.
failures.

Highly scalable.

More complex styles

C2 Layered network of When independence from When high-performance across


concurrent components substrate technologies many layers required.
communicating by required.
events When multiple threads are
Heterogeneous applications. inefficient.

When support for product-lines


desired.

Distributed Objects instantiated on Objective is to preserve When high overhead of


Objects different hosts illusion of location- supporting middleware is
transparency excessive. When network
properties are unmaskable, in
practical terms.
Design Recovery

 What happens if a system is already implemented but has no recorded architecture?


 The task of design recovery is
u examining the existing code base
u determining what the system’s components, connectors, and overall topology are.
 A common approach to architectural recovery is clustering of the implementation-level
entities into architectural elements.
u Syntactic clustering
u Semantic clustering
Syntactic Clustering
 Focuses exclusively on the static relationships among code-level entities
 Can be performed without executing the system
 Embodies inter-component (a.k.a. coupling) and intra-component (a.k.a. cohesion)
connectivity
 May ignore or misinterpret many subtle relationships, because dynamic information is
missing
Semantic Clustering
 Includes all aspects of a system’s domain knowledge and information about the behavioral
similarity of its entities.
 Requires interpreting the system entities’ meaning, and possibly executing the system on a
representative set of inputs.
 Difficult to automate
 May also be difficult to avail oneself of it
When There’s No Experience to Go On…
 The first effort a designer should make in addressing a novel design challenge is to attempt
to determine that it is genuinely a novel problem.
 Basic Strategy
u Divergence – shake off inadequate prior approaches and discover or admit a variety
of new ideas
u Transformation – combination of analysis and selection
u Convergence – selecting and further refining ideas
 Repeatedly cycling through the basic steps until a feasible solution emerges.
Analogy Searching
 Examine other fields and disciplines unrelated to the target problem for approaches and
ideas that are analogous to the problem.
 Formulate a solution strategy based upon that analogy.
 A common “unrelated domain” that has yielded a variety of solutions is nature, especially
the biological sciences.
u E.g., Neural Networks
Brainstorming
 Technique of rapidly generating a wide set of ideas and thoughts pertaining to a design
problem
u without (initially) devoting effort to assessing the feasibility.
 Brainstorming can be done by an individual or, more commonly, by a group.
 Problem: A brainstorming session can generate a large number of ideas… all of which might
be low-quality.
 The chief value of brainstorming is in identifying categories of possible designs, not any
specific design solution suggested during a session.
 After brainstorm the design process may proceed to the Transformation and Convergence
steps.
“Literature” Searching
 Examining published information to identify material that can be used to guide or inspire
designers
 Many historically useful ways of searching “literature” are available
 Digital library collections make searching extraordinarily faster and more effective
u IEEE Xplore
u ACM Digital Library
u Google Scholar
 The availability of free and open-source software adds special value to this technique.
Morphological Charts
 The essential idea:
u identify all the primary functions to be performed by the desired system
u for each function identify a means of performing that function
u attempt to choose one means for each function such that the collection of means
performs all the required functions in a compatible manner.
 The technique does not demand that the functions be shown to be independent when
starting out.
 Sub-solutions to a given problem do not need to be compatible with all the sub-solutions to
other functions in the beginning.
Removing Mental Blocks
 If you can’t solve the problem, change the problem to one you can solve.
u If the new problem is “close enough” to what is needed, then closure is reached.
u If it is not close enough, the solution to the revised problem may suggest new
venues for attacking the original.
Controlling the Design Strategy
 The potentially chaotic (disordered) nature of exploring diverse approaches to the problem
demands that some care be used in managing the activity
 Identify and review critical decisions
 Relate the costs of research and design to the penalty for taking wrong decisions
 Insulate uncertain decisions
 Continually re-evaluate system “requirements” in light of what the design exploration yields
Insights from Requirements
 In many cases new architectures can be created based upon experience with and
improvement to pre-existing architectures.
 Requirements can use a vocabulary of known architectural choices and therefore reflect
experience.
 The interaction between past design and new requirements means that many critical
decisions for a new design can be identified or made as a requirement
Insights from Implementation
 Constraints on the implementation activity may help shape the design.
 Externally motivated constraints might dictate
u Use of a middleware
u Use of a particular programming language
u Software reuse
 Design and implementation may proceed cooperatively and contemporaneously
u Initial partial implementation activities may yield critical performance or feasibility
information

You might also like