03 Architecture
03 Architecture
January 2014
© 2014 Jonathan Aldrich These materials may not be duplicated or distributed without advance
written permission from the author.
Outline
• What is software architecture?
• What are its benefits?
Software Architecture
What is (Building) Architecture?
And why is it useful?
Software Architecture
What is Software Architecture?
Example Architecture:
Potsdam Observatorium
Software Architecture
Where Architecture Fits
• Requirements What
– What the system should do
– What properties it should have
• Detailed design
– Lower-level design, how system functions
• Code How
Software Architecture
Two Architectures for Web Search
Architecture
Altavista A
search engine Architecture
Google B
search engine
requests requests
Big server
Cluster of
commodity
How does architecture affect system properties? servers
• Modifiability / ease of change
• Consistency of results
• System cost
• Scalability of system
• Reliability of system
Software Architecture
Two Architectures for Sending Email
sendmail qmail
Modules within sendmail process Processes implementing qmail
requests requests
Big server
Cluster of
• Sendmail was the dominant email client from 1982 until 2000.
commodity
• In 1988 the Morris worm, the first internet worm, took advantage of a
servers
sendmail vulnerability; many other vulnerabilities have been found
since.
• By 2000 sendmail had begun a steep and permanent decline, and
qmail was growing exponentially.
Software Architecture
Architecture is an Abstraction
• Focus on principal design decisions
– Structure – components and connections
– Behavior – responsibilities of each component,
high level algorithms
– Interaction – rules governing how components communicate
Software Architecture
Outline
• What is software architecture?
• What are its benefits?
Software Architecture
Architecture Benefits: System Properties
Software Architecture
Business Case: Cell Phones [M. Bass]
• Market is driven by killer products
– e.g. Razr, iPhone
• Most profit is made at initial release
– Premium charged on initial sales
– Drops rapidly when copycats arrive
Software Architecture
Telecom Architecture Scenario
• Context: telecommunications wholesaler
– Provides services both to end users and resellers
– 8 legacy applications built with different interfaces, technologies
Software Architecture
Telecom Architecture Solution
• Service-Oriented Architecture
– Wrap legacy applications with a standard web services interface
– Automate tasks using scripting (BPEL)
Software Architecture
Outline
• What is software architecture?
• What are its benefits?
Software Architecture
How to Develop a Software Architecture
Software Architecture
Tradeoffs in Architecture Investment
Software Architecture
Driving Architecture via Risks
• Low risk little investment needed
– Typically use a reference architecture (e.g. 3-tier web)
– Reference architectures capture (“hoist”) known domain risks
Software Architecture
Domain-Specific Architectures
• Pattern: A reusable solution to a recurring architecture design problem
web
Software Architecture
Domain-Specific Architectures
• Pattern: A reusable solution to a recurring architecture design problem
web
Software Architecture
Architecture-Organization Alignment
Software Architecture
Architectural Views
• Many possible “views” of architecture
– Implementation structures
• Modules, packages
Software Architecture
Why Document Architecture?
• Blueprint for the system
– Artifact for early analysis
Software Architecture
What is Wrong Today?
• In practice today’s documentation
consists of
– Ambiguous box-and-line diagrams
Software Architecture
What could the arrow mean?
Software Architecture
What could the arrow mean?
• Many possibilities
– A passes control to B
Software Architecture
Representing C&C Views
system
component
port role
Software Architecture
Guidelines: Avoiding Ambiguity
• Always include a legend
• Define precisely what the boxes mean
Software Architecture
Technique: Hierarchy
• Use hierarchy to define elements in more
detail in separate views
Software Architecture
Top-level C&C View Legend
Web Component
Administrator Façade
Console Component LDAP Directory
RDBMS
Direct Adapter
Engine
Meta
Rule & Integrated
Configuration Data Rep Indirect Adapter
DB
Controller
Viewer
Interface
Transaction Log
SOAP Connector
& roles
LDAP Connector
& roles
Manager
Adapter
DB Connector
Adapter1
Adapter2
Aapter2
Change Log Indirect
Aapter1
Indirect
Direct
Direct
& roles
RMI Connector
& roles
Event Bus
Connector
& roles
Adapter
Registry
System Boundary
Software Architecture
Showing Details of Component
Legend
Message
Handler
Transaction
Agent
Coordinator
Send port
Receive port
Context
<Façade
Rule Router Component>
Receiver
Translator
<Configuration DB>
Rule and
Engine
Join
<Event Bus>
Software Architecture
Outline
• What is software architecture?
• What are its benefits?
Software Architecture
Conclusion: Key Takeaways
• Architecture captures high-level design of software
– Structure and communication
– Key design decisions
Software Architecture
Extra: Architecture Research at CMU
• Architecture-based development
– Synchronizing code and architecture
– Verifying constraints at architectural interfaces
Software Architecture
References and Further Reading
References Software Architecture: Perspectives on an Emerging
Discipline. Mary Shaw and David Garlan. Prentice Hall, 1996.
Software Architecture: Foundations, Theory, and Practice.
Software Architecture