SlideShare a Scribd company logo
1 of 42
Download to read offline
Sharpen your "Architecture
Documentation" Saw
Architectural Decision Records (ADRs) and Diagrams-as-Code
Kevin Hakanson (he/him)
Sr. Solutions Architect, AWS
(opinions are my own)
When you start…
…looking at using new
software, libraries, SDKs, etc.
Do you read documentation
first or jump into reading the
source code?
…building new software
Parallel question – write
documentation first, or jump
into writing code?
2
Today’s Goals
• Learn about two Architecture Documentation techniques
• Architectural Decision Records (ADRs)
• Diagrams as Code
• Leave ready (and excited) to apply this knowledge
3
“
”
All solutions implicitly have an
architecture, ideally one which is
both intentional and documented.
Kevin Hakanson, “Classically Trained” Software Architect
4
Would you like architects with your architecture?
“Teams should keep Architecture Decision Records. Autonomy
shouldn’t translate into intransparency.” - Gregor Hohpe
5
Source: https://architectelevator.com/architecture/organizing-architecture/
Architectural Decision Records
(ADRs)
6
Documenting Architecture Decisions
Michael Nygard - November 15, 2011
• Track the motivation behind "architecturally significant" decisions:
• Those that affect the structure, non-functional characteristics, dependencies,
interfaces, or construction techniques.
• Keep in the project repository and use a lightweight text formatting
language like Markdown.
7
Source: https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions
8
Source: https://martinfowler.com/articles/scaling-architecture-conversationally.html#adr
Example
Cloudscape Design System React
TypeScript Vite template
Personal “starter template” for building web
application demos using
https://cloudscape.design/
ADRs in source code repository under docs/adr
9
10
AWS Prescriptive Guidance
Using architectural decision records to streamline technical decision-
making for a software development project
This guide introduces the architectural decision records (ADR) process for
software engineering projects. ADRs support team alignment, document
strategic directions for a project or product, and reduce recurring and time-
consuming decision-making efforts.
Darius Kunce and Dominik Goby, Application Architects
AWS Professional Services - March 2022
11
Source: https://docs.aws.amazon.com/prescriptive-guidance/latest/architectural-decision-records/welcome.html
Software Architecture and Design InfoQ
Trends Report - April 2023
“Architecture Decision Records (ADRs) are now commonly recognized
as a way to document and communicate design decisions.”
“Architects are always looking for improvements on how to document,
communicate, and understand decisions. This may be another area
where large language models will play a role in the future, acting as
forensic archeologists to comb through ADRs and git history.”
12
Source: https://www.infoq.com/articles/architecture-trends-2023/
ChatADR?
13
Diagrams-as-Code
14
Thoughtworks Technology Radar Blip
Published : Oct 28, 2020
“There are benefits to using [diagrams as code] tools over the heavier
alternatives, including easy version control and the ability to generate
the DSLs from many sources.
Tools in this space that we like include Diagrams, Structurizr DSL,
AsciiDoctor Diagram and stables such as WebSequenceDiagrams,
PlantUML and the venerable Graphviz.
It's also fairly simple to generate your own SVG these days, so don't
rule out quickly writing your own tool either. ”
15
Source: https://www.thoughtworks.com/en-us/radar/techniques/diagrams-as-code
Kroki (https://kroki.io/)
Creates diagrams from textual descriptions!
Kroki provides a unified API with support for BlockDiag (BlockDiag,
SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag), BPMN, Bytefield, C4
(with PlantUML), D2, DBML, Ditaa, Erd, Excalidraw, GraphViz, Mermaid,
Nomnoml, Pikchr, PlantUML, Structurizr, SvgBob, UMLet, Vega, Vega-
Lite, WaveDrom, WireViz... and more to come!
16
“
”
It depends…
Every architect (at some point)
17
Which tool should you pick?
18
@startuml Use Cases
title Use Cases
left to right direction
actor "Kevin" as kevin <<architect>>
actor "Audience" as osn2023
rectangle "Diagrams" {
usecase "create presentation" as uc1
usecase "write documentation" as uc2
usecase "solution design" as uc3
usecase "?" as uc4
}
kevin --> uc1
kevin --> uc2
kevin --> uc3
osn2023 --> uc4
@enduml
Kevin’s ADRs for making diagrams
ADR001 - Use PowerPoint for presentations
High quality using official AWS Architecture Icons and easiest to edit when
combining slides from existing presentations.
ADR002 - Use DrawIO (desktop) for documentation
Exported images are included in project documentation, often created in
markdown format.
ADR003 - Use PlantUML for sequence diagrams
Sequence diagrams help improve understanding of design across success and
error use cases.
19
PlantUML
• Used to draw UML diagrams, using a simple and human readable text
description.
• Does not prevent you from drawing inconsistent diagrams.
• More of a drawing tool than a modeling tool.
• Open-source. Can download distribution and run locally.
java -jar scripts/plantuml-mit-1.2023.6.jar –picoweb
20
Source: https://plantuml.com
AWS Icons for PlantUML
PlantUML images, sprites, macros, and other includes for Amazon Web
Services (AWS) services and resources. Used to create PlantUML
diagrams with AWS components.
All elements are generated from the official AWS Architecture
Icons and when combined with PlantUML, are a great way to
communicate your design, deployment, and topology as code.
21
Source: https://github.com/awslabs/aws-icons-for-plantuml
Amazon S3 bucket-per-tenant model
22
!procedure $AWSIcon($service, $line1)
rectangle "$AWSImg($service)n$line1"
!endprocedure
$AWSIcon(Users, "Tenant 1") as tenant1
$AWSIcon(Users, "Tenant 2") as tenant2
AWSCloudGroup(cloud){
$AWSIcon(SimpleStorageServiceBucket, "tenant-1-bucket") as bucket1
tenant1 -r-> bucket1
$AWSIcon(SimpleStorageServiceBucket, "tenant-2-bucket") as bucket2
bucket1 -[hidden]r- bucket2
tenant2 -l-> bucket2
}
Architecture Diagrams
• Many architecture diagrams are a free-form mixture between a
structure diagram and a behavior diagram.
• structure: network connections between services
• behavior: numbered message arrows
• Sequence Diagrams are part a subset of behavior diagrams known as
interaction diagrams which emphasis control and data flow.
23
24
25
26
user -> s3++ AWS_COLOR_GREEN: <$Callout_1> upload video
$UploadIcon(Multimedia, video)
user <-- s3:
s3 ->> e1++ AWS_COLOR_ORANGE: <$Callout_2> event
e1 ->> sfw--: start workflow
activate sfw AWS_COLOR_PINK
== audio ==
sfw -> sfw1++ AWS_COLOR_ORANGE:
sfw1 ->> mediaconvert: create job
activate mediaconvert AWS_COLOR_ORANGE
sfw <-- sfw1--:
mediaconvert -> s3: <$Callout_3> save audio
$UploadIcon(Tapestorage, audio)
sfw <<- mediaconvert--: task success
== transcript ==
sfw -> sfw2++ AWS_COLOR_ORANGE:
sfw2 ->> transcribe: start transcription job
activate transcribe AWS_COLOR_TURQUOISE
sfw <-- sfw2--:
transcribe -> s3: <$Callout_4> save transcript
$UploadIcon(Documents, transcript)
deactivate s3
sfw <<- transcribe--: task success
deactivate sfw
VS.
27
28
@startuml Amazon S3 objects using IAM Temporary Credentials
title Amazon S3 objects using IAM Temporary Credentials
participant "User" as user
participant "Cognito User Pool" as userpool
participant "Cognito Identity Pool" as idpool
participant "S3 Bucket" as s3
participant "STS" as sts
participant "IAM Policy" as permissions
' 1. Authenticate and get tokens
user -> userpool: InitiateAuth
user <-- userpool: ID Token and Access Token
' 2. Exchange tokens for AWS credentials
user -> idpool: GetCredentialsForIdentity
idpool -> idpool: map to IAM Role
idpool -> sts: AssumeRoleWithWebIdentity(Role)
idpool <-- sts: temporary security credentials
user <-- idpool: temporary security credentials
' 3. Access AWS services with credentials
user -> s3: GetObject
s3 -> permissions: check permissions
alt no access
s3 <-- permissions: Deny
user <-- s3: error (AccessDenied)
else access
s3 <-- permissions: Allow
user <-- s3: S3 object
end
@enduml
Source: https://github.com/awslabs/aws-icons-for-plantuml/tree/main/examples/cognito-scenario
29
30
31
Mermaid
JavaScript based diagramming and charting tool that renders
Markdown-inspired text definitions to create and modify diagrams
dynamically.
Four ways of using mermaid:
1. Using the Mermaid Live Editor at mermaid.live.
2. Using mermaid plugins with programs you are familiar with.
3. Calling the Mermaid JavaScript API.
4. Deploying Mermaid as a dependency.
32
Source: https://mermaid.js.org/
33
Source: https://kevinhakanson.com/2022-10-02-sequence-diagrams-with-mermaid-and-diagramsnet/
C4 model for visualizing software architecture
1. System context diagram
2. Container diagram
3. Component diagram
4. Code diagram
• abstraction-first approach to
diagramming software
architecture
• notation independent that
works with variety of diagraming
tools
34
Source: https://c4model.com/
C4-PlantUML
35
36
Person(user, "User", $tags="User")
System_Boundary(softwareSystem, "Video Transcription Service") {
Container(s3bucket, "Amazon S3 bucket", $tags="SimpleStorageServiceBucket")
Container(objectcreated, "ObjectCreated event handler", $tags="LambdaLambdaFunction")
Container(stepfunction, "transcribe workflow", $tags="StepFunctions")
Container(extractaudio, "extract audio", $tags="LambdaLambdaFunction")
Container(transcribeaudio, "transcribe audio", $tags="LambdaLambdaFunction")
Container(mediaconvert, "AWS Elemental MediaConvert", $tags="ElementalMediaConvert")
Container(transcribe, "Amazon Transcribe", $tags="Transcribe")
Rel(s3bucket, objectcreated, "ObjectCreated event")
Rel(objectcreated, stepfunction, "start")
Rel(stepfunction, extractaudio, "step 1")
Rel(extractaudio, mediaconvert, "start job")
Rel(mediaconvert, s3bucket, "save audio")
Rel(stepfunction, transcribeaudio, "step 2")
Rel(transcribeaudio, transcribe, "start transcription job")
Rel(transcribe, s3bucket, "save transcription")
}
Rel(user, s3bucket, "Uploads")
Structurizr
Structurizr builds upon "diagrams as code", allowing you to create
multiple software architecture diagrams from a single model.
There are a number of tools for creating Structurizr compatible
workspaces, with the Structurizr DSL being the recommended option
for most teams.
Specifically designed to support the C4 model for visualizing software
architecture.
37
Source: https://structurizr.com/
38
workspace {
!adrs adrs
model {
user = person "User" {
tags "User"
}
softwareSystem = softwareSystem "Video Transcription Service" {
s3bucket = container "Amazon S3 bucket" {
tags "SimpleStorageServiceBucket"
user -> this "Uploads"
}
objectcreated = container "ObjectCreated event handler" "" "AWS Lambda function" {
tags "LambdaLambdaFunction"
component "Boto3" "AWS SDK for Python" {
technology "Python package"
url https://aws.amazon.com/sdk-for-python/
}
s3bucket -> this "ObjectCreated event"
}
Structurizr Lite (standalone, free version)
39
Source: https://structurizr.com/help/lite
ADR Tools
• A command-line tool for working with a log of Architecture Decision
Records (ADRs).
• Structurizr allows you to supplement your software architecture
model with a decision log, captured as a collection of lightweight
ADRs.
• Either created manually, or imported from tools like adr-tools.
40
Source: https://github.com/npryce/adr-tools
Call to Action
• Read Documenting Architecture Decisions from Michael Nygard (2011) and the
AWS Prescriptive Guidance from AWS Professional Services (2022)
• Review the different ADR templates and examples
• Use Diagrams-as-Code to draw render your next architecture diagram, either
with PlantUML or another tool
• Sequence Diagrams enrich your understanding of distributed architectures | AWS
Architecture Blog (amazon.com)
• Consider how your projects can benefit from these architecture documentation
recommendations
41
Thank You
Kevin Hakanson (kevinhakanson.com)
42

More Related Content

Similar to Sharpen your "Architectural Documentation" Saw

Introduction to Azure Databricks
Introduction to Azure DatabricksIntroduction to Azure Databricks
Introduction to Azure DatabricksJames Serra
 
Secure Your Code Implement DevSecOps in Azure
Secure Your Code Implement DevSecOps in AzureSecure Your Code Implement DevSecOps in Azure
Secure Your Code Implement DevSecOps in Azurekloia
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computingwebscale
 
Big Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft AzureBig Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft AzureMark Tabladillo
 
Fowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopFowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopMark Masterson
 
Microsoft Azure For Solutions Architects
Microsoft Azure For Solutions ArchitectsMicrosoft Azure For Solutions Architects
Microsoft Azure For Solutions ArchitectsRoy Kim
 
Deploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and KubernetesDeploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and KubernetesPetteriTeikariPhD
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
Azure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityAzure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityStephane Lapointe
 
Azure presentation nnug dec 2010
Azure presentation nnug  dec 2010Azure presentation nnug  dec 2010
Azure presentation nnug dec 2010Ethos Technologies
 
The Evolution of Cloud Architectures: Focusing More on the Business Logic
The Evolution of Cloud Architectures: Focusing More on the Business LogicThe Evolution of Cloud Architectures: Focusing More on the Business Logic
The Evolution of Cloud Architectures: Focusing More on the Business LogicScott Weber
 
Serverless machine learning architectures at Helixa
Serverless machine learning architectures at HelixaServerless machine learning architectures at Helixa
Serverless machine learning architectures at HelixaData Science Milan
 
Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Amazon Web Services
 
Documenting serverless architectures could we do it better - o'reily sa con...
Documenting serverless architectures  could we do it better  - o'reily sa con...Documenting serverless architectures  could we do it better  - o'reily sa con...
Documenting serverless architectures could we do it better - o'reily sa con...Asher Sterkin
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesQAware GmbH
 
Connect + Docker + AWS = Bitbucket Pipelines
Connect + Docker + AWS = Bitbucket PipelinesConnect + Docker + AWS = Bitbucket Pipelines
Connect + Docker + AWS = Bitbucket PipelinesAtlassian
 
Tutorial Expert How-To - Command Line Interface (CLI)
Tutorial Expert How-To - Command Line Interface (CLI)Tutorial Expert How-To - Command Line Interface (CLI)
Tutorial Expert How-To - Command Line Interface (CLI)PascalDesmarets1
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMalcolm Duncanson, CISSP
 

Similar to Sharpen your "Architectural Documentation" Saw (20)

Kunal bhatia resume mass
Kunal bhatia   resume massKunal bhatia   resume mass
Kunal bhatia resume mass
 
Introduction to Azure Databricks
Introduction to Azure DatabricksIntroduction to Azure Databricks
Introduction to Azure Databricks
 
Secure Your Code Implement DevSecOps in Azure
Secure Your Code Implement DevSecOps in AzureSecure Your Code Implement DevSecOps in Azure
Secure Your Code Implement DevSecOps in Azure
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Cloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and AnalyticsCloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and Analytics
 
Big Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft AzureBig Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft Azure
 
Fowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopFowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing Workshop
 
Microsoft Azure For Solutions Architects
Microsoft Azure For Solutions ArchitectsMicrosoft Azure For Solutions Architects
Microsoft Azure For Solutions Architects
 
Deploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and KubernetesDeploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and Kubernetes
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Azure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityAzure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusability
 
Azure presentation nnug dec 2010
Azure presentation nnug  dec 2010Azure presentation nnug  dec 2010
Azure presentation nnug dec 2010
 
The Evolution of Cloud Architectures: Focusing More on the Business Logic
The Evolution of Cloud Architectures: Focusing More on the Business LogicThe Evolution of Cloud Architectures: Focusing More on the Business Logic
The Evolution of Cloud Architectures: Focusing More on the Business Logic
 
Serverless machine learning architectures at Helixa
Serverless machine learning architectures at HelixaServerless machine learning architectures at Helixa
Serverless machine learning architectures at Helixa
 
Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS Building a Big Data & Analytics Platform using AWS
Building a Big Data & Analytics Platform using AWS
 
Documenting serverless architectures could we do it better - o'reily sa con...
Documenting serverless architectures  could we do it better  - o'reily sa con...Documenting serverless architectures  could we do it better  - o'reily sa con...
Documenting serverless architectures could we do it better - o'reily sa con...
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
Connect + Docker + AWS = Bitbucket Pipelines
Connect + Docker + AWS = Bitbucket PipelinesConnect + Docker + AWS = Bitbucket Pipelines
Connect + Docker + AWS = Bitbucket Pipelines
 
Tutorial Expert How-To - Command Line Interface (CLI)
Tutorial Expert How-To - Command Line Interface (CLI)Tutorial Expert How-To - Command Line Interface (CLI)
Tutorial Expert How-To - Command Line Interface (CLI)
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM Roles
 

More from Kevin Hakanson

Who's in your Cloud? Cloud State Monitoring
Who's in your Cloud? Cloud State MonitoringWho's in your Cloud? Cloud State Monitoring
Who's in your Cloud? Cloud State MonitoringKevin Hakanson
 
Adopting Multi-Cloud Services with Confidence
Adopting Multi-Cloud Services with ConfidenceAdopting Multi-Cloud Services with Confidence
Adopting Multi-Cloud Services with ConfidenceKevin Hakanson
 
Introduction to Speech Interfaces for Web Applications
Introduction to Speech Interfaces for Web ApplicationsIntroduction to Speech Interfaces for Web Applications
Introduction to Speech Interfaces for Web ApplicationsKevin Hakanson
 
Learning to Mod Minecraft: A Father/Daughter Retrospective
Learning to Mod Minecraft: A Father/Daughter RetrospectiveLearning to Mod Minecraft: A Father/Daughter Retrospective
Learning to Mod Minecraft: A Father/Daughter RetrospectiveKevin Hakanson
 
ng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS Applicationsng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS ApplicationsKevin Hakanson
 
Securing TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APISecuring TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APIKevin Hakanson
 
Make your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptMake your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptKevin Hakanson
 
Implementing Messaging Patterns in JavaScript using the OpenAjax Hub
Implementing Messaging Patterns in JavaScript using the OpenAjax HubImplementing Messaging Patterns in JavaScript using the OpenAjax Hub
Implementing Messaging Patterns in JavaScript using the OpenAjax HubKevin Hakanson
 
Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...Kevin Hakanson
 
Developer's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web CryptographyDeveloper's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web CryptographyKevin Hakanson
 

More from Kevin Hakanson (11)

Who's in your Cloud? Cloud State Monitoring
Who's in your Cloud? Cloud State MonitoringWho's in your Cloud? Cloud State Monitoring
Who's in your Cloud? Cloud State Monitoring
 
Adopting Multi-Cloud Services with Confidence
Adopting Multi-Cloud Services with ConfidenceAdopting Multi-Cloud Services with Confidence
Adopting Multi-Cloud Services with Confidence
 
Introduction to Speech Interfaces for Web Applications
Introduction to Speech Interfaces for Web ApplicationsIntroduction to Speech Interfaces for Web Applications
Introduction to Speech Interfaces for Web Applications
 
Learning to Mod Minecraft: A Father/Daughter Retrospective
Learning to Mod Minecraft: A Father/Daughter RetrospectiveLearning to Mod Minecraft: A Father/Daughter Retrospective
Learning to Mod Minecraft: A Father/Daughter Retrospective
 
ng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS Applicationsng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS Applications
 
Securing TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APISecuring TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography API
 
Make your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptMake your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScript
 
HTTP Potpourri
HTTP PotpourriHTTP Potpourri
HTTP Potpourri
 
Implementing Messaging Patterns in JavaScript using the OpenAjax Hub
Implementing Messaging Patterns in JavaScript using the OpenAjax HubImplementing Messaging Patterns in JavaScript using the OpenAjax Hub
Implementing Messaging Patterns in JavaScript using the OpenAjax Hub
 
Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...Internationalize your JavaScript Application: Prepare for "the next billion" ...
Internationalize your JavaScript Application: Prepare for "the next billion" ...
 
Developer's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web CryptographyDeveloper's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web Cryptography
 

Recently uploaded

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 

Recently uploaded (20)

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 

Sharpen your "Architectural Documentation" Saw

  • 1. Sharpen your "Architecture Documentation" Saw Architectural Decision Records (ADRs) and Diagrams-as-Code Kevin Hakanson (he/him) Sr. Solutions Architect, AWS (opinions are my own)
  • 2. When you start… …looking at using new software, libraries, SDKs, etc. Do you read documentation first or jump into reading the source code? …building new software Parallel question – write documentation first, or jump into writing code? 2
  • 3. Today’s Goals • Learn about two Architecture Documentation techniques • Architectural Decision Records (ADRs) • Diagrams as Code • Leave ready (and excited) to apply this knowledge 3
  • 4. “ ” All solutions implicitly have an architecture, ideally one which is both intentional and documented. Kevin Hakanson, “Classically Trained” Software Architect 4
  • 5. Would you like architects with your architecture? “Teams should keep Architecture Decision Records. Autonomy shouldn’t translate into intransparency.” - Gregor Hohpe 5 Source: https://architectelevator.com/architecture/organizing-architecture/
  • 7. Documenting Architecture Decisions Michael Nygard - November 15, 2011 • Track the motivation behind "architecturally significant" decisions: • Those that affect the structure, non-functional characteristics, dependencies, interfaces, or construction techniques. • Keep in the project repository and use a lightweight text formatting language like Markdown. 7 Source: https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions
  • 9. Example Cloudscape Design System React TypeScript Vite template Personal “starter template” for building web application demos using https://cloudscape.design/ ADRs in source code repository under docs/adr 9
  • 10. 10
  • 11. AWS Prescriptive Guidance Using architectural decision records to streamline technical decision- making for a software development project This guide introduces the architectural decision records (ADR) process for software engineering projects. ADRs support team alignment, document strategic directions for a project or product, and reduce recurring and time- consuming decision-making efforts. Darius Kunce and Dominik Goby, Application Architects AWS Professional Services - March 2022 11 Source: https://docs.aws.amazon.com/prescriptive-guidance/latest/architectural-decision-records/welcome.html
  • 12. Software Architecture and Design InfoQ Trends Report - April 2023 “Architecture Decision Records (ADRs) are now commonly recognized as a way to document and communicate design decisions.” “Architects are always looking for improvements on how to document, communicate, and understand decisions. This may be another area where large language models will play a role in the future, acting as forensic archeologists to comb through ADRs and git history.” 12 Source: https://www.infoq.com/articles/architecture-trends-2023/
  • 15. Thoughtworks Technology Radar Blip Published : Oct 28, 2020 “There are benefits to using [diagrams as code] tools over the heavier alternatives, including easy version control and the ability to generate the DSLs from many sources. Tools in this space that we like include Diagrams, Structurizr DSL, AsciiDoctor Diagram and stables such as WebSequenceDiagrams, PlantUML and the venerable Graphviz. It's also fairly simple to generate your own SVG these days, so don't rule out quickly writing your own tool either. ” 15 Source: https://www.thoughtworks.com/en-us/radar/techniques/diagrams-as-code
  • 16. Kroki (https://kroki.io/) Creates diagrams from textual descriptions! Kroki provides a unified API with support for BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag), BPMN, Bytefield, C4 (with PlantUML), D2, DBML, Ditaa, Erd, Excalidraw, GraphViz, Mermaid, Nomnoml, Pikchr, PlantUML, Structurizr, SvgBob, UMLet, Vega, Vega- Lite, WaveDrom, WireViz... and more to come! 16
  • 17. “ ” It depends… Every architect (at some point) 17 Which tool should you pick?
  • 18. 18 @startuml Use Cases title Use Cases left to right direction actor "Kevin" as kevin <<architect>> actor "Audience" as osn2023 rectangle "Diagrams" { usecase "create presentation" as uc1 usecase "write documentation" as uc2 usecase "solution design" as uc3 usecase "?" as uc4 } kevin --> uc1 kevin --> uc2 kevin --> uc3 osn2023 --> uc4 @enduml
  • 19. Kevin’s ADRs for making diagrams ADR001 - Use PowerPoint for presentations High quality using official AWS Architecture Icons and easiest to edit when combining slides from existing presentations. ADR002 - Use DrawIO (desktop) for documentation Exported images are included in project documentation, often created in markdown format. ADR003 - Use PlantUML for sequence diagrams Sequence diagrams help improve understanding of design across success and error use cases. 19
  • 20. PlantUML • Used to draw UML diagrams, using a simple and human readable text description. • Does not prevent you from drawing inconsistent diagrams. • More of a drawing tool than a modeling tool. • Open-source. Can download distribution and run locally. java -jar scripts/plantuml-mit-1.2023.6.jar –picoweb 20 Source: https://plantuml.com
  • 21. AWS Icons for PlantUML PlantUML images, sprites, macros, and other includes for Amazon Web Services (AWS) services and resources. Used to create PlantUML diagrams with AWS components. All elements are generated from the official AWS Architecture Icons and when combined with PlantUML, are a great way to communicate your design, deployment, and topology as code. 21 Source: https://github.com/awslabs/aws-icons-for-plantuml
  • 22. Amazon S3 bucket-per-tenant model 22 !procedure $AWSIcon($service, $line1) rectangle "$AWSImg($service)n$line1" !endprocedure $AWSIcon(Users, "Tenant 1") as tenant1 $AWSIcon(Users, "Tenant 2") as tenant2 AWSCloudGroup(cloud){ $AWSIcon(SimpleStorageServiceBucket, "tenant-1-bucket") as bucket1 tenant1 -r-> bucket1 $AWSIcon(SimpleStorageServiceBucket, "tenant-2-bucket") as bucket2 bucket1 -[hidden]r- bucket2 tenant2 -l-> bucket2 }
  • 23. Architecture Diagrams • Many architecture diagrams are a free-form mixture between a structure diagram and a behavior diagram. • structure: network connections between services • behavior: numbered message arrows • Sequence Diagrams are part a subset of behavior diagrams known as interaction diagrams which emphasis control and data flow. 23
  • 24. 24
  • 25. 25
  • 26. 26 user -> s3++ AWS_COLOR_GREEN: <$Callout_1> upload video $UploadIcon(Multimedia, video) user <-- s3: s3 ->> e1++ AWS_COLOR_ORANGE: <$Callout_2> event e1 ->> sfw--: start workflow activate sfw AWS_COLOR_PINK == audio == sfw -> sfw1++ AWS_COLOR_ORANGE: sfw1 ->> mediaconvert: create job activate mediaconvert AWS_COLOR_ORANGE sfw <-- sfw1--: mediaconvert -> s3: <$Callout_3> save audio $UploadIcon(Tapestorage, audio) sfw <<- mediaconvert--: task success == transcript == sfw -> sfw2++ AWS_COLOR_ORANGE: sfw2 ->> transcribe: start transcription job activate transcribe AWS_COLOR_TURQUOISE sfw <-- sfw2--: transcribe -> s3: <$Callout_4> save transcript $UploadIcon(Documents, transcript) deactivate s3 sfw <<- transcribe--: task success deactivate sfw
  • 28. 28 @startuml Amazon S3 objects using IAM Temporary Credentials title Amazon S3 objects using IAM Temporary Credentials participant "User" as user participant "Cognito User Pool" as userpool participant "Cognito Identity Pool" as idpool participant "S3 Bucket" as s3 participant "STS" as sts participant "IAM Policy" as permissions ' 1. Authenticate and get tokens user -> userpool: InitiateAuth user <-- userpool: ID Token and Access Token ' 2. Exchange tokens for AWS credentials user -> idpool: GetCredentialsForIdentity idpool -> idpool: map to IAM Role idpool -> sts: AssumeRoleWithWebIdentity(Role) idpool <-- sts: temporary security credentials user <-- idpool: temporary security credentials ' 3. Access AWS services with credentials user -> s3: GetObject s3 -> permissions: check permissions alt no access s3 <-- permissions: Deny user <-- s3: error (AccessDenied) else access s3 <-- permissions: Allow user <-- s3: S3 object end @enduml Source: https://github.com/awslabs/aws-icons-for-plantuml/tree/main/examples/cognito-scenario
  • 29. 29
  • 30. 30
  • 31. 31
  • 32. Mermaid JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically. Four ways of using mermaid: 1. Using the Mermaid Live Editor at mermaid.live. 2. Using mermaid plugins with programs you are familiar with. 3. Calling the Mermaid JavaScript API. 4. Deploying Mermaid as a dependency. 32 Source: https://mermaid.js.org/
  • 34. C4 model for visualizing software architecture 1. System context diagram 2. Container diagram 3. Component diagram 4. Code diagram • abstraction-first approach to diagramming software architecture • notation independent that works with variety of diagraming tools 34 Source: https://c4model.com/
  • 36. 36 Person(user, "User", $tags="User") System_Boundary(softwareSystem, "Video Transcription Service") { Container(s3bucket, "Amazon S3 bucket", $tags="SimpleStorageServiceBucket") Container(objectcreated, "ObjectCreated event handler", $tags="LambdaLambdaFunction") Container(stepfunction, "transcribe workflow", $tags="StepFunctions") Container(extractaudio, "extract audio", $tags="LambdaLambdaFunction") Container(transcribeaudio, "transcribe audio", $tags="LambdaLambdaFunction") Container(mediaconvert, "AWS Elemental MediaConvert", $tags="ElementalMediaConvert") Container(transcribe, "Amazon Transcribe", $tags="Transcribe") Rel(s3bucket, objectcreated, "ObjectCreated event") Rel(objectcreated, stepfunction, "start") Rel(stepfunction, extractaudio, "step 1") Rel(extractaudio, mediaconvert, "start job") Rel(mediaconvert, s3bucket, "save audio") Rel(stepfunction, transcribeaudio, "step 2") Rel(transcribeaudio, transcribe, "start transcription job") Rel(transcribe, s3bucket, "save transcription") } Rel(user, s3bucket, "Uploads")
  • 37. Structurizr Structurizr builds upon "diagrams as code", allowing you to create multiple software architecture diagrams from a single model. There are a number of tools for creating Structurizr compatible workspaces, with the Structurizr DSL being the recommended option for most teams. Specifically designed to support the C4 model for visualizing software architecture. 37 Source: https://structurizr.com/
  • 38. 38 workspace { !adrs adrs model { user = person "User" { tags "User" } softwareSystem = softwareSystem "Video Transcription Service" { s3bucket = container "Amazon S3 bucket" { tags "SimpleStorageServiceBucket" user -> this "Uploads" } objectcreated = container "ObjectCreated event handler" "" "AWS Lambda function" { tags "LambdaLambdaFunction" component "Boto3" "AWS SDK for Python" { technology "Python package" url https://aws.amazon.com/sdk-for-python/ } s3bucket -> this "ObjectCreated event" }
  • 39. Structurizr Lite (standalone, free version) 39 Source: https://structurizr.com/help/lite
  • 40. ADR Tools • A command-line tool for working with a log of Architecture Decision Records (ADRs). • Structurizr allows you to supplement your software architecture model with a decision log, captured as a collection of lightweight ADRs. • Either created manually, or imported from tools like adr-tools. 40 Source: https://github.com/npryce/adr-tools
  • 41. Call to Action • Read Documenting Architecture Decisions from Michael Nygard (2011) and the AWS Prescriptive Guidance from AWS Professional Services (2022) • Review the different ADR templates and examples • Use Diagrams-as-Code to draw render your next architecture diagram, either with PlantUML or another tool • Sequence Diagrams enrich your understanding of distributed architectures | AWS Architecture Blog (amazon.com) • Consider how your projects can benefit from these architecture documentation recommendations 41
  • 42. Thank You Kevin Hakanson (kevinhakanson.com) 42