Markdown Editor

Software Architecture Document Template (4+1 Views)

SAD with Kruchten 4+1 views – goals and constraints, scenarios, logical, process, development, physical views, sizing, view mapping

아키텍처 및 시스템 설계전체Kruchten 4+1 view model4plus1math

사용법: Larger systems where different audiences need different views. Pick five to ten significant scenarios first; they drive and validate the four views. Fill section 10 (mapping between views) – if you cannot, the views describe different systems.

미리보기

Software Architecture Document: [System name]

Software architecture document (SAD) organised around Philippe Kruchten's "4+1" view model: logical, process, development and physical views, tied together and validated by a set of scenarios. Replace every [bracketed] value and every row marked Example.

Document control

FieldValue
Document ID[SAD-SYSTEM-001]
System[System name]
Release described[vX.Y]
Version[0.1]
Status[Draft / In review / Approved]
Architect / owner[@architect]
Classification[Internal / Confidential / Public]
Last updatedYYYY-MM-DD

Approvals

RoleNameDecisionDate
Chief architect[@name][Approved / Approved with comments / Rejected]YYYY-MM-DD
Development manager[@name][Decision]YYYY-MM-DD
Test manager[@name][Decision]YYYY-MM-DD
Operations manager[@name][Decision]YYYY-MM-DD

Revision history

VersionDateAuthorChange summary
0.1YYYY-MM-DD[@name]Goals, constraints and scenarios
0.2YYYY-MM-DD[@name]Example: Process view with concurrency model; physical view for two data centres
1.0YYYY-MM-DD[@name]Example: Baseline after scenario walkthrough

Contents

1. Introduction

1.1 Purpose

This document gives a comprehensive overview of the architecture of [System name], using several views to describe different aspects. It records the significant architectural decisions and is the reference for [design, implementation, test planning and operations].

1.2 Scope

[What the document covers: the system, its release, and what is left to other documents such as detailed designs or interface specifications.]

1.3 Views and their audiences

ViewMain concernPrimary readersSection
Use-case (scenarios)Architecturally significant behaviourAll3
LogicalFunctional decomposition, key abstractionsAnalysts, designers4
ProcessConcurrency, distribution, performance, availabilityIntegrators, performance engineers5
DevelopmentSoftware organisation, reuse, buildDevelopers, managers6
PhysicalMapping to hardware, topology, deploymentOperations, system engineers7

2. Architectural goals and constraints

2.1 Goals

IDGoalMeasureViews most affected
AG-01Example: Process 500 claims per minute at peakThroughput testProcess, physical
AG-02Example: Remain available during a single data centre outage99.95% monthlyPhysical, process
AG-03Example: Allow three teams to release independentlyRelease frequency per teamDevelopment, logical
[AG-nn][Goal][Measure][Views]

2.2 Constraints

IDConstraintSourceViews affected
AC-01Example: Must use the corporate Oracle databaseIT standardsPhysical, logical
AC-02Example: Personal data stays in the EUGDPRPhysical
AC-03Example: Java 21 and the corporate CI toolchainEngineering policyDevelopment
[AC-nn][Constraint][Source][Views]

2.3 Significant architectural decisions

The decisions below shape more than one view. Each is recorded in full in the decision log (REF-02); this table keeps the reasoning visible to readers of the SAD.

IDDecisionAlternatives rejectedGoals / constraints servedViews
AD-001Example: Event-driven integration between claims and fraud scoringSynchronous REST call from claims to fraudAG-01 (throughput), AG-03 (independent releases)Logical, process, development
AD-002Example: Active-passive data centres with synchronous database replicationActive-active with conflict resolutionAG-02 (availability), AC-01 (Oracle)Physical, process
AD-003Example: Layered modules with architecture tests in the buildConvention onlyAG-03 (maintainability)Development
[AD-nnn][Decision][Alternatives][IDs][Views]

3. Use-case view (scenarios)

3.1 Architecturally significant use cases

IDScenarioActorWhy significantExercises views
UC-01Example: Submit insurance claim with documentsPolicyholderHighest volume, touches every subsystemAll
UC-02Example: Automated fraud checkSystemCPU-heavy, latency-sensitiveProcess, physical
UC-03Example: Adjuster approves payoutClaims adjusterIntegrates with payment systemLogical, process
UC-04Example: Fail over to second data centreOperationsAvailability goal AG-02Physical, process
[UC-nn][Scenario][Actor][Reason][Views]

3.2 Use-case realisation summary

[For each scenario, a few lines on how the architecture handles it, with a reference to the sequence diagram in section 5 or the table in section 10. Example: "UC-01: the portal uploads documents to object storage, the claims service creates the claim and publishes ClaimSubmitted; fraud and document services react asynchronously."]

4. Logical view

4.1 Overview

The system is decomposed into [three] layers and [five] subsystems. The key abstractions of the claims domain are shown below.

4.2 Architecturally significant packages

Package / subsystemResponsibilityKey classesDepends on
Example: ClaimsClaim lifecycle and rulesClaim, ClaimServicePolicies, Documents
Example: PoliciesPolicy lookup and coverage rulesPolicy, CoverageNone
Example: FraudScoring and explanationsFraudAssessment, RuleEngineClaims (events only)
[Package][Responsibility][Classes][Dependencies]

5. Process view

5.1 Processes and threads

ProcessInstancesThreads / concurrency modelCommunicationStarted by
Example: Portal web server4Event loop, non-blocking I/OHTTPS to API gatewayOrchestrator
Example: Claims service3Thread pool of 200 request threadsREST in, events outOrchestrator
Example: Fraud scorer2 to 8One consumer thread per partitionConsumes claims.submittedAutoscaler
[Process][n][Model][Mechanism][Start]

5.2 Interaction for UC-01 submit claim

The sequence below shows the processes involved when a policyholder submits a claim.

5.3 Concurrency and synchronisation

[Shared resources and how access is controlled: optimistic locking on claims (version column), idempotent event handlers keyed by event ID, partitioning by claim ID so events for one claim are processed in order.]

5.4 Failure and recovery behaviour

Each process has a defined behaviour when it, or something it depends on, fails. Operations uses this table to design alerts and runbooks.

FailureDetected byProcess behaviourRecoveryData at risk
Example: Fraud scorer downConsumer lag alert above 5 minutesClaims accepted; assessment delayed; adjusters see "pending score"Autoscaler restarts pods; backlog drainsNone (events retained 7 days)
Example: Event bus unavailablePublish errors in claims serviceClaims service writes events to outbox table and retriesOutbox relay resumes on recoveryNone
Example: Database primary lostHealth check, replication monitorWrites fail fast with 503; portal shows maintenance noticePromote standby in data centre B (UC-04)Zero with synchronous replication
[Failure][Signal][Behaviour][Recovery][Data]

6. Development view

6.1 Layers

LayerContentsMay depend on
PresentationWeb portal, adjuster UIApplication
ApplicationUse-case services, API controllersDomain, infrastructure interfaces
DomainEntities, value objects, domain rulesNothing outside the domain
InfrastructureDatabase, messaging, external clientsDomain interfaces

6.2 Modules and ownership

Module / repositoryOwner teamBuild artefactRelease cadence
Example: claims-apiTeam ClaimsContainer imageWeekly
Example: fraud-scorerTeam RiskContainer imageOn demand
Example: shared-eventsPlatformLibrary (semantic versioning)When schemas change
[Module][Team][Artefact][Cadence]

6.3 Development rules

[Build tools, dependency rules enforced by architecture tests, code generation, shared libraries, and the policy for changing shared event schemas (for example "additive changes only within a major version").]

7. Physical view

7.1 Deployment topology

The system runs in two data centres in active-passive configuration.

7.2 Nodes

NodeSpecificationProcesses hostedCount
Example: App node8 vCPU, 32 GB RAMPortal, claims service, fraud scorer3 per data centre
Example: Database server32 vCPU, 256 GB RAM, SANOracle1 per data centre
[Node][Spec][Processes][n]

7.3 Environments

EnvironmentPurposeTopologyDataRefresh
Example: ProductionLive serviceTwo data centres as in 7.1Real customer datan/a
Example: Pre-productionRelease and failover rehearsalTwo small data centres, same topologyMasked copy of productionMonthly
Example: TestIntegration and performance testsSingle siteSyntheticPer test run
[Environment][Purpose][Topology][Data][Refresh]

8. Size and performance

Peak claim submission load is derived from annual volume and seasonal peaks:

λpeak=Vyear365×8 h×3600×kpeak=2 400 00010 512 000×25≈5.7 claims/s\lambda_{peak} = \frac{V_{year}}{365 \times 8\,\text{h} \times 3600} \times k_{peak} = \frac{2\,400\,000}{10\,512\,000} \times 25 \approx 5.7\ \text{claims/s}
CharacteristicTargetBasis
Example: Claims per year2.4 millionBusiness forecast YYYY
Example: Peak submissions6 per second (storm events)Formula above, peak factor 25
Example: Claim submission latencyp95 under 2 sAG-01
Example: Document storage growth15 TB per year6 MB average per claim
[Characteristic][Target][Basis]

9. Quality

Quality attributeTargetArchitectural contributionViews
Example: Availability99.95% monthlyActive-passive data centres, stateless app nodes, synchronous database replicationPhysical, process
Example: SecurityPersonal data encrypted at rest and in transitTLS everywhere, transparent database encryption, role-based access in claims servicePhysical, logical
Example: MaintainabilityTeams release independentlySeparate modules and images, event contracts versionedDevelopment
[Attribute][Target][Contribution][Views]

10. Mapping between views

10.1 Element mapping

Logical elementProcessDevelopment modulePhysical node
Example: Claims packageClaims serviceclaims-api, claims-domain, claims-infraApp nodes
Example: Fraud packageFraud scorerfraud-scorerApp nodes
Example: Claim, Policy entitiesClaims service (owner)claims-domainOracle database
[Element][Process][Module][Node]

10.2 Scenario walkthrough results

ScenarioWalkthrough dateViews consistentIssues foundAction
Example: UC-01YYYY-MM-DDYesNoneNone
Example: UC-04YYYY-MM-DDNoEvent bus has no standby in data centre BAD-007 opened
[UC-nn]YYYY-MM-DD[Yes / No][Issues][Action]

11. Glossary and references

11.1 Glossary

TermMeaning
ViewA description of the system from one perspective, for one set of concerns
ScenarioA sequence of interactions used to drive and validate the architecture
ProcessA group of tasks forming an executable unit, possibly distributed
[Term][Meaning]

11.2 References

IDDocumentVersion
REF-01[Requirements specification][x.y]
REF-02[Architecture decision log][Location]
REF-03Kruchten, P., "Architectural Blueprints: The 4+1 View Model of Software Architecture", IEEE Software 12(6), 19951995

Standard and licence note

Based on the "4+1" view model of software architecture described by Philippe Kruchten (IEEE Software, 1995): logical, process, development and physical views, plus scenarios that tie them together. This template is original text written for this collection and reproduces no text from the paper. Template licence: MIT.

관련 템플릿