Upload
chris-richardson
View
249
Download
0
Embed Size (px)
Citation preview
@crichardson
Microservices: enabling the rapid and reliable delivery of
complex applicationsChris Richardson
Founder of Eventuate.io Founder of the original CloudFoundry.com Author of POJOs in Action
@crichardson [email protected] http://microservices.io http://eventuate.io http://plainoldobjects.com
Copyright © 2017. Chris Richardson Consulting, Inc. All rights reserved
@crichardson
Presentation goal
How the microservice architecture accelerates the delivery of large, complex software applications
@crichardson
About Chris
@crichardson
About Chris
Consultant and trainer focusing on modern
application architectures including microservices
(http://www.chrisrichardson.net/)
@crichardson
About Chris
Founder of a startup that is creating an open-source/SaaS platform
that simplifies the development of transactional microservices
(http://eventuate.io)
@crichardson
About Chris
http://learnmicroservices.io
@crichardson
Agenda
The need for DevOps and continuous delivery
From monolith to microservices
Microservices != silver bullet
Refactoring to microservices
@crichardson
Traditional developmentW
all o
f con
fusio
nRequirements
Business
Wall
of c
onfu
sion
Architecture/ Design
Architects
Wall
of c
onfu
sion
Code
Developers
Wall
of c
onfu
sion
Tested code
QA Ops
Capacity planning Procure hardware
Months later…Business discovers customers want something different
Developers discover there are bugs
Operations discover their capacity planning estimates were wrong
Over-provision => waste money
Under-provision => success catastrophe
What is DevOps?
Set of practices where developers, testers
(dev) and IT operations (ops) collaborate and
communicate to deliver software rapidly,
frequently, and reliably
http://itrevolution.com/devops-handbook
@crichardson
DevOps/Continuous Delivery =
table stakes for playing in highly competitive industries
Mark Schwartz, A seat at the table
@crichardson
Reducing lead time
Increasing deployment frequency
@crichardson
Modern software development: moving fast and not breaking things!
46x
440x
24x
5x lower
Amazon: ~0.001%
Netflix: 16 minutes
@crichardson
Architecture ⇒
Maintainability
Testability
Deployability
Development velocity
Agenda
The need for DevOps and continuous delivery
From monolith to microservices
Microservices != silver bullet
Refactoring to microservices
@crichardson
Tomcat/App. Server
Traditional: Monolithic architecture
Browser/Client
WAR/EAR
MySQL Database
Review Module
Catalog Module
Recommendation Module
StoreFrontUI
Order Module
HTMLREST/JSON
Logical viewImplementation view
@crichardson
The monolithic architecture is an architectural style
that structures the application as a single executable
component
Implementation view
-ilities of small monoliths
Maintainability
Testability
Deployability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😄
@crichardson
But successful applications keep growing….
Development Team Application
@crichardson
… and growing
Development Team A
ApplicationDevelopment Team B
Development Team C
@crichardson
Eventually:
agile development
and deployment becomes
impossible
=
monolithic hell
-ilities of large monoliths
Maintainability
Testability
Deployability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😭
@crichardson
Technology stack becomes increasingly obsolete
BUT A rewrite is not feasible
The microservice architecture is an architectural style
that structures an application as a
set of loosely coupled, services organized around
business capabilities
@crichardson
Application
Service = business capabilityAcme, Inc
Order Taking
Inventory management
Delivery management
Business Capability = something a business does to deliver value
…
Order Service
Inventory Management
Service
Delivery Management
Service … Service
Service size is secondary
microservice architecture
Service:
Meaningful business functionality
Developed by a small team
Minimal lead time/high deployment frequency
@crichardson
Browser
Mobile Device
Content Router
API Gateway
Catalog Service
Review Service
Order Service
… Service
Catalog Database
Review Database
Order Database
… Database
HTTP /HTML
REST
REST
Browse & Search WebApp
Product Detail WebApp
….
Supplier Inbound Gateway
Catalog update messages
Supplier System
-ilities of a microservice architecture
Maintainability
Testability
Deployability
…
https://en.wikipedia.org/wiki/Non-functional_requirement
😄
@crichardson
Microservices ⇒ continuous delivery/deployment
of large/complex applications
@crichardson
Process: Continuous delivery/deployment
Organization:Small, agile, autonomous,
cross functional teams
Architecture: Microservice architecture
Enables
Enables Enables
SuccessfulSoftware
Development
Services improve testability
and deployability
Teams own services
@crichardson
Microservices ⇒ evolve the technology stack
Pick a new technology when
Writing a new service
Making major changes to an existing service
Let’s you experiment and fail safely
@crichardson
Agenda
The need for DevOps and continuous delivery
From monolith to microservices
Microservices != silver bullet
Refactoring to microservices
@crichardson
No silver bullets
http://en.wikipedia.org/wiki/Fred_Brooks
@crichardson
Drawbacks of microservices
Complexity
Development: IPC, partial failure, distributed data Testing: Integration, end to end, …Deployment …
@crichardson
Are microservices a good fit for my application?
@crichardson
Do I have the pre-requisites in place:
automated testing automated provisioning ….. ?
@crichardson
When using microservices:How to decompose an application into services?
How to deploy an application’s services?How to handle cross cutting concerns?
Which communication mechanisms to use?
How do external clients communicate with the services?
How does a client discover the network location of a service instance?
How to prevent a network or service failure from cascading to other services?
How to maintain data consistency and implement queries?
How to make testing easier?
How to understand the behavior of an application and troubleshoot problems?
How to implement a UI screen or page that displays data from multiple services?
@crichardson
It depends!
@crichardson
Microservice pattern language =
collection of patterns that solve these
architecture, design, development and operational problems
@crichardson
What’s a pattern?
Reusable solution to a problem
occurring in a particular context
@crichardson
The structure of a pattern encourages objectivity
Resulting context
aka the situation
Name
Context
Problem
Related patterns
(conflicting) issues etc to address Forces
Solution Benefits
Drawbacks
Issues to resolve
Alternatives
Solutions to issues
@crichardson
Microservices pattern language: http://microservices.io
@crichardson
Agenda
The need for DevOps and continuous delivery
From monolith to microservices
Microservices != silver bullet
Refactoring to microservices
@crichardson
How do you decompose your big, scary monolithic application?
@crichardson
Best done incrementally!
@crichardson
Strangler Application
https://en.wikipedia.org/wiki/Strangler_fig
http://www.martinfowler.com/bliki/StranglerApplication.html
@crichardson
Strategy: New functionality = service
Monolith ServiceData integration glue
API Gateway
Request
Monolithic database
Service database
Enables service to access monolith’s data
@crichardson
Strategy: Existing module ⇒ service ...
Monolith
Module
Monolithic database
Module tables
@crichardson
Define a “remotable” interface
In-process ACL
Application
Module
Monolithic database
Module tables
@crichardson
... Module ⇒ service
Monolith ServiceData integration glue
Monolithic database Module Database
API Gateway
Request
@crichardson
Summary
Modern software development = DevOps/Continuous Delivery
Use the appropriate architecture
Small applications ⇒ Monolithic architecture
Complex applications ⇒ Microservice architecture
Use the pattern language to guide your decision making
Incrementally refactoring a monolith to microservices
Thank You!
• Earn that additional PDU – complete the survey!
• Certificates
• Upcoming webinar
• A word from our Sales Director, Brad Emm