+ All Categories
Home > Documents > Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code....

Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code....

Date post: 06-Apr-2018
Category:
Upload: trananh
View: 219 times
Download: 0 times
Share this document with a friend
25
Lecture 7 - Tuesday, October 5 2010. Material and some slide content from: - Emerson Murphy-Hill - Software Architecture: Foundations, Theory, and Practice - Essential Software Architecture Architectural Styles - Finale Reid Holmes
Transcript
Page 1: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

Lecture 7 - Tuesday, October 5 2010.

Material and some slide content from:- Emerson Murphy-Hill- Software Architecture: Foundations, Theory, and Practice- Essential Software Architecture

Architectural Styles - FinaleReid Holmes

Page 2: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

ArchitecturalStyles

LanguageBased

Layered Dataflow

SharedMemory

InterpreterImplicit

Invocation

Peer-to-Peer

Main program &Subroutines

Object-oriented

VirtualMachine

ClientServer

Batch-sequential

Pipe-and-Filter

Blackboard

Rule-based Interpreter

Mobilecode

Publish-subscribe

Event-based

[TOPOLOGY FROM TAILOR ET AL.]

Page 3: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Implicit invocation‣ In contrast to other patterns, the flow of control is

“reversed”.

‣ Commonly integrate tools in shared environments.

‣ Components tend to be loosely coupled.

‣ Often used in:

‣ UI applications (e.g., MVC, MVP).

‣ Enterprise systems (e.g., WebSphere)

Page 4: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Style: Event-based

Page 5: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Independent components asynchronously emit and receive events.

‣ Components:

‣ Event generators / consumers.

‣ Connections:

‣ ?

‣ Data elements:

‣ Events.

‣ Topology:

‣ ?

[TAILOR ET AL.]

Style: Event-based

Page 6: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Variants:

‣ May be push or pull based (with event bus).

‣ Qualities:

‣ ?

‣ Typical uses:

‣ User interfaces. Widely distributed applications (e.g., financial markets, sensor networks).

‣ Cautions:

‣ ?

[TAILOR ET AL.]

Style: Event-based

Page 7: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Style: Publish-subscribe

Page 8: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Subscribers register for specific messages or content. Publishers maintain registrations and broadcast messages to subscribers as required.

‣ Components:

‣ ?

‣ Connections:

‣ Typically network protocols.

‣ Data elements:

‣ Subscriptions, notifications, content.

‣ Topology:

‣ Subscribers connect to publishers either directly or through intermediaries.

[TAILOR ET AL.]

Style: Publish-subscribe

Page 9: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Variants:

‣ Complex matching of subscribers and publishers can be supported via intermediaries.

‣ Qualities:

‣ ?

‣ Typical uses:

‣ News, GUI programming, network games.

‣ Cautions:

‣ Scalability to large numbers of subscriber may require specialized protocols.

[TAILOR ET AL.]

Style: Publish-subscribe

Page 10: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Interpreter‣ Interpret commands on the fly.

‣ Based on a virtual machine produced in SW.

‣ Components are the ‘program’, its data, its state, and the interpretation engine.

‣ e.g., Java Virtual Machine. JVM interprets Java bytecode).

Page 11: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Style: Interpreter

Page 12: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Style: Interpreter‣ Update state by parsing and executing commands.

‣ Components:

‣ ?

‣ Connections:

‣ Components tightly bound; uses procedure calls and shared state.

‣ Data elements:

‣ Commands.

‣ Topology:

‣ Tightly coupled three-tier.

[TAILOR ET AL.]

Page 13: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Qualities:

‣ ?

‣ Typical uses:

‣ End-user programming.

‣ Cautions:

‣ May not be performant.

Style: Interpreter[TAILOR ET AL.]

Page 14: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Style: Mobile code

Page 15: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Code and state move to different hosts to be interpreted.

‣ Components:

‣ ?

‣ Connections:

‣ Network protocols.

‣ Data elements:

‣ Representations of code, program state, data.

‣ Topology:

‣ Network.

[TAILOR ET AL.]

Style: Mobile code

Page 16: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Variants:

‣ Code-on-demand, remote evaluation, and mobile agent.

‣ Qualities:

‣ Dynamic adaptability.

‣ Typical uses:

‣ ?

‣ Cautions:

‣ Security. Transmission costs. Network reliability.

[TAILOR ET AL.]

Style: Mobile code

Page 17: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Peer-to-peer

Page 18: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Style: Peer-to-peer‣ State and behaviour are distributed among peers that

can act as clients or servers.

‣ Components:

‣ Peers (aka independent components).

‣ Connections:

‣ Network protocols.

‣ Data elements:

‣ Network messages.

‣ Topology:

‣ ?

[TAILOR ET AL.]

Page 19: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

‣ Qualities:

‣ ?

‣ Typical uses:

‣ When information and operations are distributed.

‣ Cautions:

‣ Security. Time criticality.

Style: Peer-to-peer[TAILOR ET AL.]

Page 20: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Architectural representations‣ Characteristics of representations:

‣ Ambiguity: ?

‣ Accuracy: Correct within tolerances.

‣ Precision: Exact but not necessarily correct.

‣ Architectural models can be overwhelming.

‣ Model individual concerns with unique views.

‣ Views overlap and can be consistent on inconsistent.

Page 21: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Statechart diagram‣ More formal description of system behaviour.

‣ Poor mapping between states and components.

Page 22: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Component diagram‣ Captures components and relationships.

‣ Required and provided APIs explicitly recorded.

Page 23: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Deployment diagram‣ Provide mapping between physical devices.

Page 24: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Sequence diagram‣ Focus on inter-component collaboration.

‣ Capture behaviour for specific scenarios.

Page 25: Architectural Styles - Finale - Home | Cheriton School of … ·  · 2010-12-07Style: Mobile code. REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE ... SE2: SOFTWARE DESIGN & ARCHITECTURE

REID HOLMES - SE2: SOFTWARE DESIGN & ARCHITECTURE

Activity‣ List the major components and connectors for

your system.

‣ Create a basic statechart for your system.

‣ Create a rough component and deployment diagram for two different architectures.

‣ Choose the arch that you think is best for your task; you will motivate this decision to me.

‣ Perform an inter-group architectural review; be critical.


Recommended