SlideShare a Scribd company logo
Continuous Delivery Patterns for
Modern Java Architectures
Daniel Bryant
@danielbryantuk
Architecture: Expectations versus reality
11/04/2018 @danielbryantuk
“DevOps”
tl;dr
• We are moving from complicated systems to complex systems
• Architecture is becoming more about technical leadership
• We must encode all requirements into a continuous delivery pipeline
11/04/2018 @danielbryantuk
@danielbryantuk
• Independent Technical Consultant, Product Architect at Datawire
• Architecture, DevOps, Java, microservices, cloud, containers
• Continuous Delivery (CI/CD) advocate
• Leading change through technology and teams
11/04/2018 @danielbryantuk
bit.ly/2jWDSF7
Setting the Scene
11/04/2018 @danielbryantuk
Continuous Delivery
• Produce valuable and robust software in short cycles
• Optimising for feedback and learning
• Not (necessarily) Continuous Deployment
11/04/2018 @danielbryantuk
Velocity (with stability) is key to business success
“Continuous delivery is achieved when stability and
speed can satisfy business demand.
Discontinuous delivery occurs when stability and speed
are insufficient.”
- Steve Smith (@SteveSmithCD)
11/04/2018 @danielbryantuk
11/04/2018 @danielbryantuk
Feedback:
- Was our hypothesis proven?
- How can we improve biz,
architecture and ops?
Let’s bring in some containers (or additional packaging)
11/04/2018 @danielbryantuk
11/04/2018 @danielbryantuk
What are our core challenges with modern Java app architectures?
11/04/2018 @danielbryantuk
11/04/2018 @danielbryantuk
11/04/2018 @danielbryantuk
Multiple services/pipelines
11/04/2018 @danielbryantuk
Gated application deployment
1.
2.
3.
11/04/2018 @danielbryantuk
Independent service deployment
Architecture 101
11/04/2018 @danielbryantuk
From monolith to…
11/04/2018 @danielbryantuk
UI / Biz / Repo
Monolith
Domains
Modules, components,
frameworks, libraries
http://scs-architecture.org/
11/04/2018 @danielbryantuk
Self Contained Systems (SCS)
Microservices
Function-as-a-Service
“Serverless”
11/04/2018 @danielbryantuk
Monoliths SOA Microservices / SCS FaaS / Serverless
Scope Project Enterprise Product Feature (or glue?)
Focus Swiss Army Knife Reuse, governance,
control
Domain modelling,
SRP, evolution
Function (in/out),
rapid evolution
Organisation Implemented and
maintained (typically) by
single team
Implemented by
different org units.
Maintenance done
elsewhere
Services implemented
and owned by product
teams
Implemented by
pioneers (hipsters?)
Deployment Monolithic deployment Monolithic
orchestration of
multiple services
Services deployed
individually
Functions deployed
individually
Management None Centralised Distributed Chaotic / Orchestrated
Inter-process
communication
None RPC or messaging,
typically via
middleware (ESB/MQ)
RPC via dumb pipes
and smart endpoints,
messaging/events
Events
Pioneers /
stewards
Organisations,
community or individuals
Enterprises and
Vendors
Community and high
perf organisations
Vendors/community
Core Architectural
Constraints
Language and framework Canonical domain
model, standards
Interoperability Cost (Gbs/ms)
11/04/2018 @danielbryantuk
Monoliths SOA Microservices / SCS FaaS / Serverless
Scope Project Enterprise Product Feature (or glue?)
Focus Swiss Army Knife Reuse, governance,
control
Domain modelling,
SRP, evolution
Function (in/out),
rapid evolution
Organisation Implemented and
maintained (typically) by
single team
Implemented by
different org units.
Maintenance done
elsewhere
Services implemented
and owned by product
teams
Implemented by
pioneers (hipsters?)
Deployment Monolithic deployment Monolithic
orchestration of
multiple services
Services deployed
individually
Functions deployed
individually
Management None Centralised Distributed Chaotic / Orchestrated
Inter-process
communication
None RPC or messaging,
typically via
middleware (ESB/MQ)
RPC via dumb pipes
and smart endpoints,
messaging/events
Events
Pioneers /
stewards
Organisations,
community or individuals
Enterprises and
Vendors
Community and high
perf organisations
Vendors/community
Core Architectural
Constraints
Language and framework Canonical domain
model, standards
Interoperability Cost (Gbs/ms)
Architecture fundamentals
• Coupling
• ”Components have little or no knowledge of other components”
• Interfaces
• Schema
• Cohesion
• “Degree to which the elements within a component belong together”
• Single reason to change
• Separation of concerns
11/04/2018 @danielbryantuk
Coupling, Cohesion and Continuous Delivery
• Design
• Cohesion makes reasoning easy
• Loose coupling reduces impact
• Build, unit and integration
• Cohesion limits dependencies
• Loose coupling allows simulation
• End-to-end tests
• Cohesion/coupling orchestration
• Deployment
• Cohesion minimises number of
components in play
• Coupling leads to “monoliths”
• Observability
• Cohesive is easier to understand
• High coupling typically leads to
large blast radius and “murder
mystery” style debugging
11/04/2018 @danielbryantuk
Testing 101
11/04/2018 @danielbryantuk
Testing: Core concepts
11/04/2018 @danielbryantuk
/lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants/martinfowler.com/bliki/TestPyramid.html
Testing: Core concepts
11/04/2018 @danielbryantuk
martinfowler.com/articles/microservice-testing/#testing-progress-3 martinfowler.com/articles/practical-test-pyramid.html
Testing: Core (microservice) concepts
11/04/2018 @danielbryantuk
https://medium.com/@copyconstruct/testing-microservices-the-sane-way-9bb31d158c16
Testing microservice integration
11/04/2018 @danielbryantuk
Functional testing: End-to-end
11/04/2018 @danielbryantuk
Functional Testing: Outside-in
11/04/2018 @danielbryantuk
https://specto.io/blog/2016/8/16/recipe-for-designing-building-testing-microservices/
http://www.thucydides.info/docs/serenity/
Functional
11/04/2018 @danielbryantuk
Talking of contracts…
11/04/2018 @danielbryantuk
Talking of (service) contracts…
• APIs are service contracts
• Consumer-driven Contracts
• martinfowler.com/articles/consumerDrivenContracts.html
11/04/2018 @danielbryantuk
Talking of (service) contracts…
11/04/2018 @danielbryantuk
docs.pact.io
cloud.spring.io/spring-cloud-contract
github.com/spring-cloud-samples/spring-cloud-contract-samples
Talking of (messaging) contracts…
• What about messaging?
• Message schema are an API
• www.infoq.com/presentations/contracts-streaming-microservices
11/04/2018 @danielbryantuk
Talking of (messaging) contracts…
11/04/2018 @danielbryantuk
www.infoq.com/presentations/contracts-streaming-microservices
docs.confluent.io/current/schema-registry/docs/maven-plugin.html
Contract verification
• Is it worth the cost?
• Tradeoff: Trust/comms vs time
• Startups / SMEs
• Enterprises…
• My (anecdotal) experience
• Choreography vs orchestration
11/04/2018 @danielbryantuk
11/04/2018 @danielbryantuk
https://netflix.github.io/conductor/
http://rockscript.io/
https://nifi.apache.org/docs.html
https://aws.amazon.com/documentation/step-functions/
http://camel.apache.org/
https://blog.bernd-ruecker.com/orchestrating-azure-functions-using-bpmn-and-camunda-a-case-study-ff71264cfad6
Contract verification
• Is it worth the cost?
• Tradeoff: Trust and comms
• Startups / SMEs
• Enterprises…
• My (anecdotal) experience
• Choreography vs orchestration
• Choreography
• Verifying behaviour (interactions)
• Contracts are part of this!
• London school TDD
• Orchestration
• Verify state (output)
• Lint/validate orchestration DSL
• Chicago school TDD
11/04/2018 @danielbryantuk
Measure what matters
11/04/2018 @danielbryantuk
11/04/2018 @danielbryantuk
Feedback:
- Was our hypothesis proven?
- How can we improve biz,
architecture and ops?
Visibility for the business
11/04/2018 @danielbryantuk
Testing NFRs in the build pipeline
• Architecture quality
• SonarQube / Code Climate
• Performance and Load testing
• Gatling / Locust / Bees with m’guns
• Security testing
• OWASP Dependency check / bdd-security
• Docker Bench for Security / CoreOS Clair
11/04/2018 @danielbryantuk
Architectural Visibility
11/04/2018 @danielbryantuk
Unit Testing Architecture
11/04/2018 @danielbryantuk
https://www.archunit.org/
Security Visibility: Basic Java Code Scanning
11/04/2018 @danielbryantuk
Security Visibility: Static Package Scanning
11/04/2018 @danielbryantuk
https://github.com/arminc/clair-scanner
Serverless security
“Since the OS is unreachable,
attackers will shift their attention
to the areas that remain exposed
– and first amongst those would
be the application itself.”
Responsibility for addressing
vulnerable app libraries falls to
you – the function developer.
11/04/2018 @danielbryantuk
https://www.infoq.com/articles/serverless-security
Security Visibility: Dependencies
11/04/2018 @danielbryantuk
www.owasp.org/index.php/OWASP_Dependency_Check
Delaying NFRs to the ‘Last Responsible Moment’
Newsflash!
Sometimes the
last responsible moment
is up-front
Modern architectures don’t
necessarily make this easier
11/04/2018 @danielbryantuk
Wrapping Up
11/04/2018 @danielbryantuk
11/04/2018 @danielbryantuk
Monoliths SOA Microservices / SCS FaaS / Serverless
Scope Project Enterprise Product Feature (or glue?)
Focus Swiss Army Knife Reuse, governance,
control
Domain modelling,
SRP, evolution
Function (in/out),
rapid evolution
Organisation Implemented and
maintained (typically) by
single team
Implemented by
different org units.
Maintenance done
elsewhere
Services implemented
and owned by product
teams
Implemented by
pioneers (hipsters?)
Deployment Monolithic deployment Monolithic
orchestration of
multiple services
Services deployed
individually
Functions deployed
individually
Management None Centralised Distributed Chaotic / Orchestrated
Inter-process
communication
None RPC or messaging,
typically via
middleware (ESB/MQ)
RPC via dumb
pipes/smart
endpoints,
messaging/events
Events
Pioneers /
stewards
Organisations,
community or individuals
Enterprises and
Vendors
Community and high
perf organisations
Vendors/community
Core Architectural
Constraints
Language and framework Canonical domain
model, standards
Interoperability Cost
11/04/2018 @danielbryantuk
Monoliths SOA Microservices / SCS FaaS / Serverless
Cohesion and coupling
enforced at modules
CD focuses on end-to-
end functionality
Provide goals and “best
practice” examples
Cohesion and
coupling enforced at
service level
CD focuses on
service integrity
Provide objectives
and standards
Cohesion and
coupling enforced at
service API level
CD focuses on
service interaction
Provide principles
and guidelines
Cohesion and
coupling enforced at
function API level
CD focuses on
service output/state
Provide principles
and guidelines
In conclusion…
• We are moving from complicated systems to complex systems
• Design and test with coupling and cohesion in mind
• Architecture is becoming more about technical leadership
• Recognise your situation and influence accordingly
• We must encode all requirements into a continuous delivery pipeline
• Both functional and nonfunctional requirements
11/04/2018 @danielbryantuk
Bedtime reading…
11/04/2018 @danielbryantuk
blog.christianposta.com/microservices/low-risk-monolith-to-microservice-evolution-part-iii/
Thanks for listening…
Twitter: @danielbryantuk
Email: daniel.bryant@tai-dev.co.uk
Writing: https://www.infoq.com/profile/Daniel-Bryant
Talks: https://www.youtube.com/playlist?list=PLoVYf_0qOYNeBmrpjuBOOAqJnQb3QAEtM
11/04/2018 @danielbryantuk
bit.ly/2jWDSF7
Coming soon!

More Related Content

PPTX
SATURN 2018 "Continuous Delivery with Containers" Extended 90 version
PPTX
deliver:Agile 2018 "Continuous Delivery Patterns for Modern Architectures"
PPTX
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...
PDF
JAXDevOps 2017 "The Seven (More) Deadly Sins of Microservices
PDF
#AATC2017: "Continuous Delivery with Containers: The Trials and Tribulations"
PPTX
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
PPTX
O'Reilly SACON "Continuous Delivery Patterns for Contemporary Architecture"
PPTX
vJUG 2017 "Continuous Delivery with Java and Docker: The Good, the Bad, and t...
SATURN 2018 "Continuous Delivery with Containers" Extended 90 version
deliver:Agile 2018 "Continuous Delivery Patterns for Modern Architectures"
Devoxx 2017 "Continuous Delivery with Containers: The Good, the Bad, and the ...
JAXDevOps 2017 "The Seven (More) Deadly Sins of Microservices
#AATC2017: "Continuous Delivery with Containers: The Trials and Tribulations"
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly SACON "Continuous Delivery Patterns for Contemporary Architecture"
vJUG 2017 "Continuous Delivery with Java and Docker: The Good, the Bad, and t...

What's hot (20)

PPTX
Codemotion Rome 2018 "Continuous Delivery with Containers: The Good, the Bad ...
PPTX
vJUG24 2017 "Continuous Delivery Patterns for Contemporary Architecture"
PDF
DevOpsCon 2017 "Continuous Delivery with Containers"
PDF
JAXLondon 2017 "Continuous Delivery with Containers and Java"
PPTX
O'Reilly SACON NY 2018 "Continuous Delivery Patterns for Contemporary Archite...
PDF
AllDayDevOps: "Microservices: The People and Organisational Impact"
PDF
The seven more deadly sins of microservices final
PDF
Moving to Agile Methods and DevOps on IBM i with ARCAD Pack for Rational 1479...
PPTX
ContainerSched 2017 "Continuous Delivery with Containers: The Good, the Bad, ...
PPTX
Your API is Bad and You Should Feel Bad
PDF
PdxDevOps presentation - 2015/08/17
PPT
Innovate2014 Better Integrations Through Open Interfaces
PDF
GDPR- The Buck Stops Here
PPTX
London k8s "Ambassador: Open Source Kubernetes Edge Gateway"
PPTX
DockerCon EU 2018 "Continuous Delivery with Docker and Java"
PDF
Lisbon DevOps: "Seven (More) Deadly Sins of Microservices"
PPTX
microXchg 2018: "What is a Service Mesh? Do I Need One When Developing 'Cloud...
PDF
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
PPTX
Microservice Architecture
PPT
Innovate2014 Panel - Best Practices on Implementing Integrations
Codemotion Rome 2018 "Continuous Delivery with Containers: The Good, the Bad ...
vJUG24 2017 "Continuous Delivery Patterns for Contemporary Architecture"
DevOpsCon 2017 "Continuous Delivery with Containers"
JAXLondon 2017 "Continuous Delivery with Containers and Java"
O'Reilly SACON NY 2018 "Continuous Delivery Patterns for Contemporary Archite...
AllDayDevOps: "Microservices: The People and Organisational Impact"
The seven more deadly sins of microservices final
Moving to Agile Methods and DevOps on IBM i with ARCAD Pack for Rational 1479...
ContainerSched 2017 "Continuous Delivery with Containers: The Good, the Bad, ...
Your API is Bad and You Should Feel Bad
PdxDevOps presentation - 2015/08/17
Innovate2014 Better Integrations Through Open Interfaces
GDPR- The Buck Stops Here
London k8s "Ambassador: Open Source Kubernetes Edge Gateway"
DockerCon EU 2018 "Continuous Delivery with Docker and Java"
Lisbon DevOps: "Seven (More) Deadly Sins of Microservices"
microXchg 2018: "What is a Service Mesh? Do I Need One When Developing 'Cloud...
Dart Past Your Competition by Getting Your Digital Experience into Market Fas...
Microservice Architecture
Innovate2014 Panel - Best Practices on Implementing Integrations
Ad

Similar to JAX DevOps 2018 "Continuous Delivery Patterns for Modern Architectures" (20)

PPTX
jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"
PDF
Which Application Modernization Pattern Is Right For You?
PDF
Architecting systems for continuous delivery
PPTX
Accelerate DevOps/Microservices and Kubernetes
PPTX
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
PDF
Microservice
PPTX
Accelerate Delivery: Business case for Agile DevOps, CI/CD and Microservices
PDF
Adopting the Cloud
PDF
Digital Disruption with DevOps - Reference Architecture Overview
PDF
Software Architecture for Cloud Infrastructure
PPTX
Event-Driven Serverless Architecture - the next big thing in the cloud (Cleme...
PPTX
Iot cloud service v2.0
PPTX
Microservices, DevOps, and Continuous Delivery
PDF
The Need of Cloud-Native Application
PDF
vJUG24 2016 "Seven (More) Deadly Sins of Microservice"
PPTX
Cloud computing for microprocessor tools
PDF
The journey to Native Cloud Architecture & Microservices, tracing the footste...
PDF
Microservices and the Modern IT Stack: Trends of Tomorrow - AppSphere16
PPTX
muCon 2014 "Building Java Microservices for the Cloud"
PPTX
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"
Which Application Modernization Pattern Is Right For You?
Architecting systems for continuous delivery
Accelerate DevOps/Microservices and Kubernetes
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Microservice
Accelerate Delivery: Business case for Agile DevOps, CI/CD and Microservices
Adopting the Cloud
Digital Disruption with DevOps - Reference Architecture Overview
Software Architecture for Cloud Infrastructure
Event-Driven Serverless Architecture - the next big thing in the cloud (Cleme...
Iot cloud service v2.0
Microservices, DevOps, and Continuous Delivery
The Need of Cloud-Native Application
vJUG24 2016 "Seven (More) Deadly Sins of Microservice"
Cloud computing for microprocessor tools
The journey to Native Cloud Architecture & Microservices, tracing the footste...
Microservices and the Modern IT Stack: Trends of Tomorrow - AppSphere16
muCon 2014 "Building Java Microservices for the Cloud"
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
Ad

More from Daniel Bryant (20)

PDF
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
PDF
CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...
PDF
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PDF
Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...
PPTX
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
PDF
Fall 22: "From Kubernetes to PaaS to... err, what's next"
PDF
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
PDF
KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...
PDF
JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...
PDF
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
PDF
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
PDF
Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...
PDF
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
PDF
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
PDF
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
PDF
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
PDF
MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"
PDF
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
PDF
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
PPTX
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
Fall 22: "From Kubernetes to PaaS to... err, what's next"
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...
JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...

Recently uploaded (20)

PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Machine learning based COVID-19 study performance prediction
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
KodekX | Application Modernization Development
NewMind AI Monthly Chronicles - July 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine learning based COVID-19 study performance prediction
Electronic commerce courselecture one. Pdf
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding
Review of recent advances in non-invasive hemoglobin estimation
Unlocking AI with Model Context Protocol (MCP)
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
KodekX | Application Modernization Development

JAX DevOps 2018 "Continuous Delivery Patterns for Modern Architectures"

  • 1. Continuous Delivery Patterns for Modern Java Architectures Daniel Bryant @danielbryantuk
  • 2. Architecture: Expectations versus reality 11/04/2018 @danielbryantuk “DevOps”
  • 3. tl;dr • We are moving from complicated systems to complex systems • Architecture is becoming more about technical leadership • We must encode all requirements into a continuous delivery pipeline 11/04/2018 @danielbryantuk
  • 4. @danielbryantuk • Independent Technical Consultant, Product Architect at Datawire • Architecture, DevOps, Java, microservices, cloud, containers • Continuous Delivery (CI/CD) advocate • Leading change through technology and teams 11/04/2018 @danielbryantuk bit.ly/2jWDSF7
  • 6. Continuous Delivery • Produce valuable and robust software in short cycles • Optimising for feedback and learning • Not (necessarily) Continuous Deployment 11/04/2018 @danielbryantuk
  • 7. Velocity (with stability) is key to business success “Continuous delivery is achieved when stability and speed can satisfy business demand. Discontinuous delivery occurs when stability and speed are insufficient.” - Steve Smith (@SteveSmithCD) 11/04/2018 @danielbryantuk
  • 8. 11/04/2018 @danielbryantuk Feedback: - Was our hypothesis proven? - How can we improve biz, architecture and ops?
  • 9. Let’s bring in some containers (or additional packaging) 11/04/2018 @danielbryantuk
  • 11. What are our core challenges with modern Java app architectures? 11/04/2018 @danielbryantuk
  • 17. From monolith to… 11/04/2018 @danielbryantuk UI / Biz / Repo Monolith Domains Modules, components, frameworks, libraries http://scs-architecture.org/
  • 18. 11/04/2018 @danielbryantuk Self Contained Systems (SCS) Microservices Function-as-a-Service “Serverless”
  • 19. 11/04/2018 @danielbryantuk Monoliths SOA Microservices / SCS FaaS / Serverless Scope Project Enterprise Product Feature (or glue?) Focus Swiss Army Knife Reuse, governance, control Domain modelling, SRP, evolution Function (in/out), rapid evolution Organisation Implemented and maintained (typically) by single team Implemented by different org units. Maintenance done elsewhere Services implemented and owned by product teams Implemented by pioneers (hipsters?) Deployment Monolithic deployment Monolithic orchestration of multiple services Services deployed individually Functions deployed individually Management None Centralised Distributed Chaotic / Orchestrated Inter-process communication None RPC or messaging, typically via middleware (ESB/MQ) RPC via dumb pipes and smart endpoints, messaging/events Events Pioneers / stewards Organisations, community or individuals Enterprises and Vendors Community and high perf organisations Vendors/community Core Architectural Constraints Language and framework Canonical domain model, standards Interoperability Cost (Gbs/ms)
  • 20. 11/04/2018 @danielbryantuk Monoliths SOA Microservices / SCS FaaS / Serverless Scope Project Enterprise Product Feature (or glue?) Focus Swiss Army Knife Reuse, governance, control Domain modelling, SRP, evolution Function (in/out), rapid evolution Organisation Implemented and maintained (typically) by single team Implemented by different org units. Maintenance done elsewhere Services implemented and owned by product teams Implemented by pioneers (hipsters?) Deployment Monolithic deployment Monolithic orchestration of multiple services Services deployed individually Functions deployed individually Management None Centralised Distributed Chaotic / Orchestrated Inter-process communication None RPC or messaging, typically via middleware (ESB/MQ) RPC via dumb pipes and smart endpoints, messaging/events Events Pioneers / stewards Organisations, community or individuals Enterprises and Vendors Community and high perf organisations Vendors/community Core Architectural Constraints Language and framework Canonical domain model, standards Interoperability Cost (Gbs/ms)
  • 21. Architecture fundamentals • Coupling • ”Components have little or no knowledge of other components” • Interfaces • Schema • Cohesion • “Degree to which the elements within a component belong together” • Single reason to change • Separation of concerns 11/04/2018 @danielbryantuk
  • 22. Coupling, Cohesion and Continuous Delivery • Design • Cohesion makes reasoning easy • Loose coupling reduces impact • Build, unit and integration • Cohesion limits dependencies • Loose coupling allows simulation • End-to-end tests • Cohesion/coupling orchestration • Deployment • Cohesion minimises number of components in play • Coupling leads to “monoliths” • Observability • Cohesive is easier to understand • High coupling typically leads to large blast radius and “murder mystery” style debugging 11/04/2018 @danielbryantuk
  • 24. Testing: Core concepts 11/04/2018 @danielbryantuk /lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants/martinfowler.com/bliki/TestPyramid.html
  • 25. Testing: Core concepts 11/04/2018 @danielbryantuk martinfowler.com/articles/microservice-testing/#testing-progress-3 martinfowler.com/articles/practical-test-pyramid.html
  • 26. Testing: Core (microservice) concepts 11/04/2018 @danielbryantuk https://medium.com/@copyconstruct/testing-microservices-the-sane-way-9bb31d158c16
  • 29. Functional Testing: Outside-in 11/04/2018 @danielbryantuk https://specto.io/blog/2016/8/16/recipe-for-designing-building-testing-microservices/ http://www.thucydides.info/docs/serenity/
  • 32. Talking of (service) contracts… • APIs are service contracts • Consumer-driven Contracts • martinfowler.com/articles/consumerDrivenContracts.html 11/04/2018 @danielbryantuk
  • 33. Talking of (service) contracts… 11/04/2018 @danielbryantuk docs.pact.io cloud.spring.io/spring-cloud-contract github.com/spring-cloud-samples/spring-cloud-contract-samples
  • 34. Talking of (messaging) contracts… • What about messaging? • Message schema are an API • www.infoq.com/presentations/contracts-streaming-microservices 11/04/2018 @danielbryantuk
  • 35. Talking of (messaging) contracts… 11/04/2018 @danielbryantuk www.infoq.com/presentations/contracts-streaming-microservices docs.confluent.io/current/schema-registry/docs/maven-plugin.html
  • 36. Contract verification • Is it worth the cost? • Tradeoff: Trust/comms vs time • Startups / SMEs • Enterprises… • My (anecdotal) experience • Choreography vs orchestration 11/04/2018 @danielbryantuk
  • 38. Contract verification • Is it worth the cost? • Tradeoff: Trust and comms • Startups / SMEs • Enterprises… • My (anecdotal) experience • Choreography vs orchestration • Choreography • Verifying behaviour (interactions) • Contracts are part of this! • London school TDD • Orchestration • Verify state (output) • Lint/validate orchestration DSL • Chicago school TDD 11/04/2018 @danielbryantuk
  • 40. 11/04/2018 @danielbryantuk Feedback: - Was our hypothesis proven? - How can we improve biz, architecture and ops?
  • 41. Visibility for the business 11/04/2018 @danielbryantuk
  • 42. Testing NFRs in the build pipeline • Architecture quality • SonarQube / Code Climate • Performance and Load testing • Gatling / Locust / Bees with m’guns • Security testing • OWASP Dependency check / bdd-security • Docker Bench for Security / CoreOS Clair 11/04/2018 @danielbryantuk
  • 44. Unit Testing Architecture 11/04/2018 @danielbryantuk https://www.archunit.org/
  • 45. Security Visibility: Basic Java Code Scanning 11/04/2018 @danielbryantuk
  • 46. Security Visibility: Static Package Scanning 11/04/2018 @danielbryantuk https://github.com/arminc/clair-scanner
  • 47. Serverless security “Since the OS is unreachable, attackers will shift their attention to the areas that remain exposed – and first amongst those would be the application itself.” Responsibility for addressing vulnerable app libraries falls to you – the function developer. 11/04/2018 @danielbryantuk https://www.infoq.com/articles/serverless-security
  • 48. Security Visibility: Dependencies 11/04/2018 @danielbryantuk www.owasp.org/index.php/OWASP_Dependency_Check
  • 49. Delaying NFRs to the ‘Last Responsible Moment’ Newsflash! Sometimes the last responsible moment is up-front Modern architectures don’t necessarily make this easier 11/04/2018 @danielbryantuk
  • 51. 11/04/2018 @danielbryantuk Monoliths SOA Microservices / SCS FaaS / Serverless Scope Project Enterprise Product Feature (or glue?) Focus Swiss Army Knife Reuse, governance, control Domain modelling, SRP, evolution Function (in/out), rapid evolution Organisation Implemented and maintained (typically) by single team Implemented by different org units. Maintenance done elsewhere Services implemented and owned by product teams Implemented by pioneers (hipsters?) Deployment Monolithic deployment Monolithic orchestration of multiple services Services deployed individually Functions deployed individually Management None Centralised Distributed Chaotic / Orchestrated Inter-process communication None RPC or messaging, typically via middleware (ESB/MQ) RPC via dumb pipes/smart endpoints, messaging/events Events Pioneers / stewards Organisations, community or individuals Enterprises and Vendors Community and high perf organisations Vendors/community Core Architectural Constraints Language and framework Canonical domain model, standards Interoperability Cost
  • 52. 11/04/2018 @danielbryantuk Monoliths SOA Microservices / SCS FaaS / Serverless Cohesion and coupling enforced at modules CD focuses on end-to- end functionality Provide goals and “best practice” examples Cohesion and coupling enforced at service level CD focuses on service integrity Provide objectives and standards Cohesion and coupling enforced at service API level CD focuses on service interaction Provide principles and guidelines Cohesion and coupling enforced at function API level CD focuses on service output/state Provide principles and guidelines
  • 53. In conclusion… • We are moving from complicated systems to complex systems • Design and test with coupling and cohesion in mind • Architecture is becoming more about technical leadership • Recognise your situation and influence accordingly • We must encode all requirements into a continuous delivery pipeline • Both functional and nonfunctional requirements 11/04/2018 @danielbryantuk
  • 55. Thanks for listening… Twitter: @danielbryantuk Email: daniel.bryant@tai-dev.co.uk Writing: https://www.infoq.com/profile/Daniel-Bryant Talks: https://www.youtube.com/playlist?list=PLoVYf_0qOYNeBmrpjuBOOAqJnQb3QAEtM 11/04/2018 @danielbryantuk bit.ly/2jWDSF7 Coming soon!