SlideShare ist ein Scribd-Unternehmen logo
1 von 65
Downloaden Sie, um offline zu lesen
Microservices for Architects
A Focus on Why
Given by Derek C. Ashmore
March 28, 2018
©2018 Derek C. Ashmore, All Rights Reserved 1
Who am I?
• Professional Geek
since 1987
• Java/J2EE/Java EE
since 1999
• AWS since 2010
• Specialties
• Refactoring
• Performance
Tuning
• Yes – I still code!
©2018 Derek C. Ashmore, All Rights Reserved 2
Discussion Resources
• This slide deck
– http://www.slideshare.net/derekashmore
• Sample code on my Github
– https://github.com/Derek-Ashmore/
• Sample Java Microservice (Moneta)
– https://github.com/Derek-Ashmore/moneta
• Slide deck has hyper-links!
– Don’t bother writing down URLs
©2018 Derek C. Ashmore, All Rights Reserved 3
Agenda
The “What”
and “Why” of
microservices
Design
Considerations
and Patterns
Packaging
Options
Cross-cutting
concerns
When to use
microservices
Summary /
Q&A
©2018 Derek C. Ashmore, All Rights Reserved 4
What are Microservices?
• No concrete definition
• Common microservice traits
– Single functional purpose
• Most/all changes only impact one service
• Not dependent on execution context
– “loosely coupled”
– Independent process/jvm
– Stateless
– Standard Interface (typically Web Service/REST)
– Analogy: Stereo system, Linux utilities
©2018 Derek C. Ashmore, All Rights Reserved 5
Microservices Application Architecture
• Separate Databases
• Eventual Consistency
• More network activity
©2018 Derek C. Ashmore, All Rights Reserved 6
Faster Delivery to Market
• High Deployment Rates
– Amazon = 23,000/day
– Netflix = 5,500 / day
• Business Benefits
– New features delivered more
quickly
– Quicker reaction to competitors
actions
• Combined with
– Continuous Delivery
– DevOps
©2018 Derek C. Ashmore, All Rights Reserved 7
Microservice Reuse
©2018 Derek C. Ashmore, All Rights Reserved 8
No Lock-in
• Platform agnostic
• Fewer dependency conflicts
• Still have cross-cutting concerns
• “Toll” for first app
• Still have support concerns
• Others need to be able to
support your work
9©2018 Derek C. Ashmore, All Rights Reserved
Better Availability and Resiliency
• Fault tolerance built in
– Reaction to failure part of the
design
– Failures designed to be localized
• Requirements for Resiliency
– Identify non-essential features
• Gogo and Twitter
– Context Independent Design
©2018 Derek C. Ashmore, All Rights Reserved 10
Easier Management /
Higher Throughput
• Easier to manage large numbers
of developers
– Concentrate on intelligently
drawing service boundaries
– Manage/enforce service contracts
• Each service team works
independently
• Team independence leads to
higher development throughput
©2018 Derek C. Ashmore, All Rights Reserved 11
What is a Monolith?
• Hard to change
– QA test cycles are long
– Change causes unintended
consequences
• Hard to onboard new developers
• Married to your technical stack
• Harder to diagnose bottlenecks
and memory issues
©2018 Derek C. Ashmore, All Rights Reserved 12
Microservices organize by domain
• Silo by business
competency
• Divide and Conquer
• How to divide is the hard
part
©2018 Derek C. Ashmore, All Rights Reserved 13
Microservices follow the Org Chart
• Conway’s Law
– Systems copy the structure of the
organizations that build them
• Why?
– Corps need one manager in charge
– Reduces inter-group conflict
©2018 Derek C. Ashmore, All Rights Reserved 14
Refactoring into Microservices
• Large benefits to unified
user interface
• Databases introduce
unwanted coupling
between services
©2018 Derek C. Ashmore, All Rights Reserved 15
Traditional Layered Application Architecture
• Like a layer cake
• Highly cohesive
• Defined dependencies
• Deployed as one unit
(zip/war/ear)
• Limited Scalability
• Code Size
©2018 Derek C. Ashmore, All Rights Reserved 16
Refactoring further
• Databases physically
separated
• What to do with common
data needs?
• Service call or
• Data copy
©2018 Derek C. Ashmore, All Rights Reserved 17
Alternate Database Strategy
• Centralized databases are hurdles for MS
– i.e. multiple apps use the same db
• MS-Central DB compromise
– Data items only maintained by *one* service
• All other services/apps consider that data item read-only
• Helps data corruption investigations
©2018 Derek C. Ashmore, All Rights Reserved 18
Challenges for Microservices
• More to manage
– More deployables
– More dependencies
– More complex deployments
• Contract design critical
– Quality Matters
– Minimize breaking changes
• Paradigm shift for managers too
©2018 Derek C. Ashmore, All Rights Reserved 19
Isn’t this SOA?
• Yes – More or less
• No concrete definitions
• SOA == dumb endpoints and smart routes
– ESB routes using Mule, Camel, etc.
– Transformations en route
• MS == dumb routes and smart end-points
– Simple routes
• Usually REST or Soap calls via http(s)
• Persistent queue route at it’s most complex
• Analogy: Electrical supply for Stereo
©2018 Derek C. Ashmore, All Rights Reserved 20
Agenda
The “What”
and “Why” of
microservices
Design
Considerations
and Patterns
Packaging
Options
Cross-cutting
concerns
When to use
microservices
Summary /
Q&A
©2018 Derek C. Ashmore, All Rights Reserved 21
Design considerations
• Service Boundaries (gerrymandering)
• Service call Failure / Unavailability
• Data Integrity
• Performance
©2018 Derek C. Ashmore, All Rights Reserved 22
Service Boundaries
• Core Services
– Services responsible for maintaining a specific business area data
– Usually named after Nouns
• Service is a system of record for a <blank>
– Student, Course, Classroom, etc.
• Process Services
– Services responsible for performing single complex tasks
– Usually represents an Action or Process
• Service is responsible for processing <blank>
– Student applications, Debt collection, etc.
– These services rely on core services
• Partitioning is an art
– Too few  same drawbacks as traditional architecture
– Too many  excessive network hops
©2018 Derek C. Ashmore, All Rights Reserved 23
Boundary Sanity Check
• Verbalize a mission statement in one sentence in business
terms
– Examples
• This service is the system of record for Student information
• This service registers students for classes
• This service suspends students
• This service records student payments
• This service produces official transcripts
©2018 Derek C. Ashmore, All Rights Reserved 24
Context Independence Check
• Does your service have multiple consumers?
– Could it?
• Could your service execute as easily in batch as online?
– If ‘No’, then you’re making context assumptions
• Warning Signs
– Spending time analyzing service call flow
• Your services likely make context assumptions
– Agonizing over which service should do a given activity
• Maybe you need a new service
©2018 Derek C. Ashmore, All Rights Reserved 25
Microservices are not about size
©2018 Derek C. Ashmore, All Rights Reserved 26
….. Microservices are about having a single business purpose!
Designing for Failure
• Dependent services could be down
– Minimize human intervention
– Fail sooner rather than later
– Horizontal scaling / clustering is your first line of defense
– Coding patterns can help as a backup
• Common Patterns:
– Retry
– Circuit Breaker
– Dispatch via Messaging
– Service Call Mediator
©2018 Derek C. Ashmore, All Rights Reserved 27
Retry Pattern
©2018 Derek C. Ashmore, All Rights Reserved 28
• Best for asynchronous tasks
• Limit the number of tries
• Use sleep interval between tries
• Only addresses temporary outages
• Sample Retry Pattern implementation here.
• Tooling Support:
– Apache CXF supports Retry
– Spring Batch RetryTemplate
– Apache HttpClient (Example here)
Circuit Breaker
©2018 Derek C. Ashmore, All Rights Reserved 29
Circuit Breaker (continued)
• Objective: Error out sooner
– Conserves resources
– Automatically “recovers” after a time period
• Modeled after home circuit
• Works on thresholds
– Number of errors required to trip circuit
– Amount of time required to attempt retry
• Has Hysterix support
• Best embedded in interface clients / delegates
• More information here.
• Sample Circuit implementation here.
©2018 Derek C. Ashmore, All Rights Reserved 30
Dispatch via Messaging
©2018 Derek C. Ashmore, All Rights Reserved 31
• Place work instruction on persistent queue
• If receivers are down, work stacks in queue
• Work throttled by number of receivers
• Queue can be JMS or AMQP
• Tooling Support:
– JMS Api (easy API – many use natively)
– Spring JMSTemplate or RabbitTemplate (producer)
Service Call Mediator
©2018 Derek C. Ashmore, All Rights Reserved 32
• Provide “Partial” functionality when dependent
services are down
• Providing partial functionality better user
experience than complete outage
– Airline Wifi provider providing service even if payment
processing is down
• Sample implementation here
Designing for Performance
• More network traffic
– Make services course-grained
– User Interfaces need a general manager
– Horizontal or Vertical Scaling helps
• Common Patterns:
– Back-ends for Front-ends (a.k.a. API Gateway)
– Dispatch via Messaging
– Expiring Cache
©2018 Derek C. Ashmore, All Rights Reserved 33
Back-ends for Front-ends
©2018 Derek C. Ashmore, All Rights Reserved 34
Back-ends for Front-ends
(continued)
• Consolidates service calls for the browser
– Enhances performance
• Open web often not as performant as local LAN
• Also known as “API Gateway”
• Implications
– Don’t expose microservices directly to the browser
©2018 Derek C. Ashmore, All Rights Reserved 35
Expiring Cache
©2018 Derek C. Ashmore, All Rights Reserved 36
Expiring Cache (continued)
• Look up data once and cache it
– Evict data from the cache after a defined time period
– Sometimes known as “Cache Aside”
– Reduces network calls for data
– Trades memory for speed
– More information here
• When to use
– Only use with static data
– Different clustered nodes “could” have different data for a short time
• Tooling Support:
– I recommend Google Guava
– EHCache, Gemfire, and other tools available
©2018 Derek C. Ashmore, All Rights Reserved 37
Designing for Integrity
• Services are context independent
– Have no knowledge of how/when they are executed
• One service == One Transaction
– Two-phase commits/rollbacks are a much larger problem
• Common Patterns:
– Custom Rollback
• Write your own reversing transaction
©2018 Derek C. Ashmore, All Rights Reserved 38
Custom Rollback
©2018 Derek C. Ashmore, All Rights Reserved 39
Custom Rollback (continued)
• Reverses a transaction previously posted
• Only use this for multi-service transactions
– Keeping the transaction within one service is preferred
• This pattern is completely custom
– No special product support available
• Not comprehensive solution
– Interruption usually causes inconsistent data
• More information here
©2018 Derek C. Ashmore, All Rights Reserved 40
Special Problems
• Versioning
– Issues same as more traditional applications
– “Breaking” vs. “Non-Breaking” changes
• Feature “additions” usually are “Non-Breaking”
• Trend away from breaking changes
– Versioning is a last result
• It greatly increases number of contract tests
• Backward compatibility not always obvious to developers
• Prefer header versioning to URL versioning
• Explicitly error out for versions no longer supported
• More info here
©2018 Derek C. Ashmore, All Rights Reserved 41
Special Problems (continued)
• External Calls to 3rd Party Products
– Wrap external interfaces with a separate service
– Product upgrades or changes should only affect the interface service
– Log all requests/responses
©2018 Derek C. Ashmore, All Rights Reserved 42
Common code between services?
• Yes, but….
– Version it; services make decision as to when to upgrade
– Changes to common code can’t require the deployment of multiple
services
• That ‘common code’ needs to be its own separate service
• Tends *not* to have business logic as that can change and impact multiple
services
©2018 Derek C. Ashmore, All Rights Reserved 43
Agenda
The “What”
and “Why” of
microservices
Design
Considerations
and Patterns
Packaging
Options
Cross-cutting
concerns
When to use
microservices
Summary /
Q&A
©2018 Derek C. Ashmore, All Rights Reserved 44
Packaging Support
• Microservices are deployed as a process
– For Java, embedded containers are easy
– Spring Boot
– Dropwizard
• Docker – standardizes the process deployment and
environment
©2018 Derek C. Ashmore, All Rights Reserved 45
Docker
• Is a “mini VM”
• runs a linux kernal
• Compare to shipping
container
• Standard “connections” to
outside world
• Supported formally by
Oracle, Tomcat, Jboss, and
many more
46©2018 Derek C. Ashmore, All Rights Reserved
Package Once, Run Anywhere!
Why Docker?
• Docker is Win-Win
– Easier for OPS and system administrators
• All software looks the same
• Standard interface for disk and network resources
– Containers can be “linked”
• Inherently automated
– Easier for developers
• Fewer environment difference issues
• Less to communicate to OPS / system administrators
• Easy to leverage work of others (docker-hub)
– If you haven’t tried Docker yet – you should!
©2018 Derek C. Ashmore, All Rights Reserved 47
Sample Microservice
• Moneta – Greek goddess of ‘memory’
– Open source: https://github.com/Derek-Ashmore/moneta
• Objective:
– Provide a RESTful Web Service interface to a relational database
• Feature set:
– Provides generic ‘core’ services
– Returns Json-formatted data
– Supports startRow and maxRows query options
– Supports a security call-out
– Built-in Dropwizard, Spring Boot, and War-file deployments
• Sample contract spec – currently read-only (writes in progress)
– /moneta/topics – lists ‘topics’ of information
• E.g. – Topic Customer configured
– /moneta/topic/customers?startRow=5&maxRows=25
– /moneta/topic/customer/111-222-333
©2018 Derek C. Ashmore, All Rights Reserved 48
Agenda
The “What”
and “Why” of
microservices
Design
Considerations
and Patterns
Packaging
Options
Cross-cutting
concerns
When to use
microservices
Summary /
Q&A
©2018 Derek C. Ashmore, All Rights Reserved 49
Cross-cutting Concerns
• Transaction tracking
• Security
• Contract Testing
• Same as traditional applications
– Health checks
– Logging consolidation
– Performance measurement
©2018 Derek C. Ashmore, All Rights Reserved 50
Correlation IDs
• Provides context for service calls
or user actions
• Track using HTTP Header
• Log it on all messages / error
reports
• Include it on all service calls or
message dispatches
• Code sample here
51©2018 Derek C. Ashmore, All Rights Reserved
Security
©2018 Derek C. Ashmore, All Rights Reserved 52
Note: Secure with service accounts, not end-user permissions
Security (continued)
• Keep User-level security to the UI
• Microservice security in layers
– Layer 1 – Network routing enforcement
• Limit access only to within the firewall
• Limit access to specific hosts or subnets
– Layer 2 – Use Service Accounts
• Similar to database access
– Microservices must be context independent!
©2018 Derek C. Ashmore, All Rights Reserved 53
Contract Testing
• Critical for MS architectures
– Contract changes can break other services
– Bulkhead for rogue developers
– Makes individual services more disposable
• Consumer-based testing
• Tooling support
– Apache HttpClient
– SoapUI
– ActiveMQ for JMS (embedded broker)
©2018 Derek C. Ashmore, All Rights Reserved 54
Agenda
The “What”
and “Why” of
microservices
Design
Considerations
and Patterns
Packaging
Options
Cross-cutting
concerns
When to use
microservices
Summary /
Q&A
©2018 Derek C. Ashmore, All Rights Reserved 55
When to consider MS
• Starting out with MS isn’t recommended unless
– Parts of the application will have extremely high volume
• Need to scale a portion of the application differently
• Note: MS isn’t all or nothing!
• Warning signs for app that’s too large
– Unintended consequences after release
– High technical debt / design rot
– Release testing cycles abnormally large
– Need to coordinate large numbers of developers for a single code base
• Large number == takes more than two pizzas to feed
©2018 Derek C. Ashmore, All Rights Reserved 56
Where’s the marketing fluff?
• Easier to manage
– Maybe
• You *must* be good at contract management
• You *must* be good at specifying precisely what a microservice needs to do
• You *must* ensure that services make no assumptions on how they get invoked
• Easier for developers to “understand” applications
– No – sorry
• It is easier to understand a particular ‘cog’ in the machine (e.g. the function of one
service
• It is *not* easier to understand how microservices fit together to provide a particular
piece of business functionality
©2018 Derek C. Ashmore, All Rights Reserved 57
Where’s the marketing fluff?
(continued)
• Increased Development Throughput
– Maybe
• Harder for business to ‘test’ a business function for a specific combination of microservices
• Developers work on *one* service at a time.
• You *must* be good at error detection (unintended consequences)
• The more assumptions a service makes about its execution context, the more unintended
consequences (e.g. errors) you are likely to have on deployment
• Services become disposable and can be “replaced” instead of “maintained /
fixed”.
– Maybe
• It’s more easily replaced than when using traditional architectures
• Requires rigorous contract testing
– Can’t have the “replacement” act any differently than the original (except for the bug being fixed, of course)
• Requires architecture support for cross-cutting concerns
– Can’t take a lot of time to implement / test
©2018 Derek C. Ashmore, All Rights Reserved 58
Microservices Hype Cycle
©2018 Derek C. Ashmore, All Rights Reserved 59
Web Interest Over Time
©2018 Derek C. Ashmore, All Rights Reserved 60
Common Mistakes
• Inappropriate Service Boundries
– Services that are not truly loosely coupled
• One change  Multiple services deployed
– Services that make ‘assumptions’ about execution context
• Deployments cause unintended consequences
• Not recording all requests/responses
– Support developers need to localize problems
– Include request/response data in exceptions
• Contexted Exceptions in Commons Lang
©2018 Derek C. Ashmore, All Rights Reserved 61
Common Mistakes (continued)
• Not checking arguments up front
– Derivative exceptions take longer to debug/fix
– Error out faster
– NullPointerException == Argument not checked!
• No Change in Governance
– Easier / quicker path to production
– Automated Deployments/Backouts
• Less manual intervention
• Less manual testing (quick reaction vs prevention)
– Continuous Delivery / DevOps / Microservices go hand-in-hand
©2018 Derek C. Ashmore, All Rights Reserved 62
Why Now?
• SOA an old idea
• Virtualization and Cloud advances (e.g. Docker, AWS, etc.)
– Less dependent on server set-up
• Hardware cheaper than it’s ever been
– We’re not as concerned with the extra process overhead for MS
• Infrastructure Automation advances
– Additional tooling support(e.g. Chef or Puppet)
– Easier to manage larger numbers of deployments
• Can you think of other possible reasons?
©2018 Derek C. Ashmore, All Rights Reserved 63
Further Reading
• Microservices reading list
– http://www.mattstine.com/microservices
• Microsoft’s Cloud Design Patterns
– https://msdn.microsoft.com/en-us/library/dn600223.aspx
• Moneta Java microservice example
– https://github.com/Derek-Ashmore/moneta
• This slide deck
– http://www.slideshare.net/derekashmore
©2018 Derek C. Ashmore, All Rights Reserved 64
Questions?
• Derek Ashmore:
– Blog: www.derekashmore.com
– LinkedIn: www.linkedin.com/in/derekashmore
– Twitter: https://twitter.com/Derek_Ashmore
– GitHub: https://github.com/Derek-Ashmore
– Book: http://dvtpress.com/
©2018 Derek C. Ashmore, All Rights Reserved 65

Weitere ähnliche Inhalte

Was ist angesagt?

Total Cost of Ownership, what is it ? and why do we need to know more about it.
Total Cost of Ownership, what is it ? and why do we need to know more about it.Total Cost of Ownership, what is it ? and why do we need to know more about it.
Total Cost of Ownership, what is it ? and why do we need to know more about it.Ashraf Osman
 
Net App Cisco V Mware Integrated Presov6
Net App Cisco V Mware Integrated Presov6Net App Cisco V Mware Integrated Presov6
Net App Cisco V Mware Integrated Presov6jnava09
 
20th March Session Three by Prosenjit Bhattacharjee
20th March Session Three by Prosenjit Bhattacharjee20th March Session Three by Prosenjit Bhattacharjee
20th March Session Three by Prosenjit BhattacharjeeSharath Kumar
 
ABCD's of WAN Optimization
ABCD's of WAN OptimizationABCD's of WAN Optimization
ABCD's of WAN OptimizationEdward Gilbert
 
Kemp LoadMaster & VMware vSphere
Kemp LoadMaster & VMware vSphereKemp LoadMaster & VMware vSphere
Kemp LoadMaster & VMware vSphereAndrea Mauro
 
EMC Academic Associate Exam Description - Cloud Infrastructure and Services
EMC Academic Associate Exam Description  - Cloud Infrastructure and ServicesEMC Academic Associate Exam Description  - Cloud Infrastructure and Services
EMC Academic Associate Exam Description - Cloud Infrastructure and ServicesEMC
 
Edge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance MonitoringEdge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance MonitoringAkamai Technologies
 
Tpm cloud collaboration network security
Tpm   cloud collaboration network securityTpm   cloud collaboration network security
Tpm cloud collaboration network securityDavid Brunke
 
HP Discover - Developing new applications for the cloud
HP Discover - Developing new applications for the cloudHP Discover - Developing new applications for the cloud
HP Discover - Developing new applications for the cloudBart Blommaerts
 
Accelerating and Protecting your Virtualize Environment
Accelerating and Protecting your Virtualize EnvironmentAccelerating and Protecting your Virtualize Environment
Accelerating and Protecting your Virtualize EnvironmentCTI Group
 
Application patterns
Application patternsApplication patterns
Application patternstomi vanek
 
Sap fundamentals overview_for_sap_minors
Sap fundamentals overview_for_sap_minorsSap fundamentals overview_for_sap_minors
Sap fundamentals overview_for_sap_minorsCenk Ersoy
 
Collaboration solutions for every enterprise
Collaboration solutions for every enterpriseCollaboration solutions for every enterprise
Collaboration solutions for every enterpriseMithi SkyConnect
 
Next generation WAN Webinar
Next generation WAN WebinarNext generation WAN Webinar
Next generation WAN WebinarGinny Au
 
Cloudy with SaaS Shine
Cloudy with SaaS ShineCloudy with SaaS Shine
Cloudy with SaaS ShineSimon Baker
 
PureApp Presentation
PureApp PresentationPureApp Presentation
PureApp PresentationProlifics
 

Was ist angesagt? (19)

Total Cost of Ownership, what is it ? and why do we need to know more about it.
Total Cost of Ownership, what is it ? and why do we need to know more about it.Total Cost of Ownership, what is it ? and why do we need to know more about it.
Total Cost of Ownership, what is it ? and why do we need to know more about it.
 
Net App Cisco V Mware Integrated Presov6
Net App Cisco V Mware Integrated Presov6Net App Cisco V Mware Integrated Presov6
Net App Cisco V Mware Integrated Presov6
 
A Beginners Guide to Web Hosting
A Beginners Guide to Web HostingA Beginners Guide to Web Hosting
A Beginners Guide to Web Hosting
 
PaaS TCO
PaaS TCOPaaS TCO
PaaS TCO
 
20th March Session Three by Prosenjit Bhattacharjee
20th March Session Three by Prosenjit Bhattacharjee20th March Session Three by Prosenjit Bhattacharjee
20th March Session Three by Prosenjit Bhattacharjee
 
ABCD's of WAN Optimization
ABCD's of WAN OptimizationABCD's of WAN Optimization
ABCD's of WAN Optimization
 
Kemp LoadMaster & VMware vSphere
Kemp LoadMaster & VMware vSphereKemp LoadMaster & VMware vSphere
Kemp LoadMaster & VMware vSphere
 
EMC Academic Associate Exam Description - Cloud Infrastructure and Services
EMC Academic Associate Exam Description  - Cloud Infrastructure and ServicesEMC Academic Associate Exam Description  - Cloud Infrastructure and Services
EMC Academic Associate Exam Description - Cloud Infrastructure and Services
 
Edge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance MonitoringEdge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance Monitoring
 
Tpm cloud collaboration network security
Tpm   cloud collaboration network securityTpm   cloud collaboration network security
Tpm cloud collaboration network security
 
HP Discover - Developing new applications for the cloud
HP Discover - Developing new applications for the cloudHP Discover - Developing new applications for the cloud
HP Discover - Developing new applications for the cloud
 
Accelerating and Protecting your Virtualize Environment
Accelerating and Protecting your Virtualize EnvironmentAccelerating and Protecting your Virtualize Environment
Accelerating and Protecting your Virtualize Environment
 
Turbo-boosting Hybrid WAN using SD-WAN
Turbo-boosting Hybrid WAN using SD-WANTurbo-boosting Hybrid WAN using SD-WAN
Turbo-boosting Hybrid WAN using SD-WAN
 
Application patterns
Application patternsApplication patterns
Application patterns
 
Sap fundamentals overview_for_sap_minors
Sap fundamentals overview_for_sap_minorsSap fundamentals overview_for_sap_minors
Sap fundamentals overview_for_sap_minors
 
Collaboration solutions for every enterprise
Collaboration solutions for every enterpriseCollaboration solutions for every enterprise
Collaboration solutions for every enterprise
 
Next generation WAN Webinar
Next generation WAN WebinarNext generation WAN Webinar
Next generation WAN Webinar
 
Cloudy with SaaS Shine
Cloudy with SaaS ShineCloudy with SaaS Shine
Cloudy with SaaS Shine
 
PureApp Presentation
PureApp PresentationPureApp Presentation
PureApp Presentation
 

Ähnlich wie Microservices for Architects - Atlanta 2018-03-28

Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15Derek Ashmore
 
Microservices for architects los angeles-2016-07-16
Microservices for architects los angeles-2016-07-16Microservices for architects los angeles-2016-07-16
Microservices for architects los angeles-2016-07-16Derek Ashmore
 
Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19Derek Ashmore
 
Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28Derek Ashmore
 
Writing microservices in Java -- Chicago-2015-11-10
Writing microservices in Java -- Chicago-2015-11-10Writing microservices in Java -- Chicago-2015-11-10
Writing microservices in Java -- Chicago-2015-11-10Derek Ashmore
 
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26Derek Ashmore
 
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018Derek Ashmore
 
Refactoring Into Microservices 2016-11-08
Refactoring Into Microservices 2016-11-08Refactoring Into Microservices 2016-11-08
Refactoring Into Microservices 2016-11-08Derek Ashmore
 
Refactoring Into Microservices 2016-11-06
Refactoring Into Microservices 2016-11-06Refactoring Into Microservices 2016-11-06
Refactoring Into Microservices 2016-11-06Derek Ashmore
 
Best Practices for Monitoring Cloud Networks
Best Practices for Monitoring Cloud NetworksBest Practices for Monitoring Cloud Networks
Best Practices for Monitoring Cloud NetworksThousandEyes
 
CA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeter
CA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeterCA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeter
CA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeterCA Technologies
 
Navigating a Mesh of Microservices in the new Cloud-Native World with Istio
Navigating a Mesh of Microservices in the new Cloud-Native World with IstioNavigating a Mesh of Microservices in the new Cloud-Native World with Istio
Navigating a Mesh of Microservices in the new Cloud-Native World with IstioGary Arora
 
Managed Services, Monitoring Services and Basic IT Support Services - Pros an...
Managed Services, Monitoring Services and Basic IT Support Services - Pros an...Managed Services, Monitoring Services and Basic IT Support Services - Pros an...
Managed Services, Monitoring Services and Basic IT Support Services - Pros an...NTEN
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Derek Ashmore
 
Pulse2012 Trm Battelle Final
Pulse2012 Trm Battelle FinalPulse2012 Trm Battelle Final
Pulse2012 Trm Battelle Finalbrockj
 
Communicating configurations - visualizing IT service maps and other configur...
Communicating configurations - visualizing IT service maps and other configur...Communicating configurations - visualizing IT service maps and other configur...
Communicating configurations - visualizing IT service maps and other configur...Robert Cowham
 
Implementing DevOps Automation Best Practices and Common Mistakes
Implementing DevOps AutomationBest Practices and Common MistakesImplementing DevOps AutomationBest Practices and Common Mistakes
Implementing DevOps Automation Best Practices and Common MistakesDerek Ashmore
 
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...Michael Erichsen
 
Get Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled ArchitecturesGet Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled ArchitecturesDeborah Schalm
 
Get Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled Architectures Get Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled Architectures DevOps.com
 

Ähnlich wie Microservices for Architects - Atlanta 2018-03-28 (20)

Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15Microservices for java architects coders-conf-2015-05-15
Microservices for java architects coders-conf-2015-05-15
 
Microservices for architects los angeles-2016-07-16
Microservices for architects los angeles-2016-07-16Microservices for architects los angeles-2016-07-16
Microservices for architects los angeles-2016-07-16
 
Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19Microservices for java architects schamburg-2015-05-19
Microservices for java architects schamburg-2015-05-19
 
Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28Writing microservices in java java one-2015-10-28
Writing microservices in java java one-2015-10-28
 
Writing microservices in Java -- Chicago-2015-11-10
Writing microservices in Java -- Chicago-2015-11-10Writing microservices in Java -- Chicago-2015-11-10
Writing microservices in Java -- Chicago-2015-11-10
 
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
Refactoring Into Microservices. Chicago Coders Conference 2017-06-26
 
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
Microservices with Terraform, Docker and the Cloud. DevOps Wet 2018
 
Refactoring Into Microservices 2016-11-08
Refactoring Into Microservices 2016-11-08Refactoring Into Microservices 2016-11-08
Refactoring Into Microservices 2016-11-08
 
Refactoring Into Microservices 2016-11-06
Refactoring Into Microservices 2016-11-06Refactoring Into Microservices 2016-11-06
Refactoring Into Microservices 2016-11-06
 
Best Practices for Monitoring Cloud Networks
Best Practices for Monitoring Cloud NetworksBest Practices for Monitoring Cloud Networks
Best Practices for Monitoring Cloud Networks
 
CA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeter
CA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeterCA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeter
CA Security Communities Webcast - CA SSO Performance Testing with CA BlazeMeter
 
Navigating a Mesh of Microservices in the new Cloud-Native World with Istio
Navigating a Mesh of Microservices in the new Cloud-Native World with IstioNavigating a Mesh of Microservices in the new Cloud-Native World with Istio
Navigating a Mesh of Microservices in the new Cloud-Native World with Istio
 
Managed Services, Monitoring Services and Basic IT Support Services - Pros an...
Managed Services, Monitoring Services and Basic IT Support Services - Pros an...Managed Services, Monitoring Services and Basic IT Support Services - Pros an...
Managed Services, Monitoring Services and Basic IT Support Services - Pros an...
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15
 
Pulse2012 Trm Battelle Final
Pulse2012 Trm Battelle FinalPulse2012 Trm Battelle Final
Pulse2012 Trm Battelle Final
 
Communicating configurations - visualizing IT service maps and other configur...
Communicating configurations - visualizing IT service maps and other configur...Communicating configurations - visualizing IT service maps and other configur...
Communicating configurations - visualizing IT service maps and other configur...
 
Implementing DevOps Automation Best Practices and Common Mistakes
Implementing DevOps AutomationBest Practices and Common MistakesImplementing DevOps AutomationBest Practices and Common Mistakes
Implementing DevOps Automation Best Practices and Common Mistakes
 
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
 
Get Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled ArchitecturesGet Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled Architectures
 
Get Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled Architectures Get Loose! Microservices and Loosely Coupled Architectures
Get Loose! Microservices and Loosely Coupled Architectures
 

Kürzlich hochgeladen

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Microservices for Architects - Atlanta 2018-03-28

  • 1. Microservices for Architects A Focus on Why Given by Derek C. Ashmore March 28, 2018 ©2018 Derek C. Ashmore, All Rights Reserved 1
  • 2. Who am I? • Professional Geek since 1987 • Java/J2EE/Java EE since 1999 • AWS since 2010 • Specialties • Refactoring • Performance Tuning • Yes – I still code! ©2018 Derek C. Ashmore, All Rights Reserved 2
  • 3. Discussion Resources • This slide deck – http://www.slideshare.net/derekashmore • Sample code on my Github – https://github.com/Derek-Ashmore/ • Sample Java Microservice (Moneta) – https://github.com/Derek-Ashmore/moneta • Slide deck has hyper-links! – Don’t bother writing down URLs ©2018 Derek C. Ashmore, All Rights Reserved 3
  • 4. Agenda The “What” and “Why” of microservices Design Considerations and Patterns Packaging Options Cross-cutting concerns When to use microservices Summary / Q&A ©2018 Derek C. Ashmore, All Rights Reserved 4
  • 5. What are Microservices? • No concrete definition • Common microservice traits – Single functional purpose • Most/all changes only impact one service • Not dependent on execution context – “loosely coupled” – Independent process/jvm – Stateless – Standard Interface (typically Web Service/REST) – Analogy: Stereo system, Linux utilities ©2018 Derek C. Ashmore, All Rights Reserved 5
  • 6. Microservices Application Architecture • Separate Databases • Eventual Consistency • More network activity ©2018 Derek C. Ashmore, All Rights Reserved 6
  • 7. Faster Delivery to Market • High Deployment Rates – Amazon = 23,000/day – Netflix = 5,500 / day • Business Benefits – New features delivered more quickly – Quicker reaction to competitors actions • Combined with – Continuous Delivery – DevOps ©2018 Derek C. Ashmore, All Rights Reserved 7
  • 8. Microservice Reuse ©2018 Derek C. Ashmore, All Rights Reserved 8
  • 9. No Lock-in • Platform agnostic • Fewer dependency conflicts • Still have cross-cutting concerns • “Toll” for first app • Still have support concerns • Others need to be able to support your work 9©2018 Derek C. Ashmore, All Rights Reserved
  • 10. Better Availability and Resiliency • Fault tolerance built in – Reaction to failure part of the design – Failures designed to be localized • Requirements for Resiliency – Identify non-essential features • Gogo and Twitter – Context Independent Design ©2018 Derek C. Ashmore, All Rights Reserved 10
  • 11. Easier Management / Higher Throughput • Easier to manage large numbers of developers – Concentrate on intelligently drawing service boundaries – Manage/enforce service contracts • Each service team works independently • Team independence leads to higher development throughput ©2018 Derek C. Ashmore, All Rights Reserved 11
  • 12. What is a Monolith? • Hard to change – QA test cycles are long – Change causes unintended consequences • Hard to onboard new developers • Married to your technical stack • Harder to diagnose bottlenecks and memory issues ©2018 Derek C. Ashmore, All Rights Reserved 12
  • 13. Microservices organize by domain • Silo by business competency • Divide and Conquer • How to divide is the hard part ©2018 Derek C. Ashmore, All Rights Reserved 13
  • 14. Microservices follow the Org Chart • Conway’s Law – Systems copy the structure of the organizations that build them • Why? – Corps need one manager in charge – Reduces inter-group conflict ©2018 Derek C. Ashmore, All Rights Reserved 14
  • 15. Refactoring into Microservices • Large benefits to unified user interface • Databases introduce unwanted coupling between services ©2018 Derek C. Ashmore, All Rights Reserved 15
  • 16. Traditional Layered Application Architecture • Like a layer cake • Highly cohesive • Defined dependencies • Deployed as one unit (zip/war/ear) • Limited Scalability • Code Size ©2018 Derek C. Ashmore, All Rights Reserved 16
  • 17. Refactoring further • Databases physically separated • What to do with common data needs? • Service call or • Data copy ©2018 Derek C. Ashmore, All Rights Reserved 17
  • 18. Alternate Database Strategy • Centralized databases are hurdles for MS – i.e. multiple apps use the same db • MS-Central DB compromise – Data items only maintained by *one* service • All other services/apps consider that data item read-only • Helps data corruption investigations ©2018 Derek C. Ashmore, All Rights Reserved 18
  • 19. Challenges for Microservices • More to manage – More deployables – More dependencies – More complex deployments • Contract design critical – Quality Matters – Minimize breaking changes • Paradigm shift for managers too ©2018 Derek C. Ashmore, All Rights Reserved 19
  • 20. Isn’t this SOA? • Yes – More or less • No concrete definitions • SOA == dumb endpoints and smart routes – ESB routes using Mule, Camel, etc. – Transformations en route • MS == dumb routes and smart end-points – Simple routes • Usually REST or Soap calls via http(s) • Persistent queue route at it’s most complex • Analogy: Electrical supply for Stereo ©2018 Derek C. Ashmore, All Rights Reserved 20
  • 21. Agenda The “What” and “Why” of microservices Design Considerations and Patterns Packaging Options Cross-cutting concerns When to use microservices Summary / Q&A ©2018 Derek C. Ashmore, All Rights Reserved 21
  • 22. Design considerations • Service Boundaries (gerrymandering) • Service call Failure / Unavailability • Data Integrity • Performance ©2018 Derek C. Ashmore, All Rights Reserved 22
  • 23. Service Boundaries • Core Services – Services responsible for maintaining a specific business area data – Usually named after Nouns • Service is a system of record for a <blank> – Student, Course, Classroom, etc. • Process Services – Services responsible for performing single complex tasks – Usually represents an Action or Process • Service is responsible for processing <blank> – Student applications, Debt collection, etc. – These services rely on core services • Partitioning is an art – Too few  same drawbacks as traditional architecture – Too many  excessive network hops ©2018 Derek C. Ashmore, All Rights Reserved 23
  • 24. Boundary Sanity Check • Verbalize a mission statement in one sentence in business terms – Examples • This service is the system of record for Student information • This service registers students for classes • This service suspends students • This service records student payments • This service produces official transcripts ©2018 Derek C. Ashmore, All Rights Reserved 24
  • 25. Context Independence Check • Does your service have multiple consumers? – Could it? • Could your service execute as easily in batch as online? – If ‘No’, then you’re making context assumptions • Warning Signs – Spending time analyzing service call flow • Your services likely make context assumptions – Agonizing over which service should do a given activity • Maybe you need a new service ©2018 Derek C. Ashmore, All Rights Reserved 25
  • 26. Microservices are not about size ©2018 Derek C. Ashmore, All Rights Reserved 26 ….. Microservices are about having a single business purpose!
  • 27. Designing for Failure • Dependent services could be down – Minimize human intervention – Fail sooner rather than later – Horizontal scaling / clustering is your first line of defense – Coding patterns can help as a backup • Common Patterns: – Retry – Circuit Breaker – Dispatch via Messaging – Service Call Mediator ©2018 Derek C. Ashmore, All Rights Reserved 27
  • 28. Retry Pattern ©2018 Derek C. Ashmore, All Rights Reserved 28 • Best for asynchronous tasks • Limit the number of tries • Use sleep interval between tries • Only addresses temporary outages • Sample Retry Pattern implementation here. • Tooling Support: – Apache CXF supports Retry – Spring Batch RetryTemplate – Apache HttpClient (Example here)
  • 29. Circuit Breaker ©2018 Derek C. Ashmore, All Rights Reserved 29
  • 30. Circuit Breaker (continued) • Objective: Error out sooner – Conserves resources – Automatically “recovers” after a time period • Modeled after home circuit • Works on thresholds – Number of errors required to trip circuit – Amount of time required to attempt retry • Has Hysterix support • Best embedded in interface clients / delegates • More information here. • Sample Circuit implementation here. ©2018 Derek C. Ashmore, All Rights Reserved 30
  • 31. Dispatch via Messaging ©2018 Derek C. Ashmore, All Rights Reserved 31 • Place work instruction on persistent queue • If receivers are down, work stacks in queue • Work throttled by number of receivers • Queue can be JMS or AMQP • Tooling Support: – JMS Api (easy API – many use natively) – Spring JMSTemplate or RabbitTemplate (producer)
  • 32. Service Call Mediator ©2018 Derek C. Ashmore, All Rights Reserved 32 • Provide “Partial” functionality when dependent services are down • Providing partial functionality better user experience than complete outage – Airline Wifi provider providing service even if payment processing is down • Sample implementation here
  • 33. Designing for Performance • More network traffic – Make services course-grained – User Interfaces need a general manager – Horizontal or Vertical Scaling helps • Common Patterns: – Back-ends for Front-ends (a.k.a. API Gateway) – Dispatch via Messaging – Expiring Cache ©2018 Derek C. Ashmore, All Rights Reserved 33
  • 34. Back-ends for Front-ends ©2018 Derek C. Ashmore, All Rights Reserved 34
  • 35. Back-ends for Front-ends (continued) • Consolidates service calls for the browser – Enhances performance • Open web often not as performant as local LAN • Also known as “API Gateway” • Implications – Don’t expose microservices directly to the browser ©2018 Derek C. Ashmore, All Rights Reserved 35
  • 36. Expiring Cache ©2018 Derek C. Ashmore, All Rights Reserved 36
  • 37. Expiring Cache (continued) • Look up data once and cache it – Evict data from the cache after a defined time period – Sometimes known as “Cache Aside” – Reduces network calls for data – Trades memory for speed – More information here • When to use – Only use with static data – Different clustered nodes “could” have different data for a short time • Tooling Support: – I recommend Google Guava – EHCache, Gemfire, and other tools available ©2018 Derek C. Ashmore, All Rights Reserved 37
  • 38. Designing for Integrity • Services are context independent – Have no knowledge of how/when they are executed • One service == One Transaction – Two-phase commits/rollbacks are a much larger problem • Common Patterns: – Custom Rollback • Write your own reversing transaction ©2018 Derek C. Ashmore, All Rights Reserved 38
  • 39. Custom Rollback ©2018 Derek C. Ashmore, All Rights Reserved 39
  • 40. Custom Rollback (continued) • Reverses a transaction previously posted • Only use this for multi-service transactions – Keeping the transaction within one service is preferred • This pattern is completely custom – No special product support available • Not comprehensive solution – Interruption usually causes inconsistent data • More information here ©2018 Derek C. Ashmore, All Rights Reserved 40
  • 41. Special Problems • Versioning – Issues same as more traditional applications – “Breaking” vs. “Non-Breaking” changes • Feature “additions” usually are “Non-Breaking” • Trend away from breaking changes – Versioning is a last result • It greatly increases number of contract tests • Backward compatibility not always obvious to developers • Prefer header versioning to URL versioning • Explicitly error out for versions no longer supported • More info here ©2018 Derek C. Ashmore, All Rights Reserved 41
  • 42. Special Problems (continued) • External Calls to 3rd Party Products – Wrap external interfaces with a separate service – Product upgrades or changes should only affect the interface service – Log all requests/responses ©2018 Derek C. Ashmore, All Rights Reserved 42
  • 43. Common code between services? • Yes, but…. – Version it; services make decision as to when to upgrade – Changes to common code can’t require the deployment of multiple services • That ‘common code’ needs to be its own separate service • Tends *not* to have business logic as that can change and impact multiple services ©2018 Derek C. Ashmore, All Rights Reserved 43
  • 44. Agenda The “What” and “Why” of microservices Design Considerations and Patterns Packaging Options Cross-cutting concerns When to use microservices Summary / Q&A ©2018 Derek C. Ashmore, All Rights Reserved 44
  • 45. Packaging Support • Microservices are deployed as a process – For Java, embedded containers are easy – Spring Boot – Dropwizard • Docker – standardizes the process deployment and environment ©2018 Derek C. Ashmore, All Rights Reserved 45
  • 46. Docker • Is a “mini VM” • runs a linux kernal • Compare to shipping container • Standard “connections” to outside world • Supported formally by Oracle, Tomcat, Jboss, and many more 46©2018 Derek C. Ashmore, All Rights Reserved Package Once, Run Anywhere!
  • 47. Why Docker? • Docker is Win-Win – Easier for OPS and system administrators • All software looks the same • Standard interface for disk and network resources – Containers can be “linked” • Inherently automated – Easier for developers • Fewer environment difference issues • Less to communicate to OPS / system administrators • Easy to leverage work of others (docker-hub) – If you haven’t tried Docker yet – you should! ©2018 Derek C. Ashmore, All Rights Reserved 47
  • 48. Sample Microservice • Moneta – Greek goddess of ‘memory’ – Open source: https://github.com/Derek-Ashmore/moneta • Objective: – Provide a RESTful Web Service interface to a relational database • Feature set: – Provides generic ‘core’ services – Returns Json-formatted data – Supports startRow and maxRows query options – Supports a security call-out – Built-in Dropwizard, Spring Boot, and War-file deployments • Sample contract spec – currently read-only (writes in progress) – /moneta/topics – lists ‘topics’ of information • E.g. – Topic Customer configured – /moneta/topic/customers?startRow=5&maxRows=25 – /moneta/topic/customer/111-222-333 ©2018 Derek C. Ashmore, All Rights Reserved 48
  • 49. Agenda The “What” and “Why” of microservices Design Considerations and Patterns Packaging Options Cross-cutting concerns When to use microservices Summary / Q&A ©2018 Derek C. Ashmore, All Rights Reserved 49
  • 50. Cross-cutting Concerns • Transaction tracking • Security • Contract Testing • Same as traditional applications – Health checks – Logging consolidation – Performance measurement ©2018 Derek C. Ashmore, All Rights Reserved 50
  • 51. Correlation IDs • Provides context for service calls or user actions • Track using HTTP Header • Log it on all messages / error reports • Include it on all service calls or message dispatches • Code sample here 51©2018 Derek C. Ashmore, All Rights Reserved
  • 52. Security ©2018 Derek C. Ashmore, All Rights Reserved 52 Note: Secure with service accounts, not end-user permissions
  • 53. Security (continued) • Keep User-level security to the UI • Microservice security in layers – Layer 1 – Network routing enforcement • Limit access only to within the firewall • Limit access to specific hosts or subnets – Layer 2 – Use Service Accounts • Similar to database access – Microservices must be context independent! ©2018 Derek C. Ashmore, All Rights Reserved 53
  • 54. Contract Testing • Critical for MS architectures – Contract changes can break other services – Bulkhead for rogue developers – Makes individual services more disposable • Consumer-based testing • Tooling support – Apache HttpClient – SoapUI – ActiveMQ for JMS (embedded broker) ©2018 Derek C. Ashmore, All Rights Reserved 54
  • 55. Agenda The “What” and “Why” of microservices Design Considerations and Patterns Packaging Options Cross-cutting concerns When to use microservices Summary / Q&A ©2018 Derek C. Ashmore, All Rights Reserved 55
  • 56. When to consider MS • Starting out with MS isn’t recommended unless – Parts of the application will have extremely high volume • Need to scale a portion of the application differently • Note: MS isn’t all or nothing! • Warning signs for app that’s too large – Unintended consequences after release – High technical debt / design rot – Release testing cycles abnormally large – Need to coordinate large numbers of developers for a single code base • Large number == takes more than two pizzas to feed ©2018 Derek C. Ashmore, All Rights Reserved 56
  • 57. Where’s the marketing fluff? • Easier to manage – Maybe • You *must* be good at contract management • You *must* be good at specifying precisely what a microservice needs to do • You *must* ensure that services make no assumptions on how they get invoked • Easier for developers to “understand” applications – No – sorry • It is easier to understand a particular ‘cog’ in the machine (e.g. the function of one service • It is *not* easier to understand how microservices fit together to provide a particular piece of business functionality ©2018 Derek C. Ashmore, All Rights Reserved 57
  • 58. Where’s the marketing fluff? (continued) • Increased Development Throughput – Maybe • Harder for business to ‘test’ a business function for a specific combination of microservices • Developers work on *one* service at a time. • You *must* be good at error detection (unintended consequences) • The more assumptions a service makes about its execution context, the more unintended consequences (e.g. errors) you are likely to have on deployment • Services become disposable and can be “replaced” instead of “maintained / fixed”. – Maybe • It’s more easily replaced than when using traditional architectures • Requires rigorous contract testing – Can’t have the “replacement” act any differently than the original (except for the bug being fixed, of course) • Requires architecture support for cross-cutting concerns – Can’t take a lot of time to implement / test ©2018 Derek C. Ashmore, All Rights Reserved 58
  • 59. Microservices Hype Cycle ©2018 Derek C. Ashmore, All Rights Reserved 59
  • 60. Web Interest Over Time ©2018 Derek C. Ashmore, All Rights Reserved 60
  • 61. Common Mistakes • Inappropriate Service Boundries – Services that are not truly loosely coupled • One change  Multiple services deployed – Services that make ‘assumptions’ about execution context • Deployments cause unintended consequences • Not recording all requests/responses – Support developers need to localize problems – Include request/response data in exceptions • Contexted Exceptions in Commons Lang ©2018 Derek C. Ashmore, All Rights Reserved 61
  • 62. Common Mistakes (continued) • Not checking arguments up front – Derivative exceptions take longer to debug/fix – Error out faster – NullPointerException == Argument not checked! • No Change in Governance – Easier / quicker path to production – Automated Deployments/Backouts • Less manual intervention • Less manual testing (quick reaction vs prevention) – Continuous Delivery / DevOps / Microservices go hand-in-hand ©2018 Derek C. Ashmore, All Rights Reserved 62
  • 63. Why Now? • SOA an old idea • Virtualization and Cloud advances (e.g. Docker, AWS, etc.) – Less dependent on server set-up • Hardware cheaper than it’s ever been – We’re not as concerned with the extra process overhead for MS • Infrastructure Automation advances – Additional tooling support(e.g. Chef or Puppet) – Easier to manage larger numbers of deployments • Can you think of other possible reasons? ©2018 Derek C. Ashmore, All Rights Reserved 63
  • 64. Further Reading • Microservices reading list – http://www.mattstine.com/microservices • Microsoft’s Cloud Design Patterns – https://msdn.microsoft.com/en-us/library/dn600223.aspx • Moneta Java microservice example – https://github.com/Derek-Ashmore/moneta • This slide deck – http://www.slideshare.net/derekashmore ©2018 Derek C. Ashmore, All Rights Reserved 64
  • 65. Questions? • Derek Ashmore: – Blog: www.derekashmore.com – LinkedIn: www.linkedin.com/in/derekashmore – Twitter: https://twitter.com/Derek_Ashmore – GitHub: https://github.com/Derek-Ashmore – Book: http://dvtpress.com/ ©2018 Derek C. Ashmore, All Rights Reserved 65