Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Software Architecture
1. Software Architecture
Henry Muccini
henry.muccini@univaq.it, @muccinihenry, henrymuccini.com
DISIM
Dep.nt of Information Engineering, Computer Science and Mathematics
University of L’Aquila, Italy
2. The material in these slides may be freely reproduced
and distributed, partially or totally, as far as an explicit
reference or acknowledge to the material author is
preserved.
SEA Group
3. Software Architecture
The Software Architecture is the earliest model
of the whole software system created along the
software lifecycle
“Traditional” definition:
→A set of components and connectors communicating through
interfaces
“More Recent” understanding
“Other facets”
SEA Group
→A set of architecture design decisions taken to generate the
architecture artifact
→Focus on set of Views and Viewpoints, looking at
stakeholders and their concern
5. Software Architecture definitions
Perry and Wolf, ’92 (aspects):
→“Architecture is concerned with the selection of architectural elements, their
interactions, and the constraints on those elements and their interactions necessary
to provide a framework in which to satisfy the requirements and serve as a basis for
the design.”
→Elements are divided into processing elements, data elements and connection
elements
Garlan and Shaw, ’93 (elements):
→ Architecture for a specific system may be captured as “a collection of
computational components - or simply components - together with a description of
the interactions between these components - the connectors -”
Sommerville, 7th edition, ’04 (process):
→ The design process for identifying the sub-systems making up a system and the
framework for sub-system control and communication is architectural design. The output
of this design process is a description of the SA.
SEA Group
6. In general terms…
SA describes (in a more or less “formal” notation) how a system is
structured into components and connectors…
SEA Group
→Components
→Connectors
→Channels and Ports
… and how these components interact
→ Scenarios
→State Diagrams
→…
SA Structure (topology)
SA Dynamics (behavior)
7. Process (1)
SEA Group
SofStwofatrwea Arerc Shyitsetcetmure
Architectural
components
SofStwofatrwea Arerc Shyitsetcetmure
Composition
Rules
Constraints
Ideal World Real World Requirements
8. Process (2)
SEA Group
Architectural constraints
and requirements
Ideas
Constraints
Req1:..
Req2:..
Req3:..
………
Architectural
requirements
C2
C3
C1
C4
Software
Architecture
Software
Architecture
synthesis
C2
C3
C1
Software C4
Architecture
Evaluation and prototype
Decisions making
10. Components
A component is a building block that is …
→A unit of computation or a data store, with an interface
SEA Group
specifying the services it provides and requires
→A unit of deployment
→A unit of reuse
─ e.g., client, server, database, filters, ...
C1
S1
S2
S3
S’x
S’Y
provided
services
required
services
11. Component: Example
Supply manager:
This module task is to
automatically satisfy the request
of supplies by the TLs,
it forwards the request of supplies
to the military warehouse in order
to automatically set up the
shipping of supplies for whose that
requested it.
It will not always send all the
supplies requested since it
depends on the warehouse
resources availability and, more
important, on the rules that has
been set by the HQ user.
SEA Group
12. Components vs Objects
The level of abstraction is usually different
Size
SEA Group
→Objects tend to be small
→Components can be small (one object) or large (a library of
objects or a complete application)
An architectural component may be implemented by
several objects
Lifecycle
→Objects are created and destroyed constantly
→Components are created and destroyed infrequently
13. Connectors
A connector is a building block that enables interaction among
components
→Events
→Client/server middleware
→Messages and message buses
→Shared variables
→Procedure calls (local or remote)
→Pipes
Connectors may be implicit or explicit
→Connectors sometimes are just channels
→Connectors sometimes have their own logic and complexity
Connectors may be endogenous or exogenous
SEA Group
14. Components and Connectors
A component is (or should be) independent of the
context in which it is used to provide services
A connector is (or should be) dependent on the
context in which it is used to connect components
Connectors sometimes are modeled as special kinds of
components
SEA Group
15. Interfaces
An interface is the external connection of a
component (or connector) that describes how to
interact with it
Provided and required interfaces are important
Spectrum of interface specification
SEA Group
→ Loosely specified (events go in, events go out)
→ API style (list of functions)
→Very highly specified (event protocols across the interface
in CSP)
16. Architecting: example
SEA Group
GUI
FeedService
Common FeedService
Action
NewsFeeder
Action
Admin
Action
Factory
FeedDelegate
POJOs
NewsFeeder
DAO
FeedDAO
NewsFeederDAO
FeedDAO
FeedDelegate
Transfer
Object
ValidatorService
NewsFeederDelegate
NewsFeeder
DelegatePOJOs
Browser
(html
javascript)
Web
Services
DATABASE
Trasformation
Validation
BusinessFactory
Validation
Service
17. Architecting: example
SEA Group
GUI
FeedService
FeedService
Common
Action
NewsFeeder
Action
Admin
Action
Factory
FeedDelegate
PresentationExtensionOut
PresentationExtensionIn
BusinessExtensionOut
FeedDelegate
POJOs
NewsFeederDelegate
NewsFeeder
DAO
FeedDAO
NewsFeederDAO FeedDAO
Transfer
Object
ValidatorService
NewsFeeder
DelegatePOJOs
Browser
(html
javascript)
Web
Services
DATABASE
Trasformation
Validation
BusinessFactory
Validation
Service
BusinessExtensionIn
18. Architectural Elements vs Design Elements
“Architecture is concerned with the selection of
architectural elements, their interactions, and the
constraints on those elements and their interactions
necessary to provide a framework in which to satisfy
the requirements and serve as a basis for the
design.”
“Design is concerned with the modularization and
detailed interfaces of the design elements, their
algorithms and procedures, and the data types
needed to support the architecture and to satisfy the
requirements.”
(Perry & Wolf 92)
SEA Group
19. Architectural Elements vs Design Elements
“The architecture of a software system defines that
system in terms of computational components and
interactions among those components. … In addition
to specifying the structure and topology of the
system, the architecture shows the correspondence
between the requirements and elements of the
constructed system, thereby providing some
rationale for the design decisions.”
(Shaw & Garlan 96)
SEA Group
21. SA dynamics
The SA dynamics is expressed in terms of component
interactions via connectors
•Labeled Transition Systems
•Automata
•UML StateCharts, Sequence Diagrams, Activity Diagrams
•State Diagrams
•Message Sequence Charts
•…
SEA Group
22. SEA Group
AN EXAMPLE : E-COMMERCE SYSTEM
Customer Interface
Customer Process
Web Server
Customer Server
Cart Server
Order Server
Catalog Server
Delivery Order
Process
SA Static Description
23. SEA Group
AN EXAMPLE : E-COMMERCE SYSTEM
CustomerInterface
CustomerProcess CatalogServer
BrowseCatalog
BrowseCatalog
ReadStatus
Catalog Page
Output Page
Catalog Info
SA Dynamic Description :
Registered Customer
Catalog DB
Involved
Browse Catalogue Sequence Diagram
24. SEA Group
AN EXAMPLE : E-COMMERCE SYSTEM
CustomerInterface
Registered Customer
CustomerProcess CartServer
PlaceOrderReq
PlaceOrder
ReadStatus
Cart DB
Involved
pageOrder
OutputPage
OrderServer
Order DB
Involved
EmptyCart
Cart DB
Involved
CustomerServer
ReadInfo
Customer
DB Involved
DeliveryOrderProcess
createNewOrder
OrderInfo
newOrder
CartInfo
CustomerInfo
OrderInfo
SA Dynamic Description :
Place Order Sequence Diagram (success)
25. SEA Group
AN EXAMPLE : E-COMMERCE SYSTEM
CustomerInterface
CustomerProcess CartServer
PlaceOrderReq
PlaceOrder
ReadStatus
errorPage
emptyCart
SA Dynamic Description :
Registered Customer
Cart DB
Involved
OutputPage
Place Order Sequence Diagram (empty cart)
27. Architecture Is a Set of Software
Structures
“The software architecture of a system is the set of
structures needed to reason about the system, which
comprise software elements, relations among them,
and properties of both.” [SAinPractice_book]
SEA Group
28. Architecture Is a Set of Software
Structures
Three categories of structures:
1. Structure = implementation units = modules
2. Dynamic structures
3. mapping from software structures to the system’s
SEA Group
organizational, developmental, installation, and
execution environments.
implications
30. Application Example: Voting System
“We want to build a software system that allows
people to vote electronically.
SEA Group
→ The citizen goes to the electoral place, and she votes using
a hw/sw device.
→ The vote is stored locally and automatically sent to other
computers.
→ The citizen identity must be validated by the system
→ …”
31. Basic Requirement Example
The voting system must satisfy the following
requirements:
SEA Group
→ One voter – one vote (no more than one vote for voter)
→ The voter can vote in only one previous designated voting
place
→ The voter must be identified by the election officials at the
voting place
─ The citizen identity must be validated by the system
→ It is not possible to trace the votes back to the voters
→ The election officials can’t read the results, guarantying that
the results are unknown until the end of the voting process