Architectural design may be independent from the domain analysis.
The same architecture may be used on different projects.
University of Nantes — LS2N, France
Gerson Sunyé gerson.sunye@univ-nantes.fr
Software architecture is the high level structure of a software system, the discipline of creating such structures, and the documentation of these structures.
It is the set of structures needed to reason about the software system, and comprises the software elements, the relations between them, and the properties of both elements and relations.
Strategical choices for system design and implementation.
Use a n-tiers architecture.
Use REST for remote procedure call.
Use the MVC framework for partitioning business classes and user interfaces.
Respect the Google Java Style for source code.
Access methods should start with get and set.
Use a graph database for persisting data.
Architectural design may be independent from the domain analysis.
The same architecture may be used on different projects.

Describes the internal organization of the software packages. Represented as UML Package Diagrams
depicts how the major processes and components are mapped on to the applications hardware. Represented as UML Deployment Diagrams
describes the concurrency and communications elements of an architecture. Represented as UML Activity Diagrams or UML Interaction Diagrams
Describes architecturally significant elements of the architecture and the relationships between them. Represented as UML Component Diagrams
Describes how the system will be operated, administered, and supported when it is running in its production environment.
Describes the way that the architecture stores, manipulates, manages, and distributes information.
describes how the system should be tested and evaluated.
capture the requirements for the architecture, related to more than one particular view
Philippe Kruchten. «The 4+1 View Model of Architecture». In IEEE Software, vol. 12, no. 6, November 1995, pp. 42-50.
Christine Hofmeister et al. «A general model of software architecture design derived from five industrial approaches».
In The Journal of Systems and Software 80 (2007), pp. 106-126.
Rozanski, Nick & Woods, Eoin. «Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives».
In Addison-Wesley, October 2011.
Describes how programmers should organize the software source code:
Dependencies, versioning, code generation, build, etc.
Sometimes called «Application» or «Module» view.
UML Package diagrams show package organization and dependencies between packages.

elements are imported from one namespace to another.
elements from the target namespace are simply used.
defines how a package extends another.
Acyclic Dependency
Stable Dependencies
Stable Abstractions
If the SOLID principles tell us how to arrange the bricks into walls and rooms, then the component principles tell us how to arrange the rooms into buildings.
Robert C. Martin, «Clean Architecture: A Craftsman’s Guide to Software Structure and Design»
Circular dependencies between packages are forbidden and should be eliminated.
All the dependencies should be directed from less stable modules that change often to more stable modules that change less often.
The stability of any component must be proportional to its abstraction level.
Clients should not depend on functionalities they do not need
Classes that tend to be reused together belong in the same component
provides service to the layer above it and
serves as a client to the layer below it.
Mark Richards, «Software Architecture Patterns, 2nd Edition». In O’Reilly Media, Inc. August 2022.


Source code dependencies must point only inward, toward higher-level policies.
Describes how system engineers should deploy software artifacts on logical nodes.
Defines the network topology (node organization) and communication paths.
Specify deployment constraints for artifacts: required hardware, libraries, resources, etc.).
source files, models, scripts, binaries, documents, configuration files, etc.

Nodes are logical resources, on which artifacts are deployed.
Nodes are connected through communication paths.
Node instances may also be represented.

The system is organized as a set of services and their associated servers and clients that access and use those services.
The unit of reuse is the unit of release.
Classes and modules that are formed into a component must belong to a cohesive group and should be released together.
Describes the process flow of control mode and process concurrency for each executable unit (processes, threads).
If each component executes in its own process, detailed information should be provided.
Related quality factors: performance and scalability.
there is a single flow of control. i.e, one thing, and one thing only, can take place at a time.
there are multiple simultaneous flow of control i.e, more than one thing can take place at a time.
procedural, event-driven, batch, etc.
Synchronization means arranging the flow of controls of objects so that mutual exclusion is guaranteed.

Sequential
Guarded
Concurrent
Clients must coordinate outside the object so that only one flow is in the object at a time
Multiple flow of control is sequentialized with the help of object’s guarded operations. In effect it becomes sequential.
Multiple flow of control is guaranteed by treating each operation as atomic
May be intrinsic, imposed by the environment: multiples user interfaces, etc. For instance:
Swing creates a separate thread for the user interface.
Remote Procedure Call (RPC) middleware creates a thread for processing calls: e.g. Java RMI or Apache Thrift.
Or a design choice:
Parallel processing
Redundancy
Active classes are just classes which represents an independent flow of control
When an active object is created, the associated flow of control is started; when the active object is destroyed, the associated flow of control is terminated
Standard stereotypes that apply to active classes are:
specifies a heavyweight flow that can execute concurrently with other processes.
specifies a lightweight flow that can execute concurrently with other threads within the same process.

Naive approach:
Assign a process/thread for each active objet.
Consequences:
Context Switching Overhead
Wasted system resources: inactive processes waiting for new events.
Concurrency design patterns:
Proactor.
Reactor.
Thread pool
Actors (Scala, Erlang).
Atomic objects: Integer, String, etc.
Priority queue.
Blocking queue.
Concurrent associative array.
Concurrency
Interrupt
Guarded Call
Rendezvous
Cyclic Executive
Round Robin
Static Priority
Dynamic Priority
Function-Oriented Pipelining
A sequence of filters that transform (filter) data before passing it on via pipes to other filters.

Use a component diagram to show components and their provided and required interfaces.
Describe component responsibilities
Other important information, e.g.,
Dependencies
Non-functional properties (e.g., maximum memory usage, reliability, required test coverage, etc.)
Mandated implementation technology (e.g., EJB, COM, etc.)
All shared data is held in a central database that can be accessed by all subsystems.

Redundancy specification
Limit conditions forecast:
Initializations
Finalization
Failure management and restart.
Retry operation
Use redundant information to correct failure
Go to a fail-safe state
Alert someone
Restart the system
Watchdog: a simple polling process.
Protected Single Channel
Homogeneous Redundancy
Triple Modular Redundancy
Heterogeneous Redundancy
Monitor-Actuator
Sanity Check
Safety Executive
An architectural style is 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
An architectural pattern is a general, reusable resolution to a commonly occurring problem in software architecture within a given context
Microservices
Blackboard
Client-server (2-tier, 3-tier, n-tier)
Component-based
Data-centric
Event-driven (or Implicit invocation)
Layered
Monolithic application
Peer-to-peer (P2P)
Pipes and filters
Plug-ins
Representational state transfer (REST)
Rule-based
Service-oriented
Shared nothing
Space-based
Persistence Free
Cloud Computing
Architectural Patterns
Reliability Patterns
Design Patterns
Concurrency Patterns