Download - Microservices. The good the bad and the ugly
![Page 1: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/1.jpg)
@aahoogendoorn
MICROSERVICESTHE GOOD, THE BAD AND THE UGLYSander Hoogendoornditisagile.nlMentoring ▪ Consulting ▪ Training ▪ Agile ▪ Software architecture ▪ Code
![Page 2: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/2.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 2@aahoogendoorn
www.ditisagile.nl
Sander Hoogendoorn
Me Dad Mentor, trainer, software architect, programmer Books, articles, conferences
Work Owner, ditisagile.nl CTO Klaverblad Verzekeringen [PTO Capgemini] [Global design authority agile Capgemini]
Web www.sanderhoogendoorn.com www.smartusecase.com www.speedbird9.com @aahoogendoorn [email protected]
![Page 3: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/3.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 3@aahoogendoorn
www.ditisagile.nl
![Page 4: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/4.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 4@aahoogendoorn
www.ditisagile.nl
On being a developer...
![Page 5: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/5.jpg)
@aahoogendoorn
MONOLITHS Hard to deliver, even harder to test and impossible to maintain
![Page 6: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/6.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 7@aahoogendoorn
www.ditisagile.nl
Monoliths
Advantages A single (layered) architecture
A single technology stack
A single code base maintained by multiple teams
Disadvantages All parts are interconnected
Many other systems are connected to your system
Hard to change, hard to maintain
Long time between releases, thereby increasing risks
Slow innovation
Hard to move to newer technologies
Doesn’t scale very well
Product Account
Order Customer
Products Accounts
Orders Customers
![Page 7: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/7.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 8@aahoogendoorn
www.ditisagile.nl
Dependencies will kill you
![Page 8: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/8.jpg)
@aahoogendoorn
A BRIEF HISTORY OF COMPONENTS AND SERVICES
![Page 9: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/9.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 10@aahoogendoorn
www.ditisagile.nl
Client server
![Page 10: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/10.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 11@aahoogendoorn
www.ditisagile.nl
Component based development
![Page 11: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/11.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 12@aahoogendoorn
www.ditisagile.nl
Service oriented architecture
![Page 12: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/12.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 13@aahoogendoorn
www.ditisagile.nl
Microservices
![Page 13: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/13.jpg)
@aahoogendoorn
MICROSERVICESBeyond the hype?
![Page 14: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/14.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 15@aahoogendoorn
www.ditisagile.nl
Microservices. Beyond the hype?
![Page 15: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/15.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 16@aahoogendoorn
www.ditisagile.nl
Gartner hype cycle
![Page 16: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/16.jpg)
@aahoogendoorn
MICROSERVICESThe clear benefits
![Page 17: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/17.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 18@aahoogendoorn
www.ditisagile.nl
BUT FIRST… A DEFINITION
![Page 18: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/18.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 19@aahoogendoorn
www.ditisagile.nl
In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages
and use different data storage technologies.Martin Fowler
![Page 19: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/19.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 20@aahoogendoorn
www.ditisagile.nl
In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages
and use different data storage technologies.Martin Fowler
![Page 20: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/20.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 21@aahoogendoorn
www.ditisagile.nl
Monoliths. Scalability
Product Account
Order Customer
Product Account
Order Customer
Product Account
Order Customer
![Page 21: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/21.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 22@aahoogendoorn
www.ditisagile.nl
Microservices. Scalability
Product Account
OrderCustomer
![Page 22: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/22.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 23@aahoogendoorn
www.ditisagile.nl
Microservices. Scalability
Product Account
OrderCustomer
Product
CustomerCustomer Customer
Account Account
![Page 23: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/23.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 24@aahoogendoorn
www.ditisagile.nl
Microservices. Scalability
Product Account
Order
Product
Customer
Account Account
CustomerCustomer
![Page 24: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/24.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 25@aahoogendoorn
www.ditisagile.nl
Monoliths. Persistence
Product Account
Order Customer
Products Accounts
Orders Customers
![Page 25: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/25.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 26@aahoogendoorn
www.ditisagile.nl
Microservices. Polyglot persistence
Product Account OrderCustomer
MongoDB
Customers
MongoDB
Orders
Active Directory
Accounts
Oracle
Products
![Page 26: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/26.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 27@aahoogendoorn
www.ditisagile.nl
Microservices. Promises
Products not projects
Scalable
Decentralized governance
Replaceable parts
High performance
Technology independent
Polyglot persistence
Easy to build
Easy to test
Easier deployment than monoliths
ProductAccount
Order
Customer
![Page 27: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/27.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 28@aahoogendoorn
www.ditisagile.nl
Microservices. But…
What is a microservice exactly?
How small is a microservice?
Requirements in a microservice world
Components or services
Who owns a microservice?
What technologies do you use?
What protocols do you apply?
How to define messages
How to test microservices
How to coordinate when business services run across components?
How to build deployment pipelines?
ProductAccount
Order
Customer
![Page 28: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/28.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 29@aahoogendoorn
www.ditisagile.nl
Opinions, opinions, opinions
![Page 29: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/29.jpg)
@aahoogendoorn
ARE MICROSERVICESA STAIRWAY TO HEAVEN?
![Page 30: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/30.jpg)
@aahoogendoorn
OR A HIGHWAY TO HELL?
![Page 31: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/31.jpg)
@aahoogendoorn
MICROSERVICESIN THE REAL WORLD
![Page 32: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/32.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 33@aahoogendoorn
www.ditisagile.nl
A major Dutch insurance company
We have Most functionality on an expensive mainframe
A wide variety of large systems written in Java that are hard to maintain and to test, and that are very hard to replace
Individual systems that cover large areas of functionality, usually coupled to departments
Aging technology
No mobile strategy, allowing for new business or new services to clients, and intermediaries
We need to Get rid of the mainframe
Shorten time-to-market
Lower TCO
Uphold a fully secure systems landscape
![Page 33: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/33.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 34@aahoogendoorn
www.ditisagile.nl
FOR THE THINGS WE HAVE TO LEARN BEFORE WE CAN DO THEM, WE LEARN BY DOING THEM
Aristotle
![Page 34: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/34.jpg)
@aahoogendoorn
SO WHAT DID WE LEARN?
![Page 35: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/35.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 36@aahoogendoorn
www.ditisagile.nl
MICROSERVICES REQUIRE AN EVOLUTIONARY ARCHITECTURE
![Page 36: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/36.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 37@aahoogendoorn
www.ditisagile.nl
Questions, questions, questions
Communication architecture. The glueHow do we define interfaces between apps and component? How do we arrange messaging?
How do we glue together rapidly changing apps and component?
Application architectureEnd user facing Different users, different fast evolving needs
Which technology is the best for which purpose?
Component architectureComponents and services are evolving rapidly. How do we decide which components we need? How do we deal with versioning? How do we deal with distributed processes and transactions?
![Page 37: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/37.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 38@aahoogendoorn
www.ditisagile.nl
Our guiding principles
We decided to go from here Client thinks in business processes, so we implement
business processes We move away from the mainframe, to a new systems
landscape, consisting of micro-applications and micro-components
Requirements and documentation are modeled rather than written
Applications implement a single (elementary) business process
Components serve a single purpose and offer services Applications and components all have their own bounded
context – a domain model Applications and components will have an similar internal
software architecture to facilitate ease of maintenance and allow for harvesting re-use
Communication between applications and components will use a simple open protocol - REST
![Page 38: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/38.jpg)
@aahoogendoorn
APPLICATION ARCHITECTURE
![Page 39: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/39.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 40@aahoogendoorn
www.ditisagile.nl
Presentation
Process
Domain
Services
Outside world
PagesGrids / Panels, Controls
Use casesFlow
Domain objects, Factories / RepositoriesEnums / Value objects / Tupels / Reference objects
Service gateways, Service clientsInfo objects / Search objects
ComponentsRelations Dossiers Intermediaries Accounts Rates
![Page 40: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/40.jpg)
@aahoogendoorn
COMPONENT ARCHITECTURE
![Page 41: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/41.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 42@aahoogendoorn
www.ditisagile.nl
Service interface
Process
Domain
Data / Services
Outside world
ResourcesRepresentations
Use casesFlow
Domain objects, Factories / RepositoriesEnums / Value objects / Tupels / Reference objects
Storage gateways, Storage clientsInfo objects / Search objects
StorageRelations Dossiers Intermediaries DB2 MongoDB
![Page 42: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/42.jpg)
@aahoogendoorn
DESIGNING MICROSERVICES
![Page 43: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/43.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 46@aahoogendoorn
www.ditisagile.nl
DOING BIG UP-FRONT DESIGN IS DUMBDOING NO DESIGN IS EVEN DUMBER
Dave Thomas
![Page 44: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/44.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 47@aahoogendoorn
www.ditisagile.nl
The single unified domain model
Product
Vendor
StockOrder
Client
Delivery
Payment
![Page 45: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/45.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 48@aahoogendoorn
www.ditisagile.nl
Bounded contexts
Product
Vendor
StockOrder
Client
Delivery
Payment
Product
![Page 46: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/46.jpg)
@aahoogendoorn
MODELING APPLICATIONS
![Page 47: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/47.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 51@aahoogendoorn
www.ditisagile.nl
Smart use cases
![Page 48: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/48.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 52@aahoogendoorn
www.ditisagile.nl
52Applicationbounded context
![Page 49: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/49.jpg)
@aahoogendoorn
MODELING COMPONENTS
![Page 50: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/50.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 55@aahoogendoorn
www.ditisagile.nl
55Resource model
![Page 51: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/51.jpg)
@aahoogendoorn
AND THE REST ISCOMMUNICATION (OVER HTTP)
![Page 52: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/52.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 57@aahoogendoorn
www.ditisagile.nl
HTTP RETURN CODES CHEAT SHEET1**. Hold on
2**. Here you go 3**. Go away
4**. You fucked up 5**. I fucked up
![Page 53: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/53.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 58@aahoogendoorn
www.ditisagile.nl
HTTP GET
GET
Retrieve whatever information is identified by the request URI in the form of an entity
The entity is usually a single or a list of objects (of the type provided by the service, often JSON, or XML)
GET is safe (retrieval only) and idempotent
Unfortunately there are many ways of creating GET requests (see examples below)
Returns 200 (found), possibly 400 (bad request) or 404 (not found)
Examples
Get an entire collectionlocalhost:8080/countries
Find objects in the collectionlocalhost:8080/countries?name=“stan”
Find an object in the collection by IDlocalhost:8080/countries/38
Find a sub-object in the collection by IDlocalhost:8080/countries/38/capital
Find object in the collection by ISOlocalhost:8080/countries?isocode=“GRC”
Find object in the collection by ISOlocalhost:8080/countries/isocode/GRC
Find object in the collection by ISOlocalhost:8080/countries/GRC
![Page 54: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/54.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 59@aahoogendoorn
www.ditisagile.nl
BE CONSERVATIVE IN WHAT YOU SEND, BE LIBERAL IN WHAT YOU ACCEPT
Postel’s Law
![Page 55: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/55.jpg)
@aahoogendoorn
TESTING MICROSERVICES
![Page 56: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/56.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 61@aahoogendoorn
www.ditisagile.nl
A service development lifecycle
Code Developer Test Test Integration Test Acceptance Test LivePrepare & Design
![Page 57: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/57.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 62@aahoogendoorn
www.ditisagile.nl
What to test
Code Developer Test Test Integration Test Acceptance Test LivePrepare & Design
DevelopersUnit tests
DevelopersQ & A
TestersScenario’s & API’s
TestersScenario’s & API’s
Product ownerProduct
![Page 58: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/58.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 63@aahoogendoorn
www.ditisagile.nl
What to test automated
Code Developer Test Test Integration Test Acceptance Test LivePrepare & Design
DevelopersUnit tests
DevelopersQ & A
TestersScenario’s & API’s
TestersScenario’s & API’s
Product ownerProduct
![Page 59: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/59.jpg)
@aahoogendoorn
DEPLOYING MICROSERVICESContinuous integration, build pipelines and continuous delivery
![Page 60: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/60.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 65@aahoogendoorn
www.ditisagile.nl
A typical build pipeline
Code Developer Test Test Integration Test Acceptance Test LivePrepare & Design
![Page 61: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/61.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 66@aahoogendoorn
www.ditisagile.nl
ProductionAcceptanceIntegrationTestDevelopment
A typical build pipeline
Code Developer Test Test Integration Test Acceptance Test LivePrepare & Design
![Page 62: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/62.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 67@aahoogendoorn
www.ditisagile.nl
Build pipelines in Jenkins
![Page 63: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/63.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 68@aahoogendoorn
www.ditisagile.nl
Microservices. Building a deployment pipeline
Code Developer Test Test Acceptance Test Acceptance Live
Code Developer Test Test Acceptance Test Acceptance Live
Code Developer Test Test Acceptance Test Acceptance Live
Code Developer Test Test Acceptance Test Acceptance Live
![Page 64: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/64.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 69@aahoogendoorn
www.ditisagile.nl
Microservices. Pipeline hell?
Code v.2 Developer Test v.2 Test v.2 Acceptance Test v.2 Acceptance v.2
Code Developer Test Test Acceptance Test Acceptance Live
Test v.2 Acceptance Test v.2 Acceptance v.2 Live v.2
Developer Test Test Acceptance Test Acceptance Live
Code v.3 Developer Test v.3
Live
Code v.2
![Page 65: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/65.jpg)
@aahoogendoorn
DO WE REALLY NEED PROJECTS?From projects to releases to continuous delivery
![Page 66: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/66.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 71@aahoogendoorn
www.ditisagile.nl
Do we really need projects?
![Page 67: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/67.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 72@aahoogendoorn
www.ditisagile.nl
Or roadmap?
![Page 68: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/68.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 73@aahoogendoorn
www.ditisagile.nl
Minimal viable product
![Page 69: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/69.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 74@aahoogendoorn
www.ditisagile.nl
And go with the flow
![Page 70: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/70.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 75@aahoogendoorn
www.ditisagile.nl
Maintenance
From projects to continuous delivery?
Project
MaintenanceMVP
MaintenanceContinuous delivery
![Page 71: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/71.jpg)
@aahoogendoorn
![Page 72: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/72.jpg)
@aahoogendoorn
ALLOW YOUR TEAMS TO LEARN CONTINUOUSLY…
![Page 73: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/73.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 79@aahoogendoorn
www.ditisagile.nl
The hockey stick model
![Page 74: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/74.jpg)
@aahoogendoorn
… AND HAVE FUN
![Page 75: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/75.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 81@aahoogendoorn
www.ditisagile.nl
ONE LAST THOUGHT…
![Page 76: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/76.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 82@aahoogendoorn
www.ditisagile.nl
WHAT WILL YOU DO IN 2020?
![Page 77: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/77.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 83@aahoogendoorn
www.ditisagile.nl
You can be anything you want…
![Page 78: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/78.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 84@aahoogendoorn
www.ditisagile.nl
Because…
![Page 79: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/79.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 85@aahoogendoorn
www.ditisagile.nl
With passion you can achieve amazing things…
![Page 80: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/80.jpg)
MICROSERVICES? STAIRWAY TO HEAVEN OR HIGHWAY TO HELL?©2015 ditisagile.nl. All Rights Reserved 88@aahoogendoorn
www.ditisagile.nl
WRITING CODE IS THE BEST JOB IN THE WORLD
![Page 81: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/81.jpg)
@aahoogendoorn
THIS IS AGILE
www.createspace.com/4747266
Password: agilescrum
Discount code: KGNWKKWG
![Page 82: Microservices. The good the bad and the ugly](https://reader030.vdocument.in/reader030/viewer/2022032504/55c295a4bb61eb54128b4639/html5/thumbnails/82.jpg)
@aahoogendoorn
www.sanderhoogendoorn.comwww.smartusecase.comwww.speedbird9.com
@aahoogendoorn
REFERENCES AND QUESTIONS