SlideShare a Scribd company logo
1 of 97
Download to read offline
Microservices: Decomposing 
@crichardson 
Applications for 
Deployability and Scalability 
Chris Richardson 
Author of POJOs in Action 
Founder of the original CloudFoundry.com 
@crichardson 
chris@chrisrichardson.net 
http://plainoldobjects.com
Presentation goal 
How decomposing applications into 
@crichardson 
microservices 
improves deployability and scalability 
and 
simplifies the adoption of new 
technologies
@crichardson 
About Chris
@crichardson 
About Chris 
Founder of a buzzword compliant (stealthy, social, mobile, 
big data, machine learning, ...) startup 
Consultant helping organizations improve how they 
architect and deploy applications using cloud computing, 
micro services, polyglot applications, NoSQL, ...
@crichardson 
Agenda 
The (sometimes evil) monolith 
Decomposing applications into services 
Client ⇔ service interaction design 
Decentralized data management
@crichardson 
Let’s imagine you are 
building an online store
@crichardson 
Traditional application 
architecture 
StoreFrontUI 
Product Info 
Service 
Recommendation 
Service 
Tomcat 
Browser/ 
Client 
WAR/EAR 
MySQL 
Database 
Review Service 
Simple to 
develop 
test 
deploy 
Load 
balancer 
scale 
Spring MVC 
Spring 
Hibernate 
Order Service 
HTML 
REST/JSON
But large, complex, monolithic 
@crichardson 
applications 
⇒ 
problems
@crichardson 
Intimidates developers
@crichardson 
Obstacle to frequent 
deployments 
Need to redeploy everything to change one component 
Interrupts long running background (e.g. Quartz) jobs 
Increases risk of failure 
Fear of change 
Updates will happen less often - really long QA cycles 
e.g. Makes A/B testing UI really difficult 
Eggs in 
one basket
@crichardson 
Overloads your IDE and 
container 
Slows down development
@crichardson 
Obstacle to scaling 
development 
I want 
to update the UI 
But 
the backend is not working 
yet! 
Lots of coordination and 
communication required
Requires long-term commitment 
to a technology stack 
@crichardson
@crichardson 
Agenda 
The (sometimes evil) monolith 
Decomposing applications into services 
Client ⇔ service interaction design 
Decentralized data management
@crichardson
@crichardson 
The scale cube 
X axis 
- horizontal duplication 
Z axis - data partitioning 
Y axis - 
functional 
decomposition 
similar 
splitting by things 
Scale Scale by 
splitting 
different things
@crichardson 
Y-axis scaling - application level 
WAR 
Storefront UI 
Product Info 
Service 
Recommendation 
Service 
Review 
Service 
Order 
Service
@crichardson 
Y-axis scaling - application level 
Storefront UI 
Product Info 
Service 
Recommendation 
Service 
Review 
Service 
Order 
Service
@crichardson 
Y-axis scaling - application level 
Product Info 
Service 
Product Info 
Recommendation 
Service 
Review 
Service 
Order 
Service 
Browse Products 
UI 
Checkout UI 
Order management 
UI 
Account 
management UI 
Apply X-axis and Z-axis scaling 
to each service independently
Service deployment options 
@crichardson 
Isolation, manageability 
VM or Physical Machine 
Docker/Linux container 
JVM 
JAR/WAR/OSGI bundle/... 
Density/efficiency
@crichardson 
Partitioning strategies... 
Partition by noun, e.g. product info service 
Partition by verb, e.g. Checkout UI 
Single Responsibility Principle 
Unix utilities - do one focussed thing well
@crichardson 
Partitioning strategies 
Too few 
Drawbacks of the monolithic architecture 
Too many - a.k.a. Nano-service anti-pattern 
Runtime overhead 
Potential risk of excessive network hops 
Potentially difficult to understand system 
Something of an art
@crichardson 
Example micro-service
@crichardson 
More service, less micro 
But more realistically... 
Focus on building services that make 
development and deployment easier 
- not just tiny services
@crichardson 
Real world examples 
http://techblog.netflix.com/ 
~600 services 
http://highscalability.com/amazon-architecture 
100-150 services to build a page 
http://www.addsimplicity.com/downloads/ 
eBaySDForum2006-11-29.pdf 
http://queue.acm.org/detail.cfm?id=1394128
@crichardson 
There are many benefits
@crichardson 
Smaller, simpler apps 
Easier to understand and develop 
Less jar/classpath hell - who needs OSGI? 
Faster to build and deploy 
Reduced startup time - important for GAE
Scales development: 
develop, deploy and scale 
each service independently 
@crichardson
@crichardson 
Improves fault isolation
Eliminates long-term commitment 
to a single technology stack 
@crichardson 
Modular, polyglot, multi-framework 
applications
@crichardson 
Two levels of architecture 
System-level 
Services 
Inter-service glue: interfaces and communication mechanisms 
Slow changing 
Service-level 
Internal architecture of each service 
Each service could use a different technology stack 
Pick the best tool for the job 
Rapidly evolving
Easily try other technologies 
@crichardson 
... and fail safely
But there are drawbacks 
@crichardson
@crichardson 
Complexity
Complexity of developing a 
@crichardson 
distributed system 
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
@crichardson 
Multiple databases 
& 
Transaction management 
e.g. Fun with eventual consistency
@crichardson 
Complexity of testing a 
distributed system 
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
Complexity of deploying and 
operating a distributed 
@crichardson 
system 
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html 
You need a lot of automation
@crichardson 
Developing and deploying 
features that span multiple 
services requires careful 
coordination
@crichardson 
When to use it? 
In the beginning: 
•You don’t need it 
•It will slow you down 
Later on: 
•You need it 
•Refactoring is painful
@crichardson 
Agenda 
The (sometimes evil) monolith 
Decomposing applications into services 
Client ⇔ service interaction design 
Decentralized data management
Let’s imagine that you want to 
display a product’s details... 
Product 
Info Reviews 
Recommendations 
@crichardson
Directly connecting the front-end to the backend 
@crichardson 
View Controller 
Model 
Product Info 
service 
Recommendation 
Service 
Review 
service 
REST 
REST 
AMQP 
Traditional server-side 
web application 
View Controller 
Model 
Browser/Native App 
Chatty API 
Web unfriendly 
protocols
@crichardson 
Use an API gateway 
View Controller 
Model 
Product Info 
service 
Recommendation 
Service 
Review 
service 
REST 
REST 
AMQP 
API 
Gateway 
View Controller 
Model 
Browser/Native App 
Single entry point 
Client 
specific APIs 
Protocol 
translation 
Traditional server-side 
web application
@crichardson 
Optimized client-specific 
APIs 
Web 
application 
Mobile 
App 
NodeJS 
API 
Gateway 
REST 
proxy 
Event 
publishing 
Product Info 
service 
Recommendation 
Service 
Review 
service 
REST 
REST 
AMQP 
getProductInfo() 
getRecomm...() 
getReviews() 
getProductDetails()
@crichardson 
Netflix API Gateway 
http://techblog.netflix.com/2013/01/optimizing-netflix-api.html 
Device specific 
end points
@crichardson 
API gateway design 
challenges 
Performance and scalability 
Non-blocking I/O 
Asynchronous, concurrent code 
Handling partial failures 
.... 
http://techblog.netflix.com/2012/02/fault-tolerance-in-high-volume.html
@crichardson 
Useful frameworks for 
building an API gateway 
JVM: 
Netty, Vertex 
Netflix Hystrix 
... 
Other: 
NodeJS
How does a browser 
interact with the partitioned 
@crichardson 
web application?
@crichardson 
Partitioned web app ⇒ no 
longer a single base URL 
/products 
Browse Products 
UI 
/checkout 
Checkout UI 
/orders 
Order management 
UI 
/account 
Account 
management UI 
Browser ?
The solution: single entry point 
that routes based on URL 
@crichardson 
/products 
Browse Products 
UI 
/checkout 
Checkout UI 
/orders 
Order management 
UI 
/account 
Account 
management UI 
http://acme.com/<service>/... 
Content 
Browser Router 
Hidden from 
browser 
Single entry 
point
@crichardson 
How do the services 
communicate?
Inter-service communication 
options 
@crichardson 
Synchronous HTTP ⇔ asynchronous AMQP 
Formats: JSON, XML, Protocol Buffers, Thrift, ... 
Asynchronous is preferred 
JSON is fashionable but binary format 
is more efficient
Pros and cons of messaging 
Pros 
Cons 
Decouples client from 
Additional complexity of 
server 
message broker 
Message broker buffers 
Request/reply-style 
messages 
communication is more 
Supports a variety of 
complex 
communication patterns
Pros and cons of HTTP 
Pros 
Simple and familiar 
Request/reply is easy 
Firewall friendly 
No intermediate broker 
Cons 
Only supports request/ 
reply 
Server must be 
available 
Client needs to 
discover URL(s) of 
server(s)
@crichardson 
Discovery option #1: 
Internal load balancer 
Load 
Balancer 
Product Info 
Service 
Product Info 
Service 
Product Info 
Service 
Product Info 
Service 
Client/ 
API gateway 
Services register 
with load balancer 
Client talks to 
load balancer 
Has a well-known 
location 
http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/USVPC_creating_basic_lb.html
@crichardson 
Discovery option #2: 
client-side load balancing 
REST 
Client 
Product Info 
Service 
Product Info 
Service 
Product Info 
Service 
Product Info 
Service 
Client 
Service 
Registry 
Services register 
with registry 
Client polls 
registry 
http://techblog.netflix.com/2013/01/announcing-ribbon-tying-netflix-mid.html 
http://techblog.netflix.com/2012/09/eureka.html
@crichardson 
Lots of moving parts! 
PProrodducutc tIn Ifnofo 
Service 
Recommendation 
Service 
Review 
Service 
Order 
Service 
Browse Products UI 
Checkout UI 
Order management 
UI 
Account 
management UI 
API 
Gate 
way 
Service registry 
Content 
Router 
HTML 
Browser 
REST 
Client 
Ext. 
LB 
Ext. 
LB
@crichardson 
Agenda 
The (sometimes evil) monolith 
Decomposing applications into services 
Client ⇔ service interaction design 
Decentralized data management
@crichardson 
Decomposed services ⇒ 
decomposed databases 
Order management Customer management 
Order 
Database 
Customer 
Database 
Separate databases ⇒ less coupling
@crichardson 
Decomposed databases ⇒ 
polyglot persistence 
IEEE Software Sept/October 2010 - Debasish Ghosh / Twitter @debasishg
Untangling orders and customers 
Customer management 
@crichardson 
Order Service 
placeOrder() 
Order management 
Customer Service 
availableCredit() 
updateCustomer() 
Customer 
creditLimit 
... 
Order belongs to has orders 
total 
Invariant: 
sum(order.total) <= creditLimit 
available credit= creditLimit - 
Trouble! sum(order.total)
@crichardson 
Problems 
Reads 
Service A needs to read data owned by service B 
Updates 
Transaction must update data owned by multiple 
services
Handling reads: requesting 
credit limit 
@crichardson 
placeOrder() 
Order management 
getCreditLimit() 
Customer management
@crichardson 
Pulling data 
Benefits 
Simple to implement 
Ensures data is fresh 
Drawbacks 
Reduces availability 
Increases response time
Customer management 
@crichardson 
Handling reads: replicating the 
credit limit 
Order Service 
placeOrder() 
sum(order.total) <= 
Order management 
Customer 
creditLimit 
... 
Order 
total 
Customer’ 
creditLimit 
creditLimit 
changeCreditLimit() 
Customer Service 
updateCustomer() 
Simplified
Useful idea: Bounded context 
@crichardson 
Different services have a different view of a 
domain object, e.g. 
User Management = complex view of user 
Rest of application: User = PK + ACL + Name 
Different services can have a different domain 
model
@crichardson 
Replicating data 
Benefits 
Improved availability for reads 
Improves latency 
Drawbacks 
Additional complexity of replication mechanism
How to update distributed 
(and replicated) data? 
@crichardson
Use distributed transactions 
@crichardson 
Benefits 
Simple development 
Guarantees consistency 
Drawbacks 
Operationally complex 
Reduced availability
@crichardson 
Use event-driven 
architecture 
How 
Services publish events when data changes 
Subscribing services update their data 
Benefits: 
Simpler 
Better availability 
Drawbacks: 
Application has to handle eventually consistent data 
Application has to handle duplicate events
How do services publish 
@crichardson 
events?
@crichardson 
To maintain consistency the 
application must 
atomically publish an event 
whenever 
a domain object changes
@crichardson 
How to generate events? 
Database triggers 
Hibernate event listener 
Ad hoc event publishing code mixed into business logic 
Domain events - “formal” modeling of events 
Event Sourcing
Atomically publishing events 
Use distributed transactions to update database and publish 
to message 
Database and message broker must support 2PC 
2PC is best avoided 
Use two step eventual consistency mechanism: 
1. Update database: new entity state & intent to publish event 
2. Publish event & mark event as published 
• Difficult to implement when using a NoSQL database :-( 
@crichardson
@crichardson 
Event sourcing 
An event-centric approach to designing domain models 
Request becomes a command that is sent to an Aggregate 
Aggregates handle commands by generating events 
Apply events to an aggregate to update state 
Persist events NOT state 
Replay events to recreate the current state of an aggregate 
Event Store ≃ database + message broker
Request handling in an event-sourced application 
@crichardson 
HTTP 
Handler 
Event 
Store 
pastEvents = findEvents(entityId) 
Account 
new() 
applyEvents(pastEvents) 
newEvents = processCmd(SomeCmd) 
saveEvents(newEvents) 
Microservice A
@crichardson 
Event Store publishes events - 
consumed by other services 
Event 
Store 
Microservice B 
Event 
Subscriber 
subscribe(EventTypes) 
publish(event) 
publish(event) 
Aggregate 
NoSQL 
materialized 
view 
update() 
update()
UpdateCreditLimitCommand 
@crichardson 
Using event sourcing 
Customer Service 
updateCustomer() 
CustomerCreditLimitUpdatedEvent 
Event Store 
Order management 
Order 
total 
Customer’ 
creditLimit 
CustomerCreditLimitUpdatedEvent(...) 
Customer management 
Customer 
creditLimit 
...
@crichardson 
Customer aggregate 
case class Customer(customerId: String, creditLimit: BigDecimal) 
extends ValidatingAggregate[Customer, CustomerCommands.CustomerCommand] { 
def this() = this(null, null) 
override def processCommand = { 
case CreateCustomerCommand(customerId, creditLimit) => 
Seq(CustomerCreatedEvent(customerId, creditLimit)) 
case UpdateCreditLimitCommand(newLimit) if newLimit >= 0 => 
Seq(CustomerCreditLimitUpdatedEvent(newLimit)) 
} 
override def applyEvent = { 
case CustomerCreatedEvent(customerId, creditLimit) => 
copy(customerId=customerId, creditLimit=creditLimit) 
case CustomerCreditLimitUpdatedEvent(newLimit) => 
copy(creditLimit=newLimit) 
} 
} 
Command 
⇒ 
Events 
Event 
⇒ 
Updated 
state
@crichardson 
EventStore API 
trait EventStore { 
def save[T](entityId: Id, events: Seq[Event]): T 
def update[T](entityId: Id, 
version: EntityVersion, events: Seq[Event]): T 
def load[T](entityType: Class[T], entityId: EntityId): T 
def subscribe(...) : ... 
.. 
}
Unfamiliar but it solves many 
problems 
@crichardson 
Eliminates O/R mapping problem 
Supports both SQL and NoSQL databases 
Publishes events reliably 
Reliable eventual consistency framework 
...
But let’s imagine that you 
want to display an account 
and it’s recent transactions... 
@crichardson
Displaying balance + recent 
transactions 
We need to do a “join: between the Account and the corresponding 
TransferTransactions 
(Assuming Debit/Credit events don’t include other account, ...) 
@crichardson 
BUT 
Event Store = primary key lookup of individual aggregates, ... 
⇒ 
Use Command Query Responsibility Separation 
Define separate “materialized” query-side views that implement 
those queries
HTTP GET 
Request 
View Query 
Service 
@crichardson 
Query-side microservices 
Updater - microservice 
View Updater 
Service 
Events 
Event Store 
Reader - microservice 
View 
Store 
e.g. 
MongoDB 
Neo4J 
CloudSearch 
update query
@crichardson 
Agenda 
The (sometimes evil) monolith 
Decomposing applications into services 
Client ⇔ service interaction design 
Decentralized data management 
Bonus feature: microservices in action
API gateway implemented 
@crichardson 
using NodeJS
Spring Boot provides opinionated Spring application 
architecture 
Simplifies applications using Convention over 
Configuration 
Packages application as standalone, executable jar 
Provides production-ready features externalized 
configuration and health checks 
@crichardson 
Microservices built with 
Spring Boot 
For more on Spring Boot + Microservices see 
http://bit.ly/bootmicro1
@crichardson 
Event-driven architecture 
Business logic implemented using event sourcing-based 
domain model 
Views implemented using 
DynamoDB 
Cloud Search (text search)
@crichardson 
Jenkins-based deployment 
pipeline 
Build & Test 
micro-service 
Build & Test 
Docker 
image 
Deploy 
Docker 
image 
to 
Repository 
One pipeline per micro-service
@crichardson 
Deployed on Amazon EC2
@crichardson 
Summary
Monolithic applications are 
simple to develop and deploy 
@crichardson 
BUT have significant 
drawbacks
@crichardson 
Apply the scale cube 
Modular, polyglot, and 
scalable applications 
Services developed, 
deployed and scaled 
independently
Use a modular, polyglot architecture 
View Controller Product Info 
@crichardson 
Model 
service 
Recommendation 
Service 
Review 
service 
REST 
REST 
AMQP 
API 
Gateway 
Server-side web 
application 
View Controller 
Model 
Browser/Native 
application
@crichardson 
Start refactoring your 
monolith 
Monolith Anti-corruption Service 
layer 
Glue code 
Pristine
@crichardson chris@chrisrichardson.net 
@crichardson 
Questions? 
http://plainoldobjects.com http://microservices.io

More Related Content

What's hot

Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architectureThe Software House
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices Amazon Web Services
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices Bozhidar Bozhanov
 
Event driven microservices
Event driven microservicesEvent driven microservices
Event driven microservicesAnthony Martin
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - ObservabilityAraf Karsh Hamid
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in PracticeKasun Indrasiri
 
Microservices
MicroservicesMicroservices
MicroservicesSmartBear
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure FunctionsCallon Campbell
 
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar Timothy McAliley
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactAraf Karsh Hamid
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesSlideTeam
 
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Edureka!
 
Event-driven microservices
Event-driven microservicesEvent-driven microservices
Event-driven microservicesAndrew Schofield
 

What's hot (20)

Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Event driven microservices
Event driven microservicesEvent driven microservices
Event driven microservices
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
 
Microservices
MicroservicesMicroservices
Microservices
 
Amazon Virtual Private Cloud
Amazon Virtual Private CloudAmazon Virtual Private Cloud
Amazon Virtual Private Cloud
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
 
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito Pact
 
Why Microservices
Why MicroservicesWhy Microservices
Why Microservices
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
 
Event-driven microservices
Event-driven microservicesEvent-driven microservices
Event-driven microservices
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 

Similar to Developing applications with a microservice architecture (SVforum, microservices meetup)

#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architectureChris Richardson
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonJAXLondon2014
 
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...Chris Richardson
 
Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)Chris Richardson
 
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesJFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesChris Richardson
 
SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability Chris Richardson
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Chris Richardson
 
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...Chris Richardson
 
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...Chris Richardson
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Chris Richardson
 
There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)Chris Richardson
 
Microservices and Redis #redisconf Keynote
Microservices and Redis #redisconf KeynoteMicroservices and Redis #redisconf Keynote
Microservices and Redis #redisconf KeynoteChris Richardson
 
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Docker, Inc.
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .NetRichard Banks
 
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Chris Richardson
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Chris Richardson
 
Saturn2017: No such thing as a microservice!
Saturn2017: No such thing as a microservice! Saturn2017: No such thing as a microservice!
Saturn2017: No such thing as a microservice! Chris Richardson
 
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Chris Richardson
 
Azure Overview Csco
Azure Overview CscoAzure Overview Csco
Azure Overview Cscorajramab
 
A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)Chris Richardson
 

Similar to Developing applications with a microservice architecture (SVforum, microservices meetup) (20)

#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
 
Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)
 
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesJFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
 
SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...
 
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
Decompose That WAR! Architecting for Adaptability, Scalability, and Deployabi...
 
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!
 
There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)
 
Microservices and Redis #redisconf Keynote
Microservices and Redis #redisconf KeynoteMicroservices and Redis #redisconf Keynote
Microservices and Redis #redisconf Keynote
 
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .Net
 
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)
 
Saturn2017: No such thing as a microservice!
Saturn2017: No such thing as a microservice! Saturn2017: No such thing as a microservice!
Saturn2017: No such thing as a microservice!
 
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
 
Azure Overview Csco
Azure Overview CscoAzure Overview Csco
Azure Overview Csco
 
A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)
 

More from Chris Richardson

The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?Chris Richardson
 
More the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternChris Richardson
 
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...Chris Richardson
 
Dark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsDark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsChris Richardson
 
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfChris Richardson
 
Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions Chris Richardson
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...Chris Richardson
 
Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Chris Richardson
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 Chris Richardson
 
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureChris Richardson
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Chris Richardson
 
Designing loosely coupled services
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled servicesChris Richardson
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Chris Richardson
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...Chris Richardson
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Chris Richardson
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...Chris Richardson
 
Overview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationOverview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationChris Richardson
 
An overview of the Eventuate Platform
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate PlatformChris Richardson
 
#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolithChris Richardson
 
Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)Chris Richardson
 

More from Chris Richardson (20)

The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?
 
More the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-pattern
 
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
 
Dark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsDark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patterns
 
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
 
Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
 
Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021
 
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
 
Designing loosely coupled services
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled services
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
 
Overview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationOverview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders application
 
An overview of the Eventuate Platform
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate Platform
 
#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith
 
Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)
 

Recently uploaded

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 

Recently uploaded (20)

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 

Developing applications with a microservice architecture (SVforum, microservices meetup)

  • 1. Microservices: Decomposing @crichardson Applications for Deployability and Scalability Chris Richardson Author of POJOs in Action Founder of the original CloudFoundry.com @crichardson chris@chrisrichardson.net http://plainoldobjects.com
  • 2. Presentation goal How decomposing applications into @crichardson microservices improves deployability and scalability and simplifies the adoption of new technologies
  • 4. @crichardson About Chris Founder of a buzzword compliant (stealthy, social, mobile, big data, machine learning, ...) startup Consultant helping organizations improve how they architect and deploy applications using cloud computing, micro services, polyglot applications, NoSQL, ...
  • 5. @crichardson Agenda The (sometimes evil) monolith Decomposing applications into services Client ⇔ service interaction design Decentralized data management
  • 6. @crichardson Let’s imagine you are building an online store
  • 7. @crichardson Traditional application architecture StoreFrontUI Product Info Service Recommendation Service Tomcat Browser/ Client WAR/EAR MySQL Database Review Service Simple to develop test deploy Load balancer scale Spring MVC Spring Hibernate Order Service HTML REST/JSON
  • 8. But large, complex, monolithic @crichardson applications ⇒ problems
  • 10. @crichardson Obstacle to frequent deployments Need to redeploy everything to change one component Interrupts long running background (e.g. Quartz) jobs Increases risk of failure Fear of change Updates will happen less often - really long QA cycles e.g. Makes A/B testing UI really difficult Eggs in one basket
  • 11. @crichardson Overloads your IDE and container Slows down development
  • 12. @crichardson Obstacle to scaling development I want to update the UI But the backend is not working yet! Lots of coordination and communication required
  • 13. Requires long-term commitment to a technology stack @crichardson
  • 14. @crichardson Agenda The (sometimes evil) monolith Decomposing applications into services Client ⇔ service interaction design Decentralized data management
  • 16. @crichardson The scale cube X axis - horizontal duplication Z axis - data partitioning Y axis - functional decomposition similar splitting by things Scale Scale by splitting different things
  • 17. @crichardson Y-axis scaling - application level WAR Storefront UI Product Info Service Recommendation Service Review Service Order Service
  • 18. @crichardson Y-axis scaling - application level Storefront UI Product Info Service Recommendation Service Review Service Order Service
  • 19. @crichardson Y-axis scaling - application level Product Info Service Product Info Recommendation Service Review Service Order Service Browse Products UI Checkout UI Order management UI Account management UI Apply X-axis and Z-axis scaling to each service independently
  • 20. Service deployment options @crichardson Isolation, manageability VM or Physical Machine Docker/Linux container JVM JAR/WAR/OSGI bundle/... Density/efficiency
  • 21. @crichardson Partitioning strategies... Partition by noun, e.g. product info service Partition by verb, e.g. Checkout UI Single Responsibility Principle Unix utilities - do one focussed thing well
  • 22. @crichardson Partitioning strategies Too few Drawbacks of the monolithic architecture Too many - a.k.a. Nano-service anti-pattern Runtime overhead Potential risk of excessive network hops Potentially difficult to understand system Something of an art
  • 24. @crichardson More service, less micro But more realistically... Focus on building services that make development and deployment easier - not just tiny services
  • 25. @crichardson Real world examples http://techblog.netflix.com/ ~600 services http://highscalability.com/amazon-architecture 100-150 services to build a page http://www.addsimplicity.com/downloads/ eBaySDForum2006-11-29.pdf http://queue.acm.org/detail.cfm?id=1394128
  • 26. @crichardson There are many benefits
  • 27. @crichardson Smaller, simpler apps Easier to understand and develop Less jar/classpath hell - who needs OSGI? Faster to build and deploy Reduced startup time - important for GAE
  • 28. Scales development: develop, deploy and scale each service independently @crichardson
  • 30. Eliminates long-term commitment to a single technology stack @crichardson Modular, polyglot, multi-framework applications
  • 31. @crichardson Two levels of architecture System-level Services Inter-service glue: interfaces and communication mechanisms Slow changing Service-level Internal architecture of each service Each service could use a different technology stack Pick the best tool for the job Rapidly evolving
  • 32. Easily try other technologies @crichardson ... and fail safely
  • 33. But there are drawbacks @crichardson
  • 35. Complexity of developing a @crichardson distributed system http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 36. @crichardson Multiple databases & Transaction management e.g. Fun with eventual consistency
  • 37. @crichardson Complexity of testing a distributed system http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 38. Complexity of deploying and operating a distributed @crichardson system http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html You need a lot of automation
  • 39. @crichardson Developing and deploying features that span multiple services requires careful coordination
  • 40. @crichardson When to use it? In the beginning: •You don’t need it •It will slow you down Later on: •You need it •Refactoring is painful
  • 41. @crichardson Agenda The (sometimes evil) monolith Decomposing applications into services Client ⇔ service interaction design Decentralized data management
  • 42. Let’s imagine that you want to display a product’s details... Product Info Reviews Recommendations @crichardson
  • 43. Directly connecting the front-end to the backend @crichardson View Controller Model Product Info service Recommendation Service Review service REST REST AMQP Traditional server-side web application View Controller Model Browser/Native App Chatty API Web unfriendly protocols
  • 44. @crichardson Use an API gateway View Controller Model Product Info service Recommendation Service Review service REST REST AMQP API Gateway View Controller Model Browser/Native App Single entry point Client specific APIs Protocol translation Traditional server-side web application
  • 45. @crichardson Optimized client-specific APIs Web application Mobile App NodeJS API Gateway REST proxy Event publishing Product Info service Recommendation Service Review service REST REST AMQP getProductInfo() getRecomm...() getReviews() getProductDetails()
  • 46. @crichardson Netflix API Gateway http://techblog.netflix.com/2013/01/optimizing-netflix-api.html Device specific end points
  • 47. @crichardson API gateway design challenges Performance and scalability Non-blocking I/O Asynchronous, concurrent code Handling partial failures .... http://techblog.netflix.com/2012/02/fault-tolerance-in-high-volume.html
  • 48. @crichardson Useful frameworks for building an API gateway JVM: Netty, Vertex Netflix Hystrix ... Other: NodeJS
  • 49. How does a browser interact with the partitioned @crichardson web application?
  • 50. @crichardson Partitioned web app ⇒ no longer a single base URL /products Browse Products UI /checkout Checkout UI /orders Order management UI /account Account management UI Browser ?
  • 51. The solution: single entry point that routes based on URL @crichardson /products Browse Products UI /checkout Checkout UI /orders Order management UI /account Account management UI http://acme.com/<service>/... Content Browser Router Hidden from browser Single entry point
  • 52. @crichardson How do the services communicate?
  • 53. Inter-service communication options @crichardson Synchronous HTTP ⇔ asynchronous AMQP Formats: JSON, XML, Protocol Buffers, Thrift, ... Asynchronous is preferred JSON is fashionable but binary format is more efficient
  • 54. Pros and cons of messaging Pros Cons Decouples client from Additional complexity of server message broker Message broker buffers Request/reply-style messages communication is more Supports a variety of complex communication patterns
  • 55. Pros and cons of HTTP Pros Simple and familiar Request/reply is easy Firewall friendly No intermediate broker Cons Only supports request/ reply Server must be available Client needs to discover URL(s) of server(s)
  • 56. @crichardson Discovery option #1: Internal load balancer Load Balancer Product Info Service Product Info Service Product Info Service Product Info Service Client/ API gateway Services register with load balancer Client talks to load balancer Has a well-known location http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/USVPC_creating_basic_lb.html
  • 57. @crichardson Discovery option #2: client-side load balancing REST Client Product Info Service Product Info Service Product Info Service Product Info Service Client Service Registry Services register with registry Client polls registry http://techblog.netflix.com/2013/01/announcing-ribbon-tying-netflix-mid.html http://techblog.netflix.com/2012/09/eureka.html
  • 58. @crichardson Lots of moving parts! PProrodducutc tIn Ifnofo Service Recommendation Service Review Service Order Service Browse Products UI Checkout UI Order management UI Account management UI API Gate way Service registry Content Router HTML Browser REST Client Ext. LB Ext. LB
  • 59. @crichardson Agenda The (sometimes evil) monolith Decomposing applications into services Client ⇔ service interaction design Decentralized data management
  • 60. @crichardson Decomposed services ⇒ decomposed databases Order management Customer management Order Database Customer Database Separate databases ⇒ less coupling
  • 61. @crichardson Decomposed databases ⇒ polyglot persistence IEEE Software Sept/October 2010 - Debasish Ghosh / Twitter @debasishg
  • 62. Untangling orders and customers Customer management @crichardson Order Service placeOrder() Order management Customer Service availableCredit() updateCustomer() Customer creditLimit ... Order belongs to has orders total Invariant: sum(order.total) <= creditLimit available credit= creditLimit - Trouble! sum(order.total)
  • 63. @crichardson Problems Reads Service A needs to read data owned by service B Updates Transaction must update data owned by multiple services
  • 64. Handling reads: requesting credit limit @crichardson placeOrder() Order management getCreditLimit() Customer management
  • 65. @crichardson Pulling data Benefits Simple to implement Ensures data is fresh Drawbacks Reduces availability Increases response time
  • 66. Customer management @crichardson Handling reads: replicating the credit limit Order Service placeOrder() sum(order.total) <= Order management Customer creditLimit ... Order total Customer’ creditLimit creditLimit changeCreditLimit() Customer Service updateCustomer() Simplified
  • 67. Useful idea: Bounded context @crichardson Different services have a different view of a domain object, e.g. User Management = complex view of user Rest of application: User = PK + ACL + Name Different services can have a different domain model
  • 68. @crichardson Replicating data Benefits Improved availability for reads Improves latency Drawbacks Additional complexity of replication mechanism
  • 69. How to update distributed (and replicated) data? @crichardson
  • 70. Use distributed transactions @crichardson Benefits Simple development Guarantees consistency Drawbacks Operationally complex Reduced availability
  • 71. @crichardson Use event-driven architecture How Services publish events when data changes Subscribing services update their data Benefits: Simpler Better availability Drawbacks: Application has to handle eventually consistent data Application has to handle duplicate events
  • 72. How do services publish @crichardson events?
  • 73. @crichardson To maintain consistency the application must atomically publish an event whenever a domain object changes
  • 74. @crichardson How to generate events? Database triggers Hibernate event listener Ad hoc event publishing code mixed into business logic Domain events - “formal” modeling of events Event Sourcing
  • 75. Atomically publishing events Use distributed transactions to update database and publish to message Database and message broker must support 2PC 2PC is best avoided Use two step eventual consistency mechanism: 1. Update database: new entity state & intent to publish event 2. Publish event & mark event as published • Difficult to implement when using a NoSQL database :-( @crichardson
  • 76. @crichardson Event sourcing An event-centric approach to designing domain models Request becomes a command that is sent to an Aggregate Aggregates handle commands by generating events Apply events to an aggregate to update state Persist events NOT state Replay events to recreate the current state of an aggregate Event Store ≃ database + message broker
  • 77. Request handling in an event-sourced application @crichardson HTTP Handler Event Store pastEvents = findEvents(entityId) Account new() applyEvents(pastEvents) newEvents = processCmd(SomeCmd) saveEvents(newEvents) Microservice A
  • 78. @crichardson Event Store publishes events - consumed by other services Event Store Microservice B Event Subscriber subscribe(EventTypes) publish(event) publish(event) Aggregate NoSQL materialized view update() update()
  • 79. UpdateCreditLimitCommand @crichardson Using event sourcing Customer Service updateCustomer() CustomerCreditLimitUpdatedEvent Event Store Order management Order total Customer’ creditLimit CustomerCreditLimitUpdatedEvent(...) Customer management Customer creditLimit ...
  • 80. @crichardson Customer aggregate case class Customer(customerId: String, creditLimit: BigDecimal) extends ValidatingAggregate[Customer, CustomerCommands.CustomerCommand] { def this() = this(null, null) override def processCommand = { case CreateCustomerCommand(customerId, creditLimit) => Seq(CustomerCreatedEvent(customerId, creditLimit)) case UpdateCreditLimitCommand(newLimit) if newLimit >= 0 => Seq(CustomerCreditLimitUpdatedEvent(newLimit)) } override def applyEvent = { case CustomerCreatedEvent(customerId, creditLimit) => copy(customerId=customerId, creditLimit=creditLimit) case CustomerCreditLimitUpdatedEvent(newLimit) => copy(creditLimit=newLimit) } } Command ⇒ Events Event ⇒ Updated state
  • 81. @crichardson EventStore API trait EventStore { def save[T](entityId: Id, events: Seq[Event]): T def update[T](entityId: Id, version: EntityVersion, events: Seq[Event]): T def load[T](entityType: Class[T], entityId: EntityId): T def subscribe(...) : ... .. }
  • 82. Unfamiliar but it solves many problems @crichardson Eliminates O/R mapping problem Supports both SQL and NoSQL databases Publishes events reliably Reliable eventual consistency framework ...
  • 83. But let’s imagine that you want to display an account and it’s recent transactions... @crichardson
  • 84. Displaying balance + recent transactions We need to do a “join: between the Account and the corresponding TransferTransactions (Assuming Debit/Credit events don’t include other account, ...) @crichardson BUT Event Store = primary key lookup of individual aggregates, ... ⇒ Use Command Query Responsibility Separation Define separate “materialized” query-side views that implement those queries
  • 85. HTTP GET Request View Query Service @crichardson Query-side microservices Updater - microservice View Updater Service Events Event Store Reader - microservice View Store e.g. MongoDB Neo4J CloudSearch update query
  • 86. @crichardson Agenda The (sometimes evil) monolith Decomposing applications into services Client ⇔ service interaction design Decentralized data management Bonus feature: microservices in action
  • 87. API gateway implemented @crichardson using NodeJS
  • 88. Spring Boot provides opinionated Spring application architecture Simplifies applications using Convention over Configuration Packages application as standalone, executable jar Provides production-ready features externalized configuration and health checks @crichardson Microservices built with Spring Boot For more on Spring Boot + Microservices see http://bit.ly/bootmicro1
  • 89. @crichardson Event-driven architecture Business logic implemented using event sourcing-based domain model Views implemented using DynamoDB Cloud Search (text search)
  • 90. @crichardson Jenkins-based deployment pipeline Build & Test micro-service Build & Test Docker image Deploy Docker image to Repository One pipeline per micro-service
  • 93. Monolithic applications are simple to develop and deploy @crichardson BUT have significant drawbacks
  • 94. @crichardson Apply the scale cube Modular, polyglot, and scalable applications Services developed, deployed and scaled independently
  • 95. Use a modular, polyglot architecture View Controller Product Info @crichardson Model service Recommendation Service Review service REST REST AMQP API Gateway Server-side web application View Controller Model Browser/Native application
  • 96. @crichardson Start refactoring your monolith Monolith Anti-corruption Service layer Glue code Pristine
  • 97. @crichardson chris@chrisrichardson.net @crichardson Questions? http://plainoldobjects.com http://microservices.io