Software Architecture
in Practice
Erwann Wernli (@wrnli)
System architect, SBB
Agenda
Your job as an architect
Architecture and organisation
Your toolbox
Your job as an architect
NFR
Technologie
Modularisation
Architecture
Levels of architecture
● Enterprise
● Application
● Component
Modularisation
The system is decomposed in components
Each component has a lifecycle
Components provide and require interfaces
Two components connected form a dependency
Your job
● Group things that have the same lifecycle together
(“What changes together goes together”)
● Expose interfaces that provide capabilities and hide
internal details
● Manage dependencies
● Manage cross-cutting concerns
● (!) Several decompositions are possible!
Well-known principles
● Single-responsibility principle
● Separation of concerns
● Information hiding
● Cohesion/coupling
Examples
Enterprise ● Interfaces between IT domains
● Customer Information - Logistics
Application ● Interfaces between applications
● Shopping Cart App - Product Catalog app
Component ● Interfaces between classes
● e.g. Data access layer - Business Logic
● e.g. Layering
Technology
You realize software systems with various technologies
● Platform technologies, e.g. AWS EC2
● Application technologies, e.g Spring, HTTP
● Development technologies, e.g. IntelliJ, git, Jenkins
Technologies enable various architectural patterns:
● Eventual consistency vs. Strong consistency
● Synchronous vs Event-driven architecture
● …
Your job
● Define architectural patterns
● Select technologies for your architecture
● Balance “cost of ownership” vs “benefit”
● Balance standardisation vs specialisation of technologies
Examples
Enterprise ● Cloud providers, e.g. AWS vs Azure
● Central services, e.g. APIM, IAM
● Java vs C#
Application ● Synchronous vs Asynchronous API
● NoSQL vs Transactional DB
● SPA vs. Server-side Rendering
● Monitoring technology
Component ● Spring Webflux (reactive) vs Spring Function
● Concurrency approach (Threads, Channels, etc.)
● Object-Relational Mapping
NFR
Every application has non-functional requirements,
sometimes implicitly:
● Performance
● Availability,
● Maintainability,
● …
Having 10 customers is not the same as 1 mio. Storing bank
transactions is not the same as storing to-do lists.
Your job
● Figure out how to decompose the system (modularity)
and use technologies to meet the NFRs.
● Balance NFR and costs of development / operations.
● Make the NFR and trade-off explicit
Examples
Enterprise ● Security strategy
● Multi-cloud strategy
Application ● 99.8 availability of application X
● Processing time of operation X < 50ms
Component ● Memory need of algorithm X
Fit for purpose
https://www.enterpriseintegrationpatterns.com/ramblings/86_isthisarchitecture.html
Fit for purpose
Architecture 1 Architecture 2
Modularity Webapp with product search and
shopping cart combined
Product search and shopping cart
as microfrontend
Technology LAMP (Linux/Apache/Mysql/PHP) Java, Spring, Postgres, Docker,
Kafka
NFR Everybody work in the same
codebase (Maintainability)
Single database for search and
shopping cart (Scalability)
Two codebases (Maintainability)
Read model for product search can
scale independently of write model
for shopping cart (Scalability)
Architecture and Teamwork
If development is collaborative, managing collective knowledge is a challenge.
Architecture tends to reflect the organisation (and not the way around)
https://en.wikipedia.org/wiki/Conway%27s_law
Knows
Component A
Knows
Component B
Your job
● Communicate the architecture
● Define guidelines
● Share knowledge
● Align people
● Decentralize decision making
● Co-evolve architecture and organisation
Who’s the architect?
https://architectelevator.com/transformation/agile_architecture/
Approaches to architecture
Retired: ivory tower architect
Tired: hands-on architect
Wired: architect as change agent
Static
Cost-optimization mentality
Dynamic
Business enabling mentality
Your toolbox
Tools
● Architecture styles
● Architecture patterns
● Architecture frameworks *
● Architecture templates **
● UML
● …
Methods
● Modell visually
● Use architecture viewpoints
● Domain-Driven Design
● Record architecture decisions
● Automate architecture checks***
● …
* e.g. AWS Well-architected Framework
** e.g. Arc42, 4+1
*** e.g. ArchUnit
Your My bookshelf
Inspired from : https://architectelevator.com/architecture/architect-
bookshelf/
Enterprise
Application
Component
(and more)
Summary
● There are three main facets to architecture:
modularisation, technology, and NFR
● Architecture and organisation go hand-in-hand in a
modern organisation
● There’s a vast body of knowledge around architecture -
use it!

Software architecture in practice

  • 1.
    Software Architecture in Practice ErwannWernli (@wrnli) System architect, SBB
  • 2.
    Agenda Your job asan architect Architecture and organisation Your toolbox
  • 3.
    Your job asan architect NFR Technologie Modularisation Architecture
  • 4.
    Levels of architecture ●Enterprise ● Application ● Component
  • 5.
    Modularisation The system isdecomposed in components Each component has a lifecycle Components provide and require interfaces Two components connected form a dependency
  • 6.
    Your job ● Groupthings that have the same lifecycle together (“What changes together goes together”) ● Expose interfaces that provide capabilities and hide internal details ● Manage dependencies ● Manage cross-cutting concerns ● (!) Several decompositions are possible!
  • 7.
    Well-known principles ● Single-responsibilityprinciple ● Separation of concerns ● Information hiding ● Cohesion/coupling
  • 8.
    Examples Enterprise ● Interfacesbetween IT domains ● Customer Information - Logistics Application ● Interfaces between applications ● Shopping Cart App - Product Catalog app Component ● Interfaces between classes ● e.g. Data access layer - Business Logic ● e.g. Layering
  • 9.
    Technology You realize softwaresystems with various technologies ● Platform technologies, e.g. AWS EC2 ● Application technologies, e.g Spring, HTTP ● Development technologies, e.g. IntelliJ, git, Jenkins Technologies enable various architectural patterns: ● Eventual consistency vs. Strong consistency ● Synchronous vs Event-driven architecture ● …
  • 10.
    Your job ● Definearchitectural patterns ● Select technologies for your architecture ● Balance “cost of ownership” vs “benefit” ● Balance standardisation vs specialisation of technologies
  • 11.
    Examples Enterprise ● Cloudproviders, e.g. AWS vs Azure ● Central services, e.g. APIM, IAM ● Java vs C# Application ● Synchronous vs Asynchronous API ● NoSQL vs Transactional DB ● SPA vs. Server-side Rendering ● Monitoring technology Component ● Spring Webflux (reactive) vs Spring Function ● Concurrency approach (Threads, Channels, etc.) ● Object-Relational Mapping
  • 12.
    NFR Every application hasnon-functional requirements, sometimes implicitly: ● Performance ● Availability, ● Maintainability, ● … Having 10 customers is not the same as 1 mio. Storing bank transactions is not the same as storing to-do lists.
  • 13.
    Your job ● Figureout how to decompose the system (modularity) and use technologies to meet the NFRs. ● Balance NFR and costs of development / operations. ● Make the NFR and trade-off explicit
  • 14.
    Examples Enterprise ● Securitystrategy ● Multi-cloud strategy Application ● 99.8 availability of application X ● Processing time of operation X < 50ms Component ● Memory need of algorithm X
  • 15.
  • 16.
    Fit for purpose Architecture1 Architecture 2 Modularity Webapp with product search and shopping cart combined Product search and shopping cart as microfrontend Technology LAMP (Linux/Apache/Mysql/PHP) Java, Spring, Postgres, Docker, Kafka NFR Everybody work in the same codebase (Maintainability) Single database for search and shopping cart (Scalability) Two codebases (Maintainability) Read model for product search can scale independently of write model for shopping cart (Scalability)
  • 17.
    Architecture and Teamwork Ifdevelopment is collaborative, managing collective knowledge is a challenge. Architecture tends to reflect the organisation (and not the way around) https://en.wikipedia.org/wiki/Conway%27s_law Knows Component A Knows Component B
  • 18.
    Your job ● Communicatethe architecture ● Define guidelines ● Share knowledge ● Align people ● Decentralize decision making ● Co-evolve architecture and organisation
  • 19.
  • 20.
    Approaches to architecture Retired:ivory tower architect Tired: hands-on architect Wired: architect as change agent Static Cost-optimization mentality Dynamic Business enabling mentality
  • 21.
    Your toolbox Tools ● Architecturestyles ● Architecture patterns ● Architecture frameworks * ● Architecture templates ** ● UML ● … Methods ● Modell visually ● Use architecture viewpoints ● Domain-Driven Design ● Record architecture decisions ● Automate architecture checks*** ● … * e.g. AWS Well-architected Framework ** e.g. Arc42, 4+1 *** e.g. ArchUnit
  • 22.
    Your My bookshelf Inspiredfrom : https://architectelevator.com/architecture/architect- bookshelf/ Enterprise Application Component (and more)
  • 23.
    Summary ● There arethree main facets to architecture: modularisation, technology, and NFR ● Architecture and organisation go hand-in-hand in a modern organisation ● There’s a vast body of knowledge around architecture - use it!