SlideShare a Scribd company logo
Drabina Ekspertów
Ścisły przewodnik po aspektach miękkich – część II
Enterprise makeover
Making sense of agile requirements
Przejrzysty i testowalny kod na Androidzie?
REST w praktyce - tej dobrej i tej złej
Skalowanie i integracja systemów w asynchronicznym stylu
Do you think you're doing microservice architecture?
CQRS dla każdego
Kiedy, jak i po co migrować na NoSQL
www.bottega.com.pl facebook.com/BottegaITSolutions
About us
ŁUKASZ SZCZĘSNY
Systems engineer at
Co-organizer of the Warsaw Linux User Group
Fan of automation and DevOps
Twitter: @wybczu
Blog: http://wybcz.pl
Homepage: http://wybcz.pl
About us
MARCIN GRZEJSZCZAK
Software Architect at
Author of "Mockito Instant", "Mockito Cookbook" books
Co-author of the Groovy core’s @Builder AST
Co-founder of the Warsaw Groovy User Group
Co-author of "micro-infra-spring" lib
Twitter: @MGrzejszczak
Blog: http://toomuchcoding.blogspot.com
Homepage: http://marcin.grzejszczak.pl
Agenda
short intro to microservices
how to deploy your first microservice
microservice pitfalls
Agenda
short intro to microservices
how to deploy your first microservice
microservice pitfalls
Conway’s Law
Conway, Melvin E. (April 1968), How do Committees Invent?,
Datamation 14 (5): 28–31, retrieved 2009-04-05
Organizations which design systems ... are constrained
to produce designs which are copies of the
communication structures of these organizations
— M. Conway
A single codebase
Conway’s Law in practice
A single codebase
Conway’s Law in practice
Conway’s Law in practice
Concept:
one team
two countries
one codebase
Conway’s Law in practice
Reality:
two teams
two countries
one codebase
Conway’s Law in practice
Effect:
two different solutions
solving same stuff
one codebase
Conway’s Law - siloed teams
extract from http://martinfowler.com/articles/microservices.html
Conway’s Law - cross functional teams
extract from http://martinfowler.com/articles/microservices.html
Business flow
AccountingBack officeFront office
Common problematic code flow
Dto Service
Impl Entity
Accounting Accounting
Accounting Accounting
Front office Front office
Front office Front office
Back office Back office
Back office Back office
monolith
many programmers
big organization
Common problematic code flow
Looks familiar?
http://www.foodnetwork.com/topics/spaghetti-recipes.html
Code flow
REST REST
Autonomous
Business
oriented
PolyglotLightweight
Front office
bounded context
JARS
Back office
bounded context
JARS
Accounting
bounded context
JARS
Microservices vs ESB
http://www.banzaj.pl/pictures/sport/boks/Haye_Walujew/haye_vs.walujew_2.jpg
Microservices vs ESB
Enterprise Service Bus
intelligent communication layer between services
provides routing, transformations etc
Microservices vs ESB
Microservices approach favors
smart endpoints (services)
dumb pipes (means of communication)
Microservices vs SOA
SOA - Service Oriented Architecture - a very broad topic
Typically understood as
XML and SOAP based with WSDL
ESB based solution
Microservice may be called “more thoroughly described
SOA”
Agenda
short intro to microservices
how to deploy your first microservice
microservice pitfalls
Write code
As a developer
I want my microservice codebase to be small
I want to be fully responsible for supporting that
service
I don’t want people from outside my team to push
changes to my codebase
Write code
introduce code review / working via Pull Requests
dev team responsible for CD pipeline
dev team receives all alerts
Build it
As a developer
I’d like all services to be built alike
it’s easier to comprehend and support
I’d like to have fast feedback if my code works
Build it
Build it
Jenkins as a Code
Jenkins master and slaves deployment
Jenkins’ jobs creation
one CD pipeline template to rule them all
Build it
def project = 'quidryan/aws-sdk-test'
def branchApi = new URL("https://api.github.com/repos/${project}/branches")
def branches = new groovy.json.JsonSlurper().parse(branchApi.newReader())
branches.each {
def branchName = it.name
job {
name "${project}-${branchName}".replaceAll('/','-')
scm {
git("git://github.com/${project}.git", branchName)
}
steps {
maven("test -Dproject.name=${project}/${branchName}")
}
}
}
Test it
As a developer
I don’t want to hardcode service’s IPs and ports
I don’t want to set up whole environment for tests
I’d like to test my application in isolation
I’d like to ensure that others can talk to my service
Service Discovery
Find your collaborator’s address and port with
Zookeeper
Consul
Eureka
Etcd
...
Consumer Driven Contracts
HTTP REQUEST
HTTP RESPONSE
HTTP REQUEST
HTTP RESPONSE
version 1 version 2
Consumer Driven Contracts
REQ
RESP
REQ
RESP
REQ
RESP
REQ
RESP
REQ
RESP
REQ
RESP
REQ
RESP
REQ
RESP
v1 v2 v8
v4 v2 v3
Consumer Driven Contracts
Consumer Driven Contracts
Consumer Driven Contracts
REQ
RESP
REQ
RESP
REQ
RESP
v1 v8
v2 v3
STUB
STUB
Consumer Driven Contracts
REQ
RESP
REQ
RESP
REQ
RESP
v1
STUB
STUB
Consumer Driven Contracts
Consumer Driven Contracts:
test your stub against server
your consumers call your stubs
Deploy it
As a developer
I’d like my feature to be on production ASAP
I’d like to have application properties
in one place
auditable
secure
Deploy it
Deploy it
Environment provisioning
Puppet
Chef
Salt
Ansible
...
Deploy it
Application deployment
Rundeck
Capistrano
Fabric
Ansible
Freight
...
Deploy it
Application configuration
Version it!
Encrypt it!
Spring Cloud Config Server
micro-infra-spring-config
Monitor it
As a developer
I don’t want to grep my logs from different servers
I’d like to have application data in one place
logs
metrics
health status
Monitor it
Logs
Unify logging patterns!
Collect logs in one place
syslog,
ELK stack, graylog2,
Splunk, Loggly
...
CorrelationID
FIRST
SERVICE
REQUEST
No
correlationId
CorrelationId
set to X
CorrelationId
set to X
RESPONSE
SECOND
SERVICE
REQUEST
CorrelationId
set to X
CorrelationId
set to X
RESPONSE
ANOTHER
SERVICE
REQUEST
CorrelationId
set to XCorrelationId
set to X
RESPONSE
CorrelationId
set to X
YET
ANOTHER
SERVICE
REQUEST
CorrelationId
set to XCorrelationId
set to X
RESPONSE
CorrelationID
Monitor it
Metrics
graphite + grafana / tessera
collectd / munin
statsd
Monitor it
Alters
nagios / zabbix
cabot
logstash!
Agenda
short intro to microservices
how to deploy your first microservice
microservice pitfalls
Code reuse
do not abstract everything
sometimes copy paste gives you code decoupling
no - copy paste is not a solution to all problems ;)
do not write nanoservices - who will support it?
Too many technology stacks
pick a right tool for the job but don’t exaggerate
why would you ever want to code in Brainfuck or
Whitespace?
someone will support it afterwards - want to do it? ;)
Management issues
have to invest time and effort to build foundations
have to invest in infrastructure and devops
feature delivery pace will decrease for some time
Questions?
Links
Microservice Hackathon
Accurest - Consumer Driven Contracts implementation

More Related Content

PDF
Consumer Driven Contracts and Your Microservice Architecture
PDF
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
PDF
Consumer Driven Contracts and Your Microservice Architecture
PDF
Reactive frontends with RxJS and Angular
PPTX
What's New in Spring for Apache Kafka 2.0
PPTX
What's new in Spring Boot 2.0
PDF
Running Java Applications on Cloud Foundry
PPTX
Debugging Serverless for Cloud
Consumer Driven Contracts and Your Microservice Architecture
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
Consumer Driven Contracts and Your Microservice Architecture
Reactive frontends with RxJS and Angular
What's New in Spring for Apache Kafka 2.0
What's new in Spring Boot 2.0
Running Java Applications on Cloud Foundry
Debugging Serverless for Cloud

What's hot (20)

PDF
How to Implement Micro Frontend Architecture using Angular Framework
PDF
Secrets of Successful Digital Transformers
PDF
riffing on Knative - Scott Andrews
PDF
Spring Cloud Gateway
PDF
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
PPTX
Spring Integration 5.0: What's new?
PDF
JHipster for Spring Boot webinar
PDF
What Is Spring?
PDF
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
PDF
Microsoft Silverlight 2
PPTX
Crossing the CI/CD/DevOps Chasm
PPTX
Build APIs in Node.js and Swagger 2.0 with Apigee-127
PPTX
Bulletproof Microservices with Spring and Kubernetes
PPTX
Swagger 2.0 and Model-driven APIs
PDF
Moderne App-Architektur mit Dagger2 und RxJava
PPTX
DevOps Turkey Test Automation with Docker and Seleniumhub
PPTX
React vs Angular
PPTX
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
PDF
Curious Coders Java Web Frameworks Comparison
PDF
Advanced Spring Boot with Consul
How to Implement Micro Frontend Architecture using Angular Framework
Secrets of Successful Digital Transformers
riffing on Knative - Scott Andrews
Spring Cloud Gateway
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Spring Integration 5.0: What's new?
JHipster for Spring Boot webinar
What Is Spring?
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Microsoft Silverlight 2
Crossing the CI/CD/DevOps Chasm
Build APIs in Node.js and Swagger 2.0 with Apigee-127
Bulletproof Microservices with Spring and Kubernetes
Swagger 2.0 and Model-driven APIs
Moderne App-Architektur mit Dagger2 und RxJava
DevOps Turkey Test Automation with Docker and Seleniumhub
React vs Angular
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Curious Coders Java Web Frameworks Comparison
Advanced Spring Boot with Consul
Ad

Viewers also liked (9)

PDF
JDD 2016 - Tomasz Gagor, Pawel Torbus - A Needle In A Logstack
PDF
JDD 2016 - Michal Matloka - Small Intro To Big Data
PDF
PLNOG 18 - Michał Sajdak - IoT hacking w praktyce
PDF
4Developers: Mateusz Stasch- Domain Events - czyli jak radzić sobie z rzeczyw...
PPTX
JDD 2016 - Wojciech Oczkowski - Testowanie Wydajnosci Za Pomoca Narzedzia JMH
PDF
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
PDF
PLNOG 18 - Alan Kuczewski - "Mały może więcej" - Rozwiązanie wysokiej dostępn...
PDF
PLNOG 18 - Marcin Kuczera- ONT idealny
PPSX
4Developers: Aplikacja od SaaSa do IdaaSa
JDD 2016 - Tomasz Gagor, Pawel Torbus - A Needle In A Logstack
JDD 2016 - Michal Matloka - Small Intro To Big Data
PLNOG 18 - Michał Sajdak - IoT hacking w praktyce
4Developers: Mateusz Stasch- Domain Events - czyli jak radzić sobie z rzeczyw...
JDD 2016 - Wojciech Oczkowski - Testowanie Wydajnosci Za Pomoca Narzedzia JMH
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
PLNOG 18 - Alan Kuczewski - "Mały może więcej" - Rozwiązanie wysokiej dostępn...
PLNOG 18 - Marcin Kuczera- ONT idealny
4Developers: Aplikacja od SaaSa do IdaaSa
Ad

Similar to Do you think you're doing microservice architecture? What about infrastructure and provisioning? 4developers, Warsaw (20)

PDF
Atmosphere Conference 2015: Do you think you're doing microservices?
PDF
Microservices for java architects it-symposium-2015-09-15
PDF
Writing microservices in java java one-2015-10-28
PDF
Writing microservices in Java -- Chicago-2015-11-10
PDF
Microservices for java architects coders-conf-2015-05-15
PDF
Microservices Architecture
PDF
Building Microservices Software practics
PDF
Microservices Journey NYC
PDF
Microservices - Hitchhiker's guide to cloud native applications
PPTX
Service Mesh CTO Forum (Draft 3)
PPTX
A Microservice Journey
PDF
Service Mesh Talk for CTO Forum
PDF
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
PDF
Microservices
PDF
Microservices for Architects - Atlanta 2018-03-28
PDF
Everything you want to know about microservices
PDF
Microservices for Java Architects (Indianapolis, April 15, 2015)
PDF
Microservices for java architects schamburg-2015-05-19
PDF
20141210 - Microservice Container
PDF
Micro services
Atmosphere Conference 2015: Do you think you're doing microservices?
Microservices for java architects it-symposium-2015-09-15
Writing microservices in java java one-2015-10-28
Writing microservices in Java -- Chicago-2015-11-10
Microservices for java architects coders-conf-2015-05-15
Microservices Architecture
Building Microservices Software practics
Microservices Journey NYC
Microservices - Hitchhiker's guide to cloud native applications
Service Mesh CTO Forum (Draft 3)
A Microservice Journey
Service Mesh Talk for CTO Forum
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices
Microservices for Architects - Atlanta 2018-03-28
Everything you want to know about microservices
Microservices for Java Architects (Indianapolis, April 15, 2015)
Microservices for java architects schamburg-2015-05-19
20141210 - Microservice Container
Micro services

More from Marcin Grzejszczak (17)

PDF
Continuous Deployment of your Application @jSession#5
PDF
Continuous Deployment of your Application @JUGtoberfest
PDF
Continuous Deployment To The Cloud @DevoxxPL 2017
PDF
Continuous Deployment To The Cloud
PDF
Consumer Driven Contracts To Enable API Evolution @Geecon
PDF
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
PDF
Microservices Tracing With Spring Cloud and Zipkin @Szczecin JUG
PDF
Consumer Driven Contracts and Your Microservice Architecture @ Warsaw JUG
PDF
Consumer Driven Contracts and Your Microservice Architecture
PDF
Spring Cloud Contract And Your Microservice Architecture
PDF
Microservices Tracing with Spring Cloud and Zipkin (devoxx)
PDF
Microservices Tracing With Spring Cloud and Zipkin @CybercomDEV
PDF
Microservices Tracing with Spring Cloud and Zipkin
PDF
Spring Cloud’s Groovy
PDF
Microservices - enough with theory, let's do some code @Geecon Prague 2015
PDF
Stick to the rules - Consumer Driven Contracts. 2015.07 Confitura
PDF
Introduction to Groovy runtime metaprogramming and AST transforms
Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @JUGtoberfest
Continuous Deployment To The Cloud @DevoxxPL 2017
Continuous Deployment To The Cloud
Consumer Driven Contracts To Enable API Evolution @Geecon
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Microservices Tracing With Spring Cloud and Zipkin @Szczecin JUG
Consumer Driven Contracts and Your Microservice Architecture @ Warsaw JUG
Consumer Driven Contracts and Your Microservice Architecture
Spring Cloud Contract And Your Microservice Architecture
Microservices Tracing with Spring Cloud and Zipkin (devoxx)
Microservices Tracing With Spring Cloud and Zipkin @CybercomDEV
Microservices Tracing with Spring Cloud and Zipkin
Spring Cloud’s Groovy
Microservices - enough with theory, let's do some code @Geecon Prague 2015
Stick to the rules - Consumer Driven Contracts. 2015.07 Confitura
Introduction to Groovy runtime metaprogramming and AST transforms

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Electronic commerce courselecture one. Pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Electronic commerce courselecture one. Pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
MIND Revenue Release Quarter 2 2025 Press Release
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx

Do you think you're doing microservice architecture? What about infrastructure and provisioning? 4developers, Warsaw