Microservices:
The Trials and tribulations of making software “Small”
Daniel Bryant
@danielbryantuk
OpencRedo
TL;DR
Implementing Microservices is easy
Implementing Microservice systems is complex
(This includes the associated organisational/people systems)
28/10/2016 @danielbryantuk
@danielbryantuk
• Chief Scientist at OpenCredo, CTO at SpectoLabs
ü Transforming organisations through technology and teams
ü Agile, Lean, Architecture, CI/CD, DevOps
ü Microservices, cloud, Containers, Java, Go, Docker, Kubernetes
• London Java Community Associate
• Adopt OpenJDK and JSR
• InfoQ Editor, DZone MVB, VOXXED, O'Reilly
28/10/2016 @danielbryantuk
So, What is a microservice?
“Loosely coupled service oriented architecture
with bounded contexts”
Adrian Cockcroft
“Applications that fit in your head”
James Lewis
28/10/2016 @danielbryantuk
Cloud-native operability and value
• Automated, self-service platform
• Continuous delivery
• Devops mindset/culture (shared, learning/feedback & Mechanical sympathy)
• Microservice architecture (and 'Micro' teams)
• Hypothesis-driven business (and development)
Hat tip @caseywest
28/10/2016 @danielbryantuk
Today
• Strategy
– Is your business ready for microservices?
– Technical leadership is vital
– Choosing Tools is challenging
• Feedback
– Optimise for Visibility and learning (throughout the tech/organisational stack)
• Responsibilities
– Conway, spotify and cargo culting
– Devops is about sharing
28/10/2016 @danielbryantuk
1. Strategy - situational awareness and leadership
28/10/2016 @danielbryantuk
Strategy - are Microservices A good fit?
• “our 'mode TWO' apps are Microservices”
– No transformation / migration plan
– SOE evolution limited by SOR
– Lipstick on the pig
• Not understanding principles (Cargo-culting)
– Teams not operating around Biz Functionality
– No leadership leads to building Mini-monoliths
• No Well-defined DevOps / SRE / Ops
– Deployment/ops free-for-all
28/10/2016 @danielbryantuk
Is your business ready? (situational awareness)
28/10/2016 @danielbryantuk
philcalcado.com/2015/09/08/how_we_ended_up_with_microservices.html
speakerdeck.com/acolyer/making-sense-of-it-all
Communicate the vision
28/10/2016 @danielbryantuk
Is your technical leadership (architecture) ready?
28/10/2016 @danielbryantuk
“If you can't build a [well-structured] monolith,
what makes you think microservices are the answer?”
Simon Brown
(bit.ly/1n7D0vp)
28/10/2016 @danielbryantuk
Tech Leadership - Responsibility, knowledge & tactics
• Promote shared understanding
– Communication (bit.ly/1Ia3u8o)
• Risk management
• ‘Just enough’ up front design
– Microservice glue and platforms
• Leadership principles
– Autonomy, purpose & mastery
28/10/2016 @danielbryantuk
Is your dev/operations team ready?
• Fowler's Microservice Prerequisities
– Rapid provisioning
– Basic monitoring
– Rapid application Deployment
• The technical side of devops
– Audit Continuous integration/delivery
– Choosing Tooling is challenging
28/10/2016 @danielbryantuk
Tooling - The’Spine Model
• Effective conversations make for effective
collaboration
– Kevin Trethewey & danie Roux, Agile 2015
• It's a TOOL Problem
– As a species, we have always been Tool users
and makers.
– We use _____ to get our work done
• People get stuck in a dilemma where equally
plausible options are available
– “Going up the Spine” breaks deadlock
http://spinemodel.info/explanation/introduction/
Tooling - The’Spine Model
• PRACTICES before Tools
– Decide on the Practices that the tools are there to support
– We do _____ to create value
• PRINCIPLES before Practices
– Decide on the Principles to measure those Practices against.
– We leverage _____ to change the system
• VALUES before Principles
– Make as explicit as possible the Values at play in the system.
– We optimise for _____
• NEEDS before Values
– It all starts at Needs. Why does this system exist in the first
place?
– We are here to satisfy _____
http://spinemodel.info/explanation/introduction/
Evaluation - Fitness functions
• Microservices as an Evolutionary Architecture
– Neal Ford and Rebecca Parsons
• Great for evaluation and documentation
– Platforms / Language
– Middleware
– Data stores
28/10/2016 @danielbryantuk
Matt Raible’s Comparison Framework
28/10/2016 @danielbryantuk
Evaluation - It'S easy to be tricked
28/10/2016 @danielbryantuk
Evaluation - beware of bias and heuristics
28/10/2016 @danielbryantuk
Final thoughts: Pick Your (Technical) Battles...…
• Optimize globally across the organisation
– start small
– Product teams own their languages and tools
– Apply 'Natural selection' - Only officially support 'fittest' tools
• As Dan McKinley says, “Choose Boring Technology”
• The internal open source 'Innersource' model works well with microservices
28/10/2016 @danielbryantuk
2. Feedback - visibility and constant learning
28/10/2016 @danielbryantuk
Constant learning (and action)
• Microservices typically generate more data
– This can stretch limitations within the organisation!
• Regular reviews and retrospection are essential
– Effective conversatons
– Take action from feedback and failures
28/10/2016 @danielbryantuk
Visibility for the business
28/10/2016 @danielbryantuk
Architectural feedback
28/10/2016 @danielbryantuk
28/10/2016 @danielbryantuk
www.infoq.com/news/2015/04/raffi-krikorian-rearchitecting
Conversations are vital for Tech Leads
• Standards
– Transport protocl, message format, logging, metrics etc
– Documentation e.g. swagger, RAML, WADL
• Testing
– Consumer-based contracts (PACT, PACT-JVM, PACTO etc)
– E2e Automation, automation, automation
• Dealing with data is always tricky
– http://blog.christianposta.com/microservices/the-hardest-part-about-microservices-data/
28/10/2016 @danielbryantuk
Talk about Operational visibility
• Logging
– The 10 Commandments of Logging
– The Log: What every software
engineer should know
• Monitoring
– Rob Ewaschuk's Philosophy on
Alerting”
– Brendan Gregg's USE method
28/10/2016 @danielbryantuk
Opentracing & OpenZipkin
28/10/2016 @danielbryantuk
Talk about Testing - API simulation with Hoverfly
• Lightweight Service virtualisation
– Open source (Apache 2.0)
– Go-based / single binary
– Written by @Spectolabs
• Flexible API simulation
– developing against agreed apis
– Great for nfr testing
28/10/2016 @danielbryantuk
28/10/2016 @danielbryantuk
• Middleware
• Remove	PII
• Rate	limit
• Add	headers
• Middleware
• Fault	injection
• Chaos	monkey
Be prepared to talk about data liberation...
28/10/2016 @danielbryantuk
Microservice developers be like
F**king monolithic database
Credit to Michael Hausenblas
Microservices enable agility
• When done well...
• Build, measure, learn
– Design for impact (Start with 'why')
– Build-in signals and metrics
– Create a culture of experimentation and failing fast
28/10/2016 @danielbryantuk
3. Responsibilities - the buck always stops somewhere
28/10/2016 @danielbryantuk
Conway'S law
“organizations which design systems are
constrained to produce designs which are
copies of the communication structures of
these organizations”
- Melvin conway
28/10/2016 @danielbryantuk
We hear this a lot...
“We’ve decided to reform our teams around squads, chapters and guilds”
• Beware of cargo-culting
– Repeat three times “We are not spotify”
• Understand the practices, principles, values etc
28/10/2016 @danielbryantuk
Cross-functional Teams
• Spotify (bit.ly/1C46ZKo)
– Culture
• Amazon (bit.ly/1F3Dgkm)
– Communication
• Gilt (gi.lt/1rgyWvO)
– Strategic alignment
28/10/2016 @danielbryantuk
How does Devops fit into this?
• http://web.devopstopologies.com/
• @	matthewpskelton
• @beerops and @sigje
• Google SRE
28/10/2016 @danielbryantuk
Devops - the 'fullstack engineer' myth
“I'M sorry, but if you'RE not designing the computer chips and
writing the website, then I don'T wanna hear from you”
Charity Majors (@mipsytipsy), CraftConf 2016
http://www.ustream.tv/recorded/86181845
28/10/2016 @danielbryantuk
Devops - define responsibilities
• Do you really want to build an
entire microservices platform?
• Focus on what matters
– Ci/CD
– Mechanical sympathy
– Logging
– Monitoring
28/10/2016 @danielbryantuk
DevOps - Define Responsibilities
28/10/2016 @danielbryantuk
Let'S wrap this up...
28/10/2016 @danielbryantuk
Conclusion
• Strategy
– Get your business ready for microservices (strategy, goals etc)
– Technical leadership (architecture) skills are vital
– Evaluating Tools is challenging
• Feedback
– Visibility and learning (optimise for feedback throughout the organisational stack)
• Responsibilities (people)
– Learn from Conway and spotify, but do not cargo cult blindly
– Devops (done right) is a prerequisite for microservices
28/10/2016 @danielbryantuk
Bedtime reading
28/10/2016 @danielbryantuk
28/10/2016 @danielbryantuk
www.slideshare.net/dbryant_uk/qcon-ny-2016-the-seven-more-deadly-sins-of-microservices
THANKS...
@danielbryantuk
daniel.bryant@opencredo.com
http://muservicesweekly.com/
(Credit to Tareq Abedrabbo for inspiration/guidance)
28/10/2016 @danielbryantuk

SwisscomSoftwareDay 2016 "The Trials and Tribulations of Making Software Small"

  • 1.
    Microservices: The Trials andtribulations of making software “Small” Daniel Bryant @danielbryantuk OpencRedo
  • 2.
    TL;DR Implementing Microservices iseasy Implementing Microservice systems is complex (This includes the associated organisational/people systems) 28/10/2016 @danielbryantuk
  • 3.
    @danielbryantuk • Chief Scientistat OpenCredo, CTO at SpectoLabs ü Transforming organisations through technology and teams ü Agile, Lean, Architecture, CI/CD, DevOps ü Microservices, cloud, Containers, Java, Go, Docker, Kubernetes • London Java Community Associate • Adopt OpenJDK and JSR • InfoQ Editor, DZone MVB, VOXXED, O'Reilly 28/10/2016 @danielbryantuk
  • 4.
    So, What isa microservice? “Loosely coupled service oriented architecture with bounded contexts” Adrian Cockcroft “Applications that fit in your head” James Lewis 28/10/2016 @danielbryantuk
  • 5.
    Cloud-native operability andvalue • Automated, self-service platform • Continuous delivery • Devops mindset/culture (shared, learning/feedback & Mechanical sympathy) • Microservice architecture (and 'Micro' teams) • Hypothesis-driven business (and development) Hat tip @caseywest 28/10/2016 @danielbryantuk
  • 6.
    Today • Strategy – Isyour business ready for microservices? – Technical leadership is vital – Choosing Tools is challenging • Feedback – Optimise for Visibility and learning (throughout the tech/organisational stack) • Responsibilities – Conway, spotify and cargo culting – Devops is about sharing 28/10/2016 @danielbryantuk
  • 7.
    1. Strategy -situational awareness and leadership 28/10/2016 @danielbryantuk
  • 8.
    Strategy - areMicroservices A good fit? • “our 'mode TWO' apps are Microservices” – No transformation / migration plan – SOE evolution limited by SOR – Lipstick on the pig • Not understanding principles (Cargo-culting) – Teams not operating around Biz Functionality – No leadership leads to building Mini-monoliths • No Well-defined DevOps / SRE / Ops – Deployment/ops free-for-all 28/10/2016 @danielbryantuk
  • 9.
    Is your businessready? (situational awareness) 28/10/2016 @danielbryantuk philcalcado.com/2015/09/08/how_we_ended_up_with_microservices.html speakerdeck.com/acolyer/making-sense-of-it-all
  • 10.
  • 11.
    Is your technicalleadership (architecture) ready? 28/10/2016 @danielbryantuk “If you can't build a [well-structured] monolith, what makes you think microservices are the answer?” Simon Brown (bit.ly/1n7D0vp)
  • 12.
  • 13.
    Tech Leadership -Responsibility, knowledge & tactics • Promote shared understanding – Communication (bit.ly/1Ia3u8o) • Risk management • ‘Just enough’ up front design – Microservice glue and platforms • Leadership principles – Autonomy, purpose & mastery 28/10/2016 @danielbryantuk
  • 14.
    Is your dev/operationsteam ready? • Fowler's Microservice Prerequisities – Rapid provisioning – Basic monitoring – Rapid application Deployment • The technical side of devops – Audit Continuous integration/delivery – Choosing Tooling is challenging 28/10/2016 @danielbryantuk
  • 15.
    Tooling - The’SpineModel • Effective conversations make for effective collaboration – Kevin Trethewey & danie Roux, Agile 2015 • It's a TOOL Problem – As a species, we have always been Tool users and makers. – We use _____ to get our work done • People get stuck in a dilemma where equally plausible options are available – “Going up the Spine” breaks deadlock http://spinemodel.info/explanation/introduction/
  • 16.
    Tooling - The’SpineModel • PRACTICES before Tools – Decide on the Practices that the tools are there to support – We do _____ to create value • PRINCIPLES before Practices – Decide on the Principles to measure those Practices against. – We leverage _____ to change the system • VALUES before Principles – Make as explicit as possible the Values at play in the system. – We optimise for _____ • NEEDS before Values – It all starts at Needs. Why does this system exist in the first place? – We are here to satisfy _____ http://spinemodel.info/explanation/introduction/
  • 17.
    Evaluation - Fitnessfunctions • Microservices as an Evolutionary Architecture – Neal Ford and Rebecca Parsons • Great for evaluation and documentation – Platforms / Language – Middleware – Data stores 28/10/2016 @danielbryantuk
  • 18.
    Matt Raible’s ComparisonFramework 28/10/2016 @danielbryantuk
  • 19.
    Evaluation - It'Seasy to be tricked 28/10/2016 @danielbryantuk
  • 20.
    Evaluation - bewareof bias and heuristics 28/10/2016 @danielbryantuk
  • 21.
    Final thoughts: PickYour (Technical) Battles...… • Optimize globally across the organisation – start small – Product teams own their languages and tools – Apply 'Natural selection' - Only officially support 'fittest' tools • As Dan McKinley says, “Choose Boring Technology” • The internal open source 'Innersource' model works well with microservices 28/10/2016 @danielbryantuk
  • 22.
    2. Feedback -visibility and constant learning 28/10/2016 @danielbryantuk
  • 23.
    Constant learning (andaction) • Microservices typically generate more data – This can stretch limitations within the organisation! • Regular reviews and retrospection are essential – Effective conversatons – Take action from feedback and failures 28/10/2016 @danielbryantuk
  • 24.
    Visibility for thebusiness 28/10/2016 @danielbryantuk
  • 25.
  • 26.
  • 27.
    Conversations are vitalfor Tech Leads • Standards – Transport protocl, message format, logging, metrics etc – Documentation e.g. swagger, RAML, WADL • Testing – Consumer-based contracts (PACT, PACT-JVM, PACTO etc) – E2e Automation, automation, automation • Dealing with data is always tricky – http://blog.christianposta.com/microservices/the-hardest-part-about-microservices-data/ 28/10/2016 @danielbryantuk
  • 28.
    Talk about Operationalvisibility • Logging – The 10 Commandments of Logging – The Log: What every software engineer should know • Monitoring – Rob Ewaschuk's Philosophy on Alerting” – Brendan Gregg's USE method 28/10/2016 @danielbryantuk
  • 29.
  • 30.
    Talk about Testing- API simulation with Hoverfly • Lightweight Service virtualisation – Open source (Apache 2.0) – Go-based / single binary – Written by @Spectolabs • Flexible API simulation – developing against agreed apis – Great for nfr testing 28/10/2016 @danielbryantuk
  • 31.
    28/10/2016 @danielbryantuk • Middleware •Remove PII • Rate limit • Add headers • Middleware • Fault injection • Chaos monkey
  • 32.
    Be prepared totalk about data liberation... 28/10/2016 @danielbryantuk Microservice developers be like F**king monolithic database Credit to Michael Hausenblas
  • 33.
    Microservices enable agility •When done well... • Build, measure, learn – Design for impact (Start with 'why') – Build-in signals and metrics – Create a culture of experimentation and failing fast 28/10/2016 @danielbryantuk
  • 34.
    3. Responsibilities -the buck always stops somewhere 28/10/2016 @danielbryantuk
  • 35.
    Conway'S law “organizations whichdesign systems are constrained to produce designs which are copies of the communication structures of these organizations” - Melvin conway 28/10/2016 @danielbryantuk
  • 36.
    We hear thisa lot... “We’ve decided to reform our teams around squads, chapters and guilds” • Beware of cargo-culting – Repeat three times “We are not spotify” • Understand the practices, principles, values etc 28/10/2016 @danielbryantuk
  • 37.
    Cross-functional Teams • Spotify(bit.ly/1C46ZKo) – Culture • Amazon (bit.ly/1F3Dgkm) – Communication • Gilt (gi.lt/1rgyWvO) – Strategic alignment 28/10/2016 @danielbryantuk
  • 38.
    How does Devopsfit into this? • http://web.devopstopologies.com/ • @ matthewpskelton • @beerops and @sigje • Google SRE 28/10/2016 @danielbryantuk
  • 39.
    Devops - the'fullstack engineer' myth “I'M sorry, but if you'RE not designing the computer chips and writing the website, then I don'T wanna hear from you” Charity Majors (@mipsytipsy), CraftConf 2016 http://www.ustream.tv/recorded/86181845 28/10/2016 @danielbryantuk
  • 40.
    Devops - defineresponsibilities • Do you really want to build an entire microservices platform? • Focus on what matters – Ci/CD – Mechanical sympathy – Logging – Monitoring 28/10/2016 @danielbryantuk
  • 41.
    DevOps - DefineResponsibilities 28/10/2016 @danielbryantuk
  • 42.
    Let'S wrap thisup... 28/10/2016 @danielbryantuk
  • 43.
    Conclusion • Strategy – Getyour business ready for microservices (strategy, goals etc) – Technical leadership (architecture) skills are vital – Evaluating Tools is challenging • Feedback – Visibility and learning (optimise for feedback throughout the organisational stack) • Responsibilities (people) – Learn from Conway and spotify, but do not cargo cult blindly – Devops (done right) is a prerequisite for microservices 28/10/2016 @danielbryantuk
  • 44.
  • 45.
  • 46.