SlideShare a Scribd company logo
1 of 31
ICS 123
Architectural Styles
ICS 123
Richard N. Taylor and Eric M. Dashofy
UC Irvine
http://www.isr.uci.edu/classes/ics123s02/
* with very special thanks to David S. Rosenblum for the use of his materials..
ICS 123
2
Topic 3
Architectural
Styles
Architectural Styles
• “A set of design rules that identify the kinds of
components and connectors that may be used to
compose a system or subsystem, together with local
or global constraints on the way the composition is
done” (Shaw & Clements, 1996)
• A set of constraints you put on your development to
elicit desirable properties from your software
architecture.
– Constraints may be:
» Topological
» Behavioral
» Communication-oriented
» etc. etc.
ICS 123
3
Topic 3
Architectural
Styles
Architectural Styles vs.
Design Patterns
• Many similarities between patterns and styles
– Goal: packaged engineering experience
– Formulation: organization and interaction among “key” components
• But they have come from different communities
– Many architectural styles have been well known for a long time in the
software engineering community
– Patterns are a relatively recent development in OO design
• Differences
Architectural Styles Design Patterns
Few Many
Large-scale system
organization
Localized, small-scale
design solutions
ICS 123
4
Topic 3
Architectural
Styles
Characterizing Architectural
Styles
• Component and Connector characteristics
• Allowed configurations
• Underlying computational model
• Stylistic invariants
• Common examples of its use
• Advantages and disadvantages
• Common specializations
ICS 123
5
Topic 3
Architectural
Styles
• Components
– Individual programs transforming input data to output data
• Connectors
– Unidirectional or bidirectional data streams
• Configurations
– Parallel linear composition of program invocations
• Underlying computational model
– Sequential data flow and transformation
• Stylistic invariants
– Every component has one input predecessor and one output successor
• Common specializations
– Pipelines: single linear composition of pipes and filters
– Bounded pipes, typed pipes
The primary architectural style supported by UNIX
The Pipe-and-Filter Style
ICS 123
6
Topic 3
Architectural
Styles
Pipe-and-Filter Example:
UNIX Text Processing
% pic mydoc.t | eqn | tbl | troff | lpr
pic eqn tbl troff lpr
Component Connector
Legend:
ICS 123
7
Topic 3
Architectural
Styles
Pipe-and-Filter Advantages
and Disadvantages
• Advantages
– Simplicity: Simple, intuitive, efficient composition of components
– Reusability: High potential for reuse of components
– Evolvability: Changing architectures is trivial
– Efficiency: Limited amount of concurrency (contrast batch-sequential)
– Consistency: All components have the same interfaces, only one type
of connector
– Distributability: Byte streams can be sent across networks
• Disadvantages
– Batch-oriented processing
– Must agree on lowest-common-denominator data format
– Does not guarantee semantics
– Limited application domain: stateless data transformation
ICS 123
8
Topic 3
Architectural
Styles
The Layered System Style
• Components
– Programs or subprograms
• Connectors
– Procedure calls or system calls
• Configurations
– “Onion” or “stovepipe” structure, possibly replicated
• Underlying computational model
– Procedure call/return
• Stylistic invariants
– Each layer provides a service only to the immediate layer “above” (at
the next higher level of abstraction) and uses the service only of the
immediate layer “below” (at the next lower level of abstraction)
ICS 123
9
Topic 3
Architectural
Styles
Layered Virtual Machine
Example: Java
Java Virtual Machine
Processor
Operating
System
Java
Virtual Machine
Java
Application
(Virtual Machine Style)
ICS 123
10
Topic 3
Architectural
Styles
Layered System Example:
OSI Protocol Stack
Application
Presentation
Session
Transport
Network
Data Link
Physical
Application
Presentation
Session
Transport
Network
Data Link
Physical
Network
Data Link
Physical
Network
Data Link
Physical
ICS 123
11
Topic 3
Architectural
Styles
Layered System Advantages
and Disadvantages
• Advantages
– Decomposability: Effective separation of concerns
– Maintainability: Changes that do not affect layer interfaces are easy to
make
– Evolvability: Potential for adding layers
– Adaptability/Portability: Can replace inner layers as long as interfaces
remain the same (consider swapping out a Solaris JVM for a Linux one)
– Understandability: Strict set of dependencies allow you to ignore outer
layers
• Disadvantages
– Performance degrades with too many layers
– Can be difficult to cleanly assign functionality to the “right” layer
ICS 123
12
Topic 3
Architectural
Styles
The Blackboard Style
• Components
– Blackboard client programs
• Connector
– Blackboard: shared data repository, possibly with finite capacity
• Configurations
– Multiple clients sharing single blackboard
• Underlying computational model
– Synchronized, shared data transactions, with control driven entirely by
blackboard state
• Stylistic invariants
– All clients see all transactions in the same order
ICS 123
13
Topic 3
Architectural
Styles
Blackboard Example:
A Chat Room
Chat Transcript
Chat Participant Chat Participant
Chat Participant Chat Participant
Chat Participant
ICS 123
14
Topic 3
Architectural
Styles
Blackboard Advantages and
Disadvantages
• Advantages
– Simplicity: Only one connector (the blackboard) that everyone uses
– Evolvability: New types of components can be added easily
– Reliability(?): Concurrency controls of information, traditionally a tricky
problem, can be largely addressed in the blackboard
• Disadvantages
– Blackboard becomes a bottleneck with too many clients
– Implicit “partitions” of information on the blackboard may cause
confusion, reduce understandability
ICS 123
15
Topic 3
Architectural
Styles
The Hypertext Style
• Components
– “Documents” and document parts
• Connectors
– Unidirectional hyperlinks between document parts
• Configurations
– Arbitrary topology of linked documents
• Underlying computational model
– Bidirectional hyperlink traversal
• Stylistic invariants
– Adherence to standardized document formats
ICS 123
16
Topic 3
Architectural
Styles
Hypertext Example:
The World Wide Web
HTML Document
HTML Document
Java Applet GIF Image
Text Document
ICS 123
17
Topic 3
Architectural
Styles
Hypertext Advantages and
Disadvantages
• Advantages
– Efficiency: Can organize large amounts of non-uniform data
– Adaptability: New types of applications and data can be integrated
– Distributability: Well-suited to wide-area distributed application
– Scalability: Lack of centralization allows millions of clients (cf. the Web)
– Flexibility: Few constraints on topology, organization
• Disadvantages
– Reliability (consider broken links)
– Somewhat difficult to maintain context
– Need for sophisticated indexing mechanisms
– Need for sophisticated version control
ICS 123
18
Topic 3
Architectural
Styles
Event-Based Systems and
the Implicit Invocation Style
• Components
– Programs or program entities that announce and/or register interest in
events
• Connectors
– Event broadcast and registration infrastructure
• Configurations
– Implicit dependencies arising from event announcements and
registrations
• Underlying computational model
1. Event announcement is broadcast
2. Procedures associated with registrations (if any) are invoked
ICS 123
19
Topic 3
Architectural
Styles
Implicit Invocation Example:
Program Debugging (1)
Debug events
Interactive
Program
Debugger
Application
Program
Breakpoint
Routine
Set breakpoint line 10
ICS 123
20
Topic 3
Architectural
Styles
Implicit Invocation Example:
Program Debugging (2)
Debug events
Interactive
Program
Debugger
Application
Program
Breakpoint
Routine
line 10
ICS 123
21
Topic 3
Architectural
Styles
Implicit Invocation Example:
Program Debugging (3)
Interactive
Program
Debugger
Application
Program
Breakpoint
Routine
Line 8 reached
Debug events
line 10
ICS 123
22
Topic 3
Architectural
Styles
Implicit Invocation Example:
Program Debugging (4)
Interactive
Program
Debugger
Application
Program
Breakpoint
Routine
Line 10 reached
Debug events
line 10
Implicit
Invocation!
ICS 123
23
Topic 3
Architectural
Styles
Implicit Invocation
Advantages & Disadvantages
• Advantages
– Reusability: Components can be put in almost any context
– Distributability: Events are independent and can travel across the network
– Interoperability: Components may be very heterogeneous
– Visibility: Events are a reified form of communication that can be logged and
viewed
– Robustness: Components in this style generally have to be written to tolerate
failure or unexpected circumstances well
• Disadvantages
– Reliability: Components announcing events have no guarantee of getting a
response
– Simplicity: Components announcing events have no control over the order of
responses, so they must be robust enough to handle this
– Understandability: Difficult to reason about the behavior of an announcing
component independently of the components that register for its events
– Event abstraction does not cleanly lend itself to data exchange
ICS 123
24
Topic 3
Architectural
Styles
Distributed Peer-to-Peer
Systems
• Components
– Independently developed objects and programs offering public
operations or services
• Connectors
– Remote procedure call (RPC) over computer networks
• Configurations
– Transient or persistent connections between cooperating components
• Underlying computational model
– Synchronous or asynchronous invocation of operations or services
• Stylistic invariants
– Communications are point-to-point
ICS 123
25
Topic 3
Architectural
Styles
Client/Server Systems
• Client/Server systems are the most common
specialization (restriction) of the peer-to-peer style
• One component is a server offering a service
• The other components are clients using the service
• Server implementation is transparent but can be
centralized or distributed, single-threaded or multi-
threaded
– Single interface point with physically distributed implementation
– Dynamic, transparent selection from among multiple interface points
ICS 123
26
Topic 3
Architectural
Styles
Client/Server Example:
The World Wide Web
HTTP
(asynchronous RPC)
www.ics.uci.edu
Netscape
Navigator
Microsoft
IE
Browser
Clients
Web
Servers
ICS 123
27
Topic 3
Architectural
Styles
3-Tier Client/Server Systems
• 3-Tier Client/Server systems are a common class of
distributed business systems
– Increasing competition requires business to find new ways of exploiting
legacy information assets
• First tier: Client (user interface) tier
• Second (middle, “business logic”) tier: Servers
acting as “business objects”, encapsulating abstract,
integrated models of multiple, disparate data
sources
• Third (back-end, database) tier: Legacy business
applications providing data services
ICS 123
28
Topic 3
Architectural
Styles
3-Tier System Example:
Marketing at a TelCo
Client Tier
Customer Loss
Analysis
Server Tier Legacy Tier
Customer
Billing System
Network Services
Provisioning System
Legacy Wrappers
Telemarketing
Agent (CA)
Telemarketing
Agent (NY)
Client/
Server
Middleware
ICS 123
29
Topic 3
Architectural
Styles
The Real Peer-to-Peer Apps
• Napster
• SETI-at-home (well, not really)
• Gnutella
• Groove
• Magi
• Web Services
ICS 123
30
Topic 3
Architectural
Styles
Peer-to-Peer Advantages and
Disadvantages
• Advantages
– Interoperability
– A natural high-level architectural style for heterogeneous distributed systems
– Understandability: Small number of tiers, similar to layered-system properties
– Reusability: Especially with regard to legacy applications
– Scalability: Powerful enough server tiers can accommodate many clients
– Distributability: Components communicate over a network, generally
• Disadvantages
– Visibility, Maintainability: Difficult to analyze and debug
» Distributed state
» Potential for deadlock, starvation, race conditions, service outages
– Simplicity: Require sophisticated interoperability mechanisms
» Data marshalling and unmarshalling
» Proxies and stubs for RPC
» Legacy wrappers
ICS 123
31
Topic 3
Architectural
Styles
Some Criteria for Selecting
and Comparing Styles
• Control flow
• Data flow
• Application
• Distribution
• Scalability
• What else?
What other styles can you think of?

More Related Content

Similar to ics123-03-architectural-styles.ppt

Se ii unit3-architectural-design
Se ii unit3-architectural-designSe ii unit3-architectural-design
Se ii unit3-architectural-designAhmad sohail Kakar
 
Software architecture 4
Software architecture 4Software architecture 4
Software architecture 4Ahmad Zee
 
Cross layer design and optimization
Cross layer design and optimizationCross layer design and optimization
Cross layer design and optimizationDANISHAMIN950
 
naveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agilenaveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agileNaveed Kamran
 
Software Architecture
Software ArchitectureSoftware Architecture
Software ArchitectureAhmed Misbah
 
Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering arvind pandey
 
Introduction to ARCHITECTURAL LANGUAGES
Introduction to ARCHITECTURAL LANGUAGESIntroduction to ARCHITECTURAL LANGUAGES
Introduction to ARCHITECTURAL LANGUAGESIvano Malavolta
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecturetahir khan
 
session on pattern oriented software architecture
session on pattern oriented software architecturesession on pattern oriented software architecture
session on pattern oriented software architectureSUJOY SETT
 
architectural design
 architectural design architectural design
architectural designPreeti Mishra
 
Software Engineering Lec 8-design-
Software Engineering Lec 8-design-Software Engineering Lec 8-design-
Software Engineering Lec 8-design-Taymoor Nazmy
 

Similar to ics123-03-architectural-styles.ppt (20)

Se ii unit3-architectural-design
Se ii unit3-architectural-designSe ii unit3-architectural-design
Se ii unit3-architectural-design
 
Software architecture 4
Software architecture 4Software architecture 4
Software architecture 4
 
Cross layer design and optimization
Cross layer design and optimizationCross layer design and optimization
Cross layer design and optimization
 
Architec design introduction
Architec design introductionArchitec design introduction
Architec design introduction
 
DSchap-02.ppt
DSchap-02.pptDSchap-02.ppt
DSchap-02.ppt
 
naveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agilenaveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agile
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
 
Architectural design
Architectural designArchitectural design
Architectural design
 
Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering
 
Software Design - SDLC Model
Software Design - SDLC ModelSoftware Design - SDLC Model
Software Design - SDLC Model
 
Clean sw 3_architecture
Clean sw 3_architectureClean sw 3_architecture
Clean sw 3_architecture
 
Introduction to ARCHITECTURAL LANGUAGES
Introduction to ARCHITECTURAL LANGUAGESIntroduction to ARCHITECTURAL LANGUAGES
Introduction to ARCHITECTURAL LANGUAGES
 
ds2p1.pptx
ds2p1.pptxds2p1.pptx
ds2p1.pptx
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
session on pattern oriented software architecture
session on pattern oriented software architecturesession on pattern oriented software architecture
session on pattern oriented software architecture
 
architectural design
 architectural design architectural design
architectural design
 
Software Engineering Lec 8-design-
Software Engineering Lec 8-design-Software Engineering Lec 8-design-
Software Engineering Lec 8-design-
 
distributed system original.pdf
distributed system original.pdfdistributed system original.pdf
distributed system original.pdf
 
System models
System modelsSystem models
System models
 

Recently uploaded

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

ics123-03-architectural-styles.ppt

  • 1. ICS 123 Architectural Styles ICS 123 Richard N. Taylor and Eric M. Dashofy UC Irvine http://www.isr.uci.edu/classes/ics123s02/ * with very special thanks to David S. Rosenblum for the use of his materials..
  • 2. ICS 123 2 Topic 3 Architectural Styles Architectural Styles • “A set of design rules that identify the kinds of components and connectors that may be used to compose a system or subsystem, together with local or global constraints on the way the composition is done” (Shaw & Clements, 1996) • A set of constraints you put on your development to elicit desirable properties from your software architecture. – Constraints may be: » Topological » Behavioral » Communication-oriented » etc. etc.
  • 3. ICS 123 3 Topic 3 Architectural Styles Architectural Styles vs. Design Patterns • Many similarities between patterns and styles – Goal: packaged engineering experience – Formulation: organization and interaction among “key” components • But they have come from different communities – Many architectural styles have been well known for a long time in the software engineering community – Patterns are a relatively recent development in OO design • Differences Architectural Styles Design Patterns Few Many Large-scale system organization Localized, small-scale design solutions
  • 4. ICS 123 4 Topic 3 Architectural Styles Characterizing Architectural Styles • Component and Connector characteristics • Allowed configurations • Underlying computational model • Stylistic invariants • Common examples of its use • Advantages and disadvantages • Common specializations
  • 5. ICS 123 5 Topic 3 Architectural Styles • Components – Individual programs transforming input data to output data • Connectors – Unidirectional or bidirectional data streams • Configurations – Parallel linear composition of program invocations • Underlying computational model – Sequential data flow and transformation • Stylistic invariants – Every component has one input predecessor and one output successor • Common specializations – Pipelines: single linear composition of pipes and filters – Bounded pipes, typed pipes The primary architectural style supported by UNIX The Pipe-and-Filter Style
  • 6. ICS 123 6 Topic 3 Architectural Styles Pipe-and-Filter Example: UNIX Text Processing % pic mydoc.t | eqn | tbl | troff | lpr pic eqn tbl troff lpr Component Connector Legend:
  • 7. ICS 123 7 Topic 3 Architectural Styles Pipe-and-Filter Advantages and Disadvantages • Advantages – Simplicity: Simple, intuitive, efficient composition of components – Reusability: High potential for reuse of components – Evolvability: Changing architectures is trivial – Efficiency: Limited amount of concurrency (contrast batch-sequential) – Consistency: All components have the same interfaces, only one type of connector – Distributability: Byte streams can be sent across networks • Disadvantages – Batch-oriented processing – Must agree on lowest-common-denominator data format – Does not guarantee semantics – Limited application domain: stateless data transformation
  • 8. ICS 123 8 Topic 3 Architectural Styles The Layered System Style • Components – Programs or subprograms • Connectors – Procedure calls or system calls • Configurations – “Onion” or “stovepipe” structure, possibly replicated • Underlying computational model – Procedure call/return • Stylistic invariants – Each layer provides a service only to the immediate layer “above” (at the next higher level of abstraction) and uses the service only of the immediate layer “below” (at the next lower level of abstraction)
  • 9. ICS 123 9 Topic 3 Architectural Styles Layered Virtual Machine Example: Java Java Virtual Machine Processor Operating System Java Virtual Machine Java Application (Virtual Machine Style)
  • 10. ICS 123 10 Topic 3 Architectural Styles Layered System Example: OSI Protocol Stack Application Presentation Session Transport Network Data Link Physical Application Presentation Session Transport Network Data Link Physical Network Data Link Physical Network Data Link Physical
  • 11. ICS 123 11 Topic 3 Architectural Styles Layered System Advantages and Disadvantages • Advantages – Decomposability: Effective separation of concerns – Maintainability: Changes that do not affect layer interfaces are easy to make – Evolvability: Potential for adding layers – Adaptability/Portability: Can replace inner layers as long as interfaces remain the same (consider swapping out a Solaris JVM for a Linux one) – Understandability: Strict set of dependencies allow you to ignore outer layers • Disadvantages – Performance degrades with too many layers – Can be difficult to cleanly assign functionality to the “right” layer
  • 12. ICS 123 12 Topic 3 Architectural Styles The Blackboard Style • Components – Blackboard client programs • Connector – Blackboard: shared data repository, possibly with finite capacity • Configurations – Multiple clients sharing single blackboard • Underlying computational model – Synchronized, shared data transactions, with control driven entirely by blackboard state • Stylistic invariants – All clients see all transactions in the same order
  • 13. ICS 123 13 Topic 3 Architectural Styles Blackboard Example: A Chat Room Chat Transcript Chat Participant Chat Participant Chat Participant Chat Participant Chat Participant
  • 14. ICS 123 14 Topic 3 Architectural Styles Blackboard Advantages and Disadvantages • Advantages – Simplicity: Only one connector (the blackboard) that everyone uses – Evolvability: New types of components can be added easily – Reliability(?): Concurrency controls of information, traditionally a tricky problem, can be largely addressed in the blackboard • Disadvantages – Blackboard becomes a bottleneck with too many clients – Implicit “partitions” of information on the blackboard may cause confusion, reduce understandability
  • 15. ICS 123 15 Topic 3 Architectural Styles The Hypertext Style • Components – “Documents” and document parts • Connectors – Unidirectional hyperlinks between document parts • Configurations – Arbitrary topology of linked documents • Underlying computational model – Bidirectional hyperlink traversal • Stylistic invariants – Adherence to standardized document formats
  • 16. ICS 123 16 Topic 3 Architectural Styles Hypertext Example: The World Wide Web HTML Document HTML Document Java Applet GIF Image Text Document
  • 17. ICS 123 17 Topic 3 Architectural Styles Hypertext Advantages and Disadvantages • Advantages – Efficiency: Can organize large amounts of non-uniform data – Adaptability: New types of applications and data can be integrated – Distributability: Well-suited to wide-area distributed application – Scalability: Lack of centralization allows millions of clients (cf. the Web) – Flexibility: Few constraints on topology, organization • Disadvantages – Reliability (consider broken links) – Somewhat difficult to maintain context – Need for sophisticated indexing mechanisms – Need for sophisticated version control
  • 18. ICS 123 18 Topic 3 Architectural Styles Event-Based Systems and the Implicit Invocation Style • Components – Programs or program entities that announce and/or register interest in events • Connectors – Event broadcast and registration infrastructure • Configurations – Implicit dependencies arising from event announcements and registrations • Underlying computational model 1. Event announcement is broadcast 2. Procedures associated with registrations (if any) are invoked
  • 19. ICS 123 19 Topic 3 Architectural Styles Implicit Invocation Example: Program Debugging (1) Debug events Interactive Program Debugger Application Program Breakpoint Routine Set breakpoint line 10
  • 20. ICS 123 20 Topic 3 Architectural Styles Implicit Invocation Example: Program Debugging (2) Debug events Interactive Program Debugger Application Program Breakpoint Routine line 10
  • 21. ICS 123 21 Topic 3 Architectural Styles Implicit Invocation Example: Program Debugging (3) Interactive Program Debugger Application Program Breakpoint Routine Line 8 reached Debug events line 10
  • 22. ICS 123 22 Topic 3 Architectural Styles Implicit Invocation Example: Program Debugging (4) Interactive Program Debugger Application Program Breakpoint Routine Line 10 reached Debug events line 10 Implicit Invocation!
  • 23. ICS 123 23 Topic 3 Architectural Styles Implicit Invocation Advantages & Disadvantages • Advantages – Reusability: Components can be put in almost any context – Distributability: Events are independent and can travel across the network – Interoperability: Components may be very heterogeneous – Visibility: Events are a reified form of communication that can be logged and viewed – Robustness: Components in this style generally have to be written to tolerate failure or unexpected circumstances well • Disadvantages – Reliability: Components announcing events have no guarantee of getting a response – Simplicity: Components announcing events have no control over the order of responses, so they must be robust enough to handle this – Understandability: Difficult to reason about the behavior of an announcing component independently of the components that register for its events – Event abstraction does not cleanly lend itself to data exchange
  • 24. ICS 123 24 Topic 3 Architectural Styles Distributed Peer-to-Peer Systems • Components – Independently developed objects and programs offering public operations or services • Connectors – Remote procedure call (RPC) over computer networks • Configurations – Transient or persistent connections between cooperating components • Underlying computational model – Synchronous or asynchronous invocation of operations or services • Stylistic invariants – Communications are point-to-point
  • 25. ICS 123 25 Topic 3 Architectural Styles Client/Server Systems • Client/Server systems are the most common specialization (restriction) of the peer-to-peer style • One component is a server offering a service • The other components are clients using the service • Server implementation is transparent but can be centralized or distributed, single-threaded or multi- threaded – Single interface point with physically distributed implementation – Dynamic, transparent selection from among multiple interface points
  • 26. ICS 123 26 Topic 3 Architectural Styles Client/Server Example: The World Wide Web HTTP (asynchronous RPC) www.ics.uci.edu Netscape Navigator Microsoft IE Browser Clients Web Servers
  • 27. ICS 123 27 Topic 3 Architectural Styles 3-Tier Client/Server Systems • 3-Tier Client/Server systems are a common class of distributed business systems – Increasing competition requires business to find new ways of exploiting legacy information assets • First tier: Client (user interface) tier • Second (middle, “business logic”) tier: Servers acting as “business objects”, encapsulating abstract, integrated models of multiple, disparate data sources • Third (back-end, database) tier: Legacy business applications providing data services
  • 28. ICS 123 28 Topic 3 Architectural Styles 3-Tier System Example: Marketing at a TelCo Client Tier Customer Loss Analysis Server Tier Legacy Tier Customer Billing System Network Services Provisioning System Legacy Wrappers Telemarketing Agent (CA) Telemarketing Agent (NY) Client/ Server Middleware
  • 29. ICS 123 29 Topic 3 Architectural Styles The Real Peer-to-Peer Apps • Napster • SETI-at-home (well, not really) • Gnutella • Groove • Magi • Web Services
  • 30. ICS 123 30 Topic 3 Architectural Styles Peer-to-Peer Advantages and Disadvantages • Advantages – Interoperability – A natural high-level architectural style for heterogeneous distributed systems – Understandability: Small number of tiers, similar to layered-system properties – Reusability: Especially with regard to legacy applications – Scalability: Powerful enough server tiers can accommodate many clients – Distributability: Components communicate over a network, generally • Disadvantages – Visibility, Maintainability: Difficult to analyze and debug » Distributed state » Potential for deadlock, starvation, race conditions, service outages – Simplicity: Require sophisticated interoperability mechanisms » Data marshalling and unmarshalling » Proxies and stubs for RPC » Legacy wrappers
  • 31. ICS 123 31 Topic 3 Architectural Styles Some Criteria for Selecting and Comparing Styles • Control flow • Data flow • Application • Distribution • Scalability • What else? What other styles can you think of?

Editor's Notes

  1. University of California, Irvine
  2. University of California, Irvine
  3. University of California, Irvine
  4. University of California, Irvine
  5. University of California, Irvine
  6. University of California, Irvine
  7. University of California, Irvine
  8. University of California, Irvine
  9. University of California, Irvine
  10. University of California, Irvine
  11. University of California, Irvine
  12. University of California, Irvine
  13. University of California, Irvine
  14. University of California, Irvine
  15. University of California, Irvine
  16. University of California, Irvine
  17. University of California, Irvine
  18. University of California, Irvine
  19. University of California, Irvine
  20. University of California, Irvine
  21. University of California, Irvine
  22. University of California, Irvine
  23. University of California, Irvine
  24. University of California, Irvine
  25. University of California, Irvine
  26. University of California, Irvine