Architectural Styles Flashcards

1
Q

ARCHITECTURAL STYLES

A
  • An architectural style is a named collection of architectural design decisions that -are applicable in a given development 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

PARTS OF A STYLE

A
  • A set of component types with a given role/functionality
  • A topology of relations (usually runtime relations)
  • A set of connector types that handle communication, coordination, or collaboration
  • A set of semantic constraints -I.e., what may components/connectors do or not do?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Traditional, language-influenced styles

A
  • Main program and subroutines
  • Object-oriented
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Layered styles

A
  • Virtual machines
  • Client-server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Data-flow styles

A
  • Batch sequential
  • Pipes and filters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shared memory styles

A
  • Blackboard
  • Rule based
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Interpreter Styles

A
  • Interpreter
  • Mobile code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Implicit invocation Styles

A
  • Event-based
  • Publish-subscribe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Styles classification

A
  • Communication: Service-oriented architecture (SOA), Message Bus
  • Deployment: Client/Server, N-tier, 3-tier
  • Domain: Domain Driven Design
  • Structure: Componend-Based, Object-Oriented, Layered-Architecture
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Blackboard Style

A
  • Useful for problems for which no deterministic solution strategies are known
  • several specialized subsystems assemble their knowledge to build a possibly partial or approximate solution
  • Example: speech recognition, submarine detection, inference of 3D molecule structure
  • All components have access to a shared data store (the blackboard)
  • Components produce new data objects that are added to the blackboard
  • Components look for particular kinds of data on the blackboard
  • Find these by pattern matching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Blackboard Style (2)

A
  • Processes have to agree on the structure of the shared data space
  • Adding new applications is easy
  • Extending the structure of the data space is easy
  • Modifying the structure of the data space is hard
  • Possible need for synchronization, access control
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Pipes and Filters

A

Components (Filters)

  • read streams of data on input producing streams of data on output
  • local incremental transformation to input stream
  • output usually begins before input is consumed

Connectors (Pipes)

  • conduits for streams e.g. first-in-first-out buffer
  • transmit outputs from one filter to input of other

Invariants

  • filters must be independent, no shared state
  • filters don’t know upstream or downstream filter identity
  • correctness of output from network must not depend on order in which individual filters provide their incremental processing

Common specialisations

  • pipelines: linear sequence of filters
  • bounded and typed pipes …
  • Common Example: lex/yacc -based compiler (scan, parse, generate code, ..)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Pipes and Filters Strengths

A
  • Overall behaviour is a simple composition of behaviour of individual filters.
  • Reuse - any two filters can be connected if they agree on that data format that is transmitted.
  • Ease of maintenance - filters can be added or replaced.
  • Prototyping e.g. Unix shell scripts are famously powerful and flexible.
  • Architecture supports formal analysis - throughput and deadlock detection
  • Potential for parallelism - filters implemented as separate tasks, consuming and producing data incrementally.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

PIPES AND FILTERS WEAKNESSES

A
  • Can degenerate to ‘batch processing’ - filter processes all of its data before passing on (rather than incrementally)
  • Sharing global data is expensive or limiting
  • Can be difficult to design incremental filters
  • Not appropriate for interactive applications
  • Synchronization of streams will constrain architecture.
  • Error handling e.g. filter has consumed three quarters of its input and produced half its output and some intermediate filter crashes!
  • Implementation may force lowest common denominator on data transmission e.g. Unix scripts everything is ASCII.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Object-Oriented Style

A
  • Components are objects
    • Data and associated operations
  • Connectors are messages and method invocations
  • Style invariants
    • Objects are responsible for their internal representation integrity
    • Internal representation is hidden from other objects
  • Advantages
    • “Infinite malleability” of object internals
    • System decomposition into sets of interacting agents
  • Disadvantages
    • Objects must know identities of servers
    • Side effects in object method invocations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Implicit Invocation

A
  • 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
17
Q

Implicit Invocation Advantages

A
  • Reuse: any component can be introduced by registering it for appropriate events
  • Evolution: components may be replaced without affecting other interfaces
18
Q

Implicit Invocation Disadvantages

A
  • Control: no way to know what will happen after event is announced
  • Data: may lead to performance problems
  • Correctness: meaning of procedure is context dependent
19
Q

Publish-Subscribe

A

Subscribers register/deregister to receive specific messages or specific content. Publishers broadcast messages to subscribers either synchronously or asynchronously.

20
Q

Publish-Subscribe (2)

A
  • 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: Highly efficient one-way dissemination of information with very low-coupling of components
21
Q

Event-Based Style

A
  • Independent components asynchronously emit and receive events communicated over message buses
  • Components: Independent, concurrent event generators and/or consumers
  • Connectors: Message buses (at least one)
  • Data Elements: Events/messages – data sent as a first-class entity over the Message bus
  • Topology: Components communicate with the Message buses, not directly to each other.
  • Variants: Component communication with the Message bus may either be push or pull based.
  • Highly scalable, easy to evolve, effective for highly distributed applications.
22
Q

Variations

A
  • Enterprise Service Bus (ESB).
    • uses services for communication between the bus and components attached to the bus.
    • provides services that transform messages from one format to another, allowing clients that use incompatible message formats to communicate with each other
  • Internet Service Bus (ISB).
    • applications hosted in the cloud instead of on an enterprise network.
    • uses Uniform Resource Identifiers (URIs) and policies to control the routing of logic through applications and services in the cloud.