Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects...
Transcript of Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects...
![Page 1: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/1.jpg)
Microservice architecture
A systems integration lecture
Ing. Marek SchmidtPrincipal Quality Engineer, Red Hat Middleware
2017-03-03
![Page 2: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/2.jpg)
Microservice architectures2
MICROSERVICES
ConceptsSmall & autonomous, loose coupling & tight cohesion, Conway’s law, resilience & scaling
TestingConsumer-driven contracts, Canary releases, Semantic monitoring
MonitoringDistributed logging, Correlation IDs, Distributed Tracing
PatternsTimeouts, Circuit breakers, Bulkheads, Idempotency, Fail fast, Decoupling Middleware
Introduction
![Page 3: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/3.jpg)
Introduction
![Page 4: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/4.jpg)
Microservice architectures
MICROSERVICES, THE TERM
4
“microservice”Venice software architects workshop
‘11
“Micro services” Java, the Unix Way, James Lewis
33rd Degree, Kraków
‘12
“Fine grained SOA” Adrian Cockcroft @ Netflix
‘14‘07 ‘09
![Page 5: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/5.jpg)
Microservice architectures
NETFLIX STORY
5
○ ...the very first piece of Netflix that was running in the cloud was the search auto-complete service. ... That ran as a service, there was no graphics around it. All of the website that was supporting that was still running in the datacenter. It’s just that as you type that word in, it was sent off to a search index in the cloud.... .
○ ..It’s a trivial piece of technology, but it taught us everything about pushing production systems to the cloud, hooking them up to a load balancer and the tooling we needed to do it. Two or three engineers, I think, worked on getting that built in a month or so maybe. It was a very small piece of work, plus the tooling, but it proved certain things worked. Then, we got the first bits and pieces up and running in the cloud one piece at a time...
-- Adrian Cockcroft
![Page 6: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/6.jpg)
Microservice architectures6
-- Lions commentary on UNIX 2nd Edition
JAVA, THE UNIX WAY
![Page 7: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/7.jpg)
Microservice architectures7
Martin Fowler - Microservicesa definition of this new architectural term
https://martinfowler.com/articles/microservices.html
![Page 8: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/8.jpg)
Concepts
![Page 9: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/9.jpg)
Microservice architectures
SMALL AND AUTONOMOUS
9
Small
● Each application only does one thing● Small enough to fit in your head
Packaging and Deployment
● single “fat jar” file● independently testable● installable as any system service● containers
○ fat jar vs. shared layers
![Page 10: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/10.jpg)
Microservice architectures
SMALL AND AUTONOMOUSe.g. as a SystemD service
[Unit]Description=Store CatalogueAfter=network.service
[Service]Environment=SPRING_DATASOURCE_URI=jbdc://foo/barExecStart=/bin/sh -c 'java -jar /opt/store/catalogue.jar'User=catalogue
[Install]WantedBy=multi-user.target
10
![Page 11: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/11.jpg)
Microservice architectures
LOOSE COUPLING
11
...and tight cohesion
● The Single Responsibility Principle○ Gather together those things that change for the same reason, and
separate those things that change for different reasons.
● Services separated via network calls○ APIs
■ JSON/XML over HTTP (REST), Messaging■ versioning
![Page 12: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/12.jpg)
Microservice architectures
CONWAY’S LAW
12
Organizations which design systems are constrained to produce designs whose structure are copies of the communication structures of these organizations -- Melvin Conway 1968
● Each application in separate source repository○ Treat common code as any other shared library
● Mythical Man-Month● 2 pizza rule
![Page 13: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/13.jpg)
Microservice architectures
RESILIENCE AND SCALING
13
Design for failure
● Resilience○ A resilient system keeps processing transactions, even when there are
transient impulses, persistent stresses, or component failures disrupting normal processing.
○ Ability to contain a failure to the failing component.
● Scaling○ horizontal scaling
■ fault tolerance via redundancy
![Page 14: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/14.jpg)
Microservice architectures
LOAD BALANCING
14
Load balancer
http://foo-service
![Page 15: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/15.jpg)
Microservice architectures
WORKER BASED SCALING
15
Queue
activemq:queue:FOO
![Page 16: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/16.jpg)
Testing
![Page 17: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/17.jpg)
Microservice architectures
TEST CATEGORIES
17
Store catalogue service
Store Manager Mgmt.
Web Shop
Store inventory service
![Page 18: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/18.jpg)
Microservice architectures
TEST CATEGORIES
18
Store catalogue service
Store Manager Mgmt.
Web Shop
Store inventory service
Unit tests
Individual unit tests scope
![Page 19: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/19.jpg)
Microservice architectures
TEST CATEGORIES
19
Store catalogue service
Store Manager Mgmt.
Web Shop
Store inventory service
Service tests
Service tests scope
![Page 20: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/20.jpg)
Microservice architectures
TEST CATEGORIES
20
Store catalogue service
Store Manager Mgmt.
Web Shop
Store inventory service
End-to-end tests
End-to-end tests scope
![Page 21: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/21.jpg)
Microservice architectures
TEST CATEGORIES
21
Store catalogue service
Store Manager Mgmt.
Web Shop
Store inventory service
Consumer-driven contracts
Store Manager Mgmt. CDC Test scope
Mocked or Stubbed
![Page 22: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/22.jpg)
Microservice architectures
TEST CATEGORIES
22
Unit tests
Service and consumer-driven tests
End-to-endtests
![Page 23: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/23.jpg)
Microservice architectures
TESTING IN PRODUCTION
23
Testing environment is never identical to production
● Blue/green deployment● Canary release● Semantic monitoring● Chaos monkey
![Page 24: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/24.jpg)
Monitoring
![Page 25: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/25.jpg)
Microservice architectures
LOGGING
25
aggregation
● ELK / EFK● Correlation ID● Distributed Tracing
![Page 26: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/26.jpg)
Microservice architectures
DISTRIBUTED TRACING
26
![Page 27: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/27.jpg)
Microservice architectures
DISTRIBUTED TRACING
27
![Page 28: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/28.jpg)
Microservice architectures
MONITORING
28
individual services
● Mechanisms○ JMX / Jolokia
● Data○ Traffic indicators○ Resource pool health○ DB connections health○ Integration point health○ Cache health
![Page 29: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/29.jpg)
Microservice architectures
OPERATIONS DATABASE
29
Apps
Servers
Batch jobs
OpsDB
Capacity planning
Dashboard
Reports
status variablesbusiness metricsinternal metrics
performanceutilization
![Page 30: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/30.jpg)
Patterns
![Page 31: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/31.jpg)
Microservice architectures
TIMEOUTS
31
networks are fallible
● prevents calls to integration points from causing blocked threads○ cascading failures
● thread / connection pools● consider delayed retries / queueing
○ Beware of Acts of self-denial
![Page 32: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/32.jpg)
Microservice architectures
CIRCUIT BREAKER
32
“don’t do it if it hurts”
![Page 33: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/33.jpg)
Microservice architectures
CIRCUIT BREAKER
33
Service functions normally
Some service
Service boundary
Calling code
Calling code
Closed
![Page 34: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/34.jpg)
Microservice architectures
CIRCUIT BREAKER
34
Calls starting to timeout or returning errors
Some service
Service boundary
Calling code
Calling code
Closed
![Page 35: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/35.jpg)
Microservice architectures
CIRCUIT BREAKER
35
Connection stopped when threshold reached
Some service
Service boundary
Calling code
Calling code
Open
Requests fail fast
![Page 36: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/36.jpg)
Microservice architectures
CIRCUIT BREAKER
36
Retry after grace period, or occasional health check
Some service
Service boundary
Calling code
Calling code
Half-open
![Page 37: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/37.jpg)
Microservice architectures
CIRCUIT BREAKER
37
Connection reset when healthy threshold reached
Some service
Service boundary
Calling code
Calling code
Closed
![Page 38: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/38.jpg)
Microservice architectures
BULKHEADS
38
isolating from failure
● Separation of concerns (separate service)● Separating thread/connection pools
![Page 39: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/39.jpg)
Microservice architectures
BULKHEADS
39
Store
Catalog service
Ordering service
Connection pool
![Page 40: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/40.jpg)
Microservice architectures
BULKHEADS
40
Store
Catalog service
Ordering service
Connection pool
Store
Catalog service
Ordering service
Connection pool
Connection pool
![Page 41: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/41.jpg)
Microservice architectures
DECOUPLING MIDDLEWARE
41
enable message processing in different place and time
Ordering service
Store service
Unreliable store backend
system
place order
order receipt
![Page 42: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/42.jpg)
Microservice architectures
DECOUPLING MIDDLEWARE
42
enable message processing in different place and time
Ordering service
Store service
Unreliable store backend
system
place order
intermediary order receipt
activemq
![Page 43: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/43.jpg)
Microservice architectures
IDEMPOTENCY
43
and eventual consistency
![Page 44: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/44.jpg)
Microservice architectures
IDEMPOTENCY
44
PUT http://order-service/order
{ “customer”: { “name”: “John Doe”, ... }, “items” = [ {“storeId”: 1000, “itemPrice”: 99.90, “amount”: 2} ]}
![Page 45: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/45.jpg)
Microservice architectures
IDEMPOTENCY
45
PUT http://order-service/order
{ “uuid”: “12de-adbe-ef42”, “customer”: { “name”: “John Doe”, ... }, “items” = [ {“storeId”: 1000, “itemPrice”: 99.90, “amount”: 2} ]}
![Page 46: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/46.jpg)
Microservice architectures
COMPENSATING TRANSACTIONS
46
Store
Order table Pickup table
Customercode
Monolithic service
Warehousecode Single
transactional boundary
![Page 47: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/47.jpg)
Microservice architectures
COMPENSATING TRANSACTIONS
47
Store service
Order table Pickup table
Customer service
Separate services
Warehouse service
Separate transactional boundaries
order
1st 2nd
![Page 48: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/48.jpg)
Microservice architectures
COMPENSATING TRANSACTIONS
48
Store service
Order table Pickup table
(idempotent)Customer service
Compensating Transactions
(idempotent)Warehouse service
activemq
order
1st 2nd
![Page 49: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/49.jpg)
Microservice architectures
COMPENSATING TRANSACTIONS
49
Store service
Order table Pickup table
(idempotent)Customer service
Compensating Transactions
(idempotent)Warehouse service
activemq
order
1st 2nd
Failure
![Page 50: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/50.jpg)
Microservice architectures
COMPENSATING TRANSACTIONS
50
Store service
Order table Pickup table
(idempotent)Customer service
Compensating Transactions
(idempotent)Warehouse service
activemq
order
1st 2nd
Failure
3rd
cancel order
![Page 51: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/51.jpg)
Summary
![Page 52: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/52.jpg)
Microservice architectures
MICROSERVICE BENEFITS
52
INDEPENDENT COMPONENT SCALING
CONTINUOUS AND DECOUPLED DEPLOYMENTS
SMALL AND AGILE DEV TEAMS
![Page 53: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/53.jpg)
Microservice architectures
MICROSERVICE TRADE-OFFS
53
DISTRIBUTED SYSTEM
EVENTUAL CONSISTENCY
OPERATIONAL COMPLEXITY
![Page 54: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/54.jpg)
Microservice architectures
MICROSERVICE TRADE-OFFS
54
DISTRIBUTED SYSTEM
EVENTUAL CONSISTENCY
OPERATIONAL COMPLEXITY
Design for failure Carefully consider consistency requirements
Embrace immutable infrastructure, automate
![Page 55: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/55.jpg)
Microservice architectures
Further reading
55
![Page 56: Microservice architecture...MICROSERVICES, THE TERM 4 “microservice” Venice software architects workshop ‘11 “Micro services” Java, the Unix Way, James Lewis 33rd Degree,](https://reader033.fdocuments.net/reader033/viewer/2022060902/609ec04206809140dc547c48/html5/thumbnails/56.jpg)
THANK YOU
plus.google.com/+RedHat
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHatNews