Software Architecture

Ruǎnjiàn Jiàgòu 软件架构 (DISA, DABM)

The Roots

The word "Architect" has its roots in Ancient Greek ἀρχιτέκτων (arkhitéktōn), meaning chief builder or master craftsman:

ἀρχι — chief, leader, primary
τέκτων — builder, carpenter, craftsman

The oldest known treatise on architecture is De architectura by the Roman architect Marcus Vitruvius Pollio, written around 25 BC. Vitruvius defined three principles that every well-designed structure must balance:

Principle Meaning Software Equivalent
Firmitas Strength, durability Reliability, robustness
Utilitas Function, usefulness Features, usability
Venustas Beauty, harmony UX, clarity, elegance

Vitruvius dedicated separate books to temples, public buildings, and private houses — recognizing that each type of building demands its own design approach. Software is no different.

Architecture as an Art

In some cases, architecture is seen as an art. Some buildings are designed primarily for their aesthetic impact or as a display of wealth and tastefulness.

Architecture as Art

Architecture as a Craft

In some cases, architecture is seen as the craft of creating a plan. The plan serves two purposes: (1) it is easier to review and change a plan than to change a building under construction, and (2) builders can work independently from the plan without needing constant instructions. Depending on constraints, the goal may be a standard plan that fits most customers, or an individual plan for unique requirements.

Little or common constraints and requirements

There are cases where an architect has few constraints or little variance in the constraints and requirements (e.g. when the cost of land is low or the needs of the customers are all about the same). In this case, it is relatively simple to build on the experience from past projects to improve future projects.

Architecture with little Constraints

Individual constraints and requirements

There are cases with unique constraints and requirements. There it is important to have knowledge about a broad range of possible solutions and the advantages and disadvantages.

Architecture with Constraints Architecture with Constraints

The goals of the plan

The first goal of the plan is to fit the constraints and requirements of the customer.

The second goal of the plan is to fit the constraints and requirements of the builders.

Plan of the House

Architecture for different types of buildings

There are different types of buildings. The architect as the master craftsman shall have lots of experience. With the diversity of the building types, it is unlikely that an architect is a master craftsman for multiple building types, usually you need a whole lifetime to master all the aspects of just one building type.

Examples of different types of buildings

Buildings come in many different types, each designed for a specific purpose.

Alpine Hut Aqueduct Factory Holiday Resort Railway Station
Alpine Hut
Aqueduct
Factory
Holiday Resort
Railway Station
Single Family Home (Tibet) Single Family Home (Mongolia) Single Family Home (USA) Skyscraper Traffic Bridge
Single Family Home (Tibet)
Single Family Home (Mongolia)
Single Family Home (USA)
Skyscraper
Traffic Bridge

Examples of different types of building material

Buildings can be constructed from a wide range of materials.

Property Steel Stone (Natural) Reinforced Concrete Woodwork (Engineered Wood) Wood (Solid Timber) Calcium Silicate Brick (Clay) Aerated Concrete (AAC) Mudbrick (Adobe)
Steel Stone Reinforced Concrete Woodwork Wood Calcium Silicate Brick Aerated Concrete Mudbrick
Density Very high (7850 kg/m³) Very high (2600 kg/m³) High (2400 kg/m³) Low–medium (600 kg/m³) Low (500 kg/m³) High (2000 kg/m³) Medium (1800 kg/m³) Very low (500 kg/m³) Medium (1500 kg/m³)
Compressive Strength Very high (250 MPa) Very high (100 MPa) High (30–50 MPa) Medium–high (35 MPa) Medium (30 MPa parallel) High (25 MPa) Medium (20 MPa) Low (4 MPa) Low (2 MPa)
Thermal Insulation Very poor Poor Poor Good–very good Good Poor Moderate Very good Good
Sound Insulation Poor Very good Good Moderate Moderate Very good Moderate–Good Poor–moderate Good
Moisture Behavior Corrosion-prone without protection Very low absorption Low absorption (if sealed) Improved stability vs. solid wood Sensitive (swelling/decay) Moderate absorption Regulates moisture well High absorption Very sensitive to water
Fire Resistance Poor (loses strength ~500°C) Excellent Good–excellent Moderate (predictable charring) Poor–moderate (chars) Excellent Excellent Excellent Good
Weight Very heavy Very heavy Very heavy Light–medium Light Heavy Heavy Very light Medium
Workability Difficult (specialized tools) Difficult Moderate (formwork required) Easy–moderate Easy Moderate Moderate Very easy Easy
Typical Use Structural frames, bridges, high-rises Structural & cladding Foundations, slabs, high-rises Beams, panels (CLT, glulam) Structural frames, houses Load-bearing, soundproof walls Masonry walls Lightweight walls, insulation Traditional walls (dry climates)
Durability Very high (if protected) Very high Very high High Moderate Very high High Moderate Low–moderate
Cost (relative) High High Medium–high Medium–high Medium Low–medium Medium Medium Low

Examples of the diversity of single family wood houses

Even with the same type and material, buildings can look very different.

Single Family Wood House 1 Single Family Wood House 2
Normal single family wood house
Large single family wood house

Different types of software

Just like buildings, software comes in many different types, each designed for a specific purpose with its own set of characteristics, technologies, and trade-offs.

Attribute Desktop Telecom CAD Media & Entertainment Mobile Embedded Trading E-Commerce
Desktop Telecom CAD Media and Entertainment Mobile Embedded Trading E-Commerce
Estimated Global LOC ~350B ~300B ~200B ~200B ~175B ~125B ~100B ~275B
Common Programming Languages C#, C++, Java, Python C, C++, Java, Erlang C++, Python, C# C++, C#, Python, JavaScript Kotlin, Swift, Dart, JavaScript C, C++, Rust, Assembly Java, C++, Python, Rust Java, JavaScript, Python, PHP, Go
Common Frameworks / Platforms .NET, Qt, Electron, JavaFX 5G stacks, OpenRAN, Kubernetes, OSS/BSS OpenCASCADE, Qt, .NET Unity, Unreal Engine, FFmpeg Android SDK, iOS SDK, Flutter, React Native FreeRTOS, Zephyr, Embedded Linux Spring, FIX engines, Kafka Spring Boot, Shopify, Magento, React, Node.js
Prominent Architectural Styles Microservices, layered architecture, MVC/MVVM, plugin architecture, event-driven UI Distributed systems, microservices, event-driven architecture, actor model (Erlang), service-oriented architecture (SOA) Layered + domain-driven design, plugin architecture, command pattern, model-view separation Component-based architecture, entity-component-system (ECS), event-driven, client-server, streaming pipelines MVVM/MVC, clean architecture, offline-first, client-server, reactive programming Bare-metal / layered, real-time scheduling, interrupt-driven design, state machines Event-driven architecture, microservices, CQRS, actor model, pipeline/stream processing Microservices, layered architecture, MVC, event-driven, domain-driven design
Key Architectural Characteristics Rich UI/UX, OS integration, responsiveness, local storage, modularity High availability, scalability, real-time processing, fault tolerance, distributed systems High precision, geometry modeling, performance, large datasets, extensibility High performance (graphics/audio), real-time rendering, scalability, cross-platform, UX Battery efficiency, responsive UI, offline capability, network handling, device integration Deterministic behavior, low memory, real-time constraints, hardware interaction, reliability Low latency, high throughput, fault tolerance, consistency, real-time data Scalability, high availability, security, fast page load, payment integration
Not Important Characteristics Hard real-time, ultra-low memory, extreme fault tolerance Rich UI, rapid prototyping, small codebase, low complexity Ultra-low latency networking, small footprint, mobile UX, rapid UI iteration Strict determinism, ultra-low memory, simple logic, minimal dependencies Batch processing, extreme precision computing, massive parallelism Fancy UI, cloud scalability, rapid iteration, dynamic memory Rich UI design, small binary size, offline-first, device UX Ultra-low latency, real-time constraints, embedded hardware, small binary size
Example Applications Microsoft Word, Visual Studio, Notepad++, Photoshop 5G core, IMS, VoIP platforms, SMS gateways AutoCAD, SolidWorks, Fusion 360, CATIA Unreal Engine games, Netflix, Adobe Premiere, Spotify WhatsApp, Instagram, Google Maps, TikTok Car ECUs, IoT sensors, routers, smart appliances MetaTrader, Bloomberg Terminal, Robinhood, E*TRADE Amazon, Shopify, eBay, Zalando

Common architectural styles

Just as buildings are constructed from different materials — each with its own strengths, weaknesses, and best-fit scenarios — software systems are built using different architectural styles. The choice of style shapes the system's structure, behavior, and trade-offs.

Property Monolith Client-Server Layered Modular Monolith Clean / Hexagonal / Onion Pipeline (Pipe & Filter) Batch Processing Microservices SOA Event-Driven (EDA) Actor Model CQRS Event Sourcing Stream Processing Space-Based Peer-to-Peer
Monolith Client-Server Layered Modular Monolith Clean / Hexagonal / Onion Pipeline Batch Processing Microservices SOA Event-Driven Actor Model CQRS Event Sourcing Stream Processing Space-Based Peer-to-Peer
Deployment Unit Single Client + Server Single Single Single/Multiple Single/Multiple Scheduled jobs Multiple Multiple Distributed Distributed actors Single/Multiple Single/Distributed Distributed Distributed Fully distributed
Coupling Tight Medium Medium Medium Loose Loose Loose Loose Medium Loose Very loose Loose Loose Loose Loose Loose
Scalability Low–Medium Medium Medium Medium Medium High High High High High Very high High High Very high Very high Very high
Complexity Low Low Low–Medium Medium Medium Medium Medium High High High High High High High High High
Data Consistency Strong Strong Strong Strong Strong Depends Strong (per batch) Eventual Mixed Eventual Eventual Eventual Eventual Eventual Eventual Eventual
Typical Use Case Small apps Web apps Enterprise apps Growing apps Maintainable, testable, domain-centric systems Data processing Reporting/ETL Large systems Enterprise integration Reactive systems Real-time concurrency High-read systems Audit/log systems Real-time analytics High-scale low-latency Decentralized systems