SlideShare a Scribd company logo
ERRORS ERRORS
EVERYWHERE!
@dpokusa
Microservices
CQRS
Queues
Hexagonal
SOA
Serverless
Event Sourcing
Integrations
Pipe-Filter
Event BUS
EDA
A
B
C
A
B
QUEUE
C
Errors errors, everywhere! - JSession
The fallacies
of distributed
computing
L. Peter Deutsch and other “Sun Microsystems Fellows”
1)The network is reliable.
1)The network is reliable.
2)Latency is zero.
1)The network is reliable.
2)Latency is zero.
3)Bandwidth is infnite.
1)The network is reliable.
2)Latency is zero.
3)Bandwidth is infnite.
4)The network is secure.
1)The network is reliable.
2)Latency is zero.
3)Bandwidth is infnite.
4)The network is secure.
5)Topology doesn't change.
1)The network is reliable.
2)Latency is zero.
3)Bandwidth is infnite.
4)The network is secure.
5)Topology doesn't change.
6)There is one administrator.
1)The network is reliable.
2)Latency is zero.
3)Bandwidth is infnite.
4)The network is secure.
5)Topology doesn't change.
6)There is one administrator.
7)Transport cost is zero.
1)The network is reliable.
2)Latency is zero.
3)Bandwidth is infnite.
4)The network is secure.
5)Topology doesn't change.
6)There is one administrator.
7)Transport cost is zero.
8)The network is homogeneous.
CAP THEOREM
Eric Brewer, 1998
PACELC theorem
Daniel Abadi, 2010
SAFE TO FAIL
ISSUES TAGS
ISSUES TAGS
RETRY!
C B F
D
A G
E
C B F
D
A G
E
RETRY!
MAX ATTEMPTS
Backoff POLICY
RECOVER
RETRY!
@Service
public interface MyService {
@Retryable(
value = { SomeException.class },
maxAttempts = 2,
backoff = @Backoff(delay = 5000))
void retry(String message) throws SomeException;
@Recover
void recover(SomeException e, String message);
}
RETRY!
@Bean
public RetryTemplate retryTemplate() {
RetryTemplate retryTemplate = new RetryTemplate();
FixedBackOffPolicy fixedBackOffPolicy = new FixedBackOffPolicy();
fixedBackOffPolicy.setBackOffPeriod(1000l);
retryTemplate.setBackOffPolicy(fixedBackOffPolicy);
SimpleRetryPolicy retryPolicy = new SimpleRetryPolicy();
retryPolicy.setMaxAttempts(15);
retryTemplate.setRetryPolicy(retryPolicy);
return retryTemplate;
}
Errors errors, everywhere! - JSession
TAGSISSUES
F D
A
G E
H
TAGSISSUES
F D
A
G E
H
TAGSISSUES
F D
A
G E
H
TAGSISSUES
F D
A
G E
H
TAGSISSUES
F D
A
G E
H
TAGSISSUES
F D
A
G E
H
TAGSISSUES
F D
A
G E
H
CIRCUIT
BREAKER
CIRCUITBREAKER @Service
public class JSessionService {
private final RestTemplate restTemplate;
public JSessionService(RestTemplate rest) {
this.restTemplate = rest;
}
@HystrixCommand(fallbackMethod = "fallback")
public String jsessionRecommendations() {
URI uri = URI.create("http://localhost:8092/recommended");
return this.restTemplate.getForObject(uri, String.class);
}
public String fallback() {
return "Errors, errors everywhere!";
}
}
Errors errors, everywhere! - JSession
ISSUES
DB
TAGS
DIE
System.exit(500);
@Component
public class HealthCheck implements HealthIndicator {
@Override
public Health health() {
int errorCode = check();
if (errorCode != 0) {
return Health.down()
.withDetail("Error Code", errorCode).build();
}
return Health.up().build();
}
public int check() {
return 0;
}
}
@Component
public class HealthCheck implements HealthIndicator {
@Override
public Health health() {
int errorCode = check();
if (errorCode != 0) {
return Health.down()
.withDetail("Error Code", errorCode).build();
}
return Health.up().build();
}
public int check() {
return 0;
}
}
{
"status" : "DOWN",
"myHealthCheck" : {
"status" : "DOWN",
"Error Code" : 1
},
"diskSpace" : {
"status" : "UP",
"free" : 209047318528,
"threshold" : 10485760
}
}
Errors errors, everywhere! - JSession
Errors errors, everywhere! - JSession
TAGSISSUES
F
D
A
G
E
H
QUEUE
ISSUES TAGS
ISSUES TAGS
4XX
ISSUES TAGS
5XX
TAGSISSUES
F
D
A
G
E
H
QUEUE
Hospital
QUEUE
TAGSISSUES
F
D
A
G
E
H
QUEUE
QUEUE
ROLLBACK
&
LEAVE
TAGSISSUES
F
D
A
G
E
H
QUEUE
TAGSISSUES
F
D
A
G
E
H
QUEUE
Errors errors, everywhere! - JSession
TAGS
ISSUES PROJECTS D
E
D
TAGS
ISSUES PROJECTS D
E
D
H
TAGS
ISSUES PROJECTS D
E
D
H
BULKHEAD
Errors errors, everywhere! - JSession
Errors errors, everywhere! - JSession
DOMAIN ERRORS
CBA E
QUEUE
CBA E
QUEUE
CBA E
Compensating
TRANSACTION
Errors errors, everywhere! - JSession
CBA E
QUEUE
CBA E
QUEUE
SASSTORE
SCHEDULER
CBA EQUEUE
SASSTORE
SCHEDULER
CBA E
SASSTORE
SCHEDULER
Scheduler
Agent
Supervisor
Errors errors, everywhere! - JSession
ABOUT
software-empathy.pl
@dpokusa
@dpokusa
ABOUT
08.09.2018
SPREADIT.PL
Q&A

More Related Content

PDF
The Quantum Physics of Java
PDF
Purely functional data structures
PPTX
DNA steganography
PPTX
Hebrew Windows Cluster 2012 in a one slide diagram
 
PPT
Backtracking Algorithmic Complexity Attacks Against a NIDS
PDF
0xdec0de01 crypto CTF solutions
PDF
The Ring programming language version 1.9 book - Part 30 of 210
PPTX
Hacking cryptography: 0xdec0de01 cryptoCTF solutions and a bit more - Владими...
The Quantum Physics of Java
Purely functional data structures
DNA steganography
Hebrew Windows Cluster 2012 in a one slide diagram
 
Backtracking Algorithmic Complexity Attacks Against a NIDS
0xdec0de01 crypto CTF solutions
The Ring programming language version 1.9 book - Part 30 of 210
Hacking cryptography: 0xdec0de01 cryptoCTF solutions and a bit more - Владими...

What's hot (18)

PDF
最近作ったN個のCPANモジュール Yokohama.pm #10
PPTX
MessagePack - An efficient binary serialization format
PDF
Redis is the answer, what's the question - Tech Nottingham
PDF
Understanding the Disruptor
PPTX
Disruptor
PPT
Kill the DBA
PDF
Rust Synchronization Primitives
PPT
PHP 5.3 Part 1 - Introduction to PHP 5.3
PDF
How To Crack RSA Netrek Binary Verification System
PPT
Network security attacks
PDF
5 issues
PDF
Entendiendo redes convolucionales paso a paso
PDF
Auntonomous second no4
KEY
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
PDF
Introduction to rust
PDF
Java in the Past, Java in the Future
PDF
Gps file structure explained
PDF
Program to-copy-contents-of-one-file-to-another
最近作ったN個のCPANモジュール Yokohama.pm #10
MessagePack - An efficient binary serialization format
Redis is the answer, what's the question - Tech Nottingham
Understanding the Disruptor
Disruptor
Kill the DBA
Rust Synchronization Primitives
PHP 5.3 Part 1 - Introduction to PHP 5.3
How To Crack RSA Netrek Binary Verification System
Network security attacks
5 issues
Entendiendo redes convolucionales paso a paso
Auntonomous second no4
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Introduction to rust
Java in the Past, Java in the Future
Gps file structure explained
Program to-copy-contents-of-one-file-to-another
Ad

Similar to Errors errors, everywhere! - JSession (14)

PDF
Errors errors, everywhere! - 4Developers 2018
PDF
Errors errors everywhere! - BoilingFrogs 2018
PDF
Architecting for failure - Why are distributed systems hard?
PDF
Build a better client
PPTX
Stability Patterns for Microservices
PDF
Resilence patternsreloaded kr
PDF
Distributed systems at ok.ru #rigadevday
PDF
Expect the unexpected: Prepare for failures in microservices
PDF
SERENE 2014 School: Gabor karsai serene2014_school
PDF
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...
PDF
Architecting for Failures in micro services: patterns and lessons learned
PDF
Adaptive check-pointing and replication strategy to tolerate faults in comput...
PDF
E01113138
PDF
Andrii Rodionov: What can go wrong in a distributed system – experience from ...
Errors errors, everywhere! - 4Developers 2018
Errors errors everywhere! - BoilingFrogs 2018
Architecting for failure - Why are distributed systems hard?
Build a better client
Stability Patterns for Microservices
Resilence patternsreloaded kr
Distributed systems at ok.ru #rigadevday
Expect the unexpected: Prepare for failures in microservices
SERENE 2014 School: Gabor karsai serene2014_school
SERENE 2014 School: Resilience in Cyber-Physical Systems: Challenges and Oppo...
Architecting for Failures in micro services: patterns and lessons learned
Adaptive check-pointing and replication strategy to tolerate faults in comput...
E01113138
Andrii Rodionov: What can go wrong in a distributed system – experience from ...
Ad

More from Daniel Pokusa (9)

PDF
Orchestrate Your Choreography
PDF
Evolving architecture 4 Confitura 2017
PDF
Evolving architecture 4 QualityExcites 2017
PDF
Java: Nie popełniaj tych błędów!
PDF
How to become a DevOps
PDF
Evolving architecture @ 4Developers 2017
PDF
Work in agile distributed teams. Cookbook
PDF
Jak wdrożyć Continuous Delivery do Twojego (starego) projektu?
PDF
IDE to za mało! Jak stworzyć efektywne środowisko pracy?
Orchestrate Your Choreography
Evolving architecture 4 Confitura 2017
Evolving architecture 4 QualityExcites 2017
Java: Nie popełniaj tych błędów!
How to become a DevOps
Evolving architecture @ 4Developers 2017
Work in agile distributed teams. Cookbook
Jak wdrożyć Continuous Delivery do Twojego (starego) projektu?
IDE to za mało! Jak stworzyć efektywne środowisko pracy?

Recently uploaded (20)

PPTX
Project and change Managment: short video sequences for IBA
PPTX
Self management and self evaluation presentation
PPTX
Learning-Plan-5-Policies-and-Practices.pptx
PPTX
Anesthesia and it's stage with mnemonic and images
PPTX
Tour Presentation Educational Activity.pptx
DOCX
ENGLISH PROJECT FOR BINOD BIHARI MAHTO KOYLANCHAL UNIVERSITY
PPTX
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
PPTX
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
PPTX
Tablets And Capsule Preformulation Of Paracetamol
PPTX
Introduction-to-Food-Packaging-and-packaging -materials.pptx
PPTX
An Unlikely Response 08 10 2025.pptx
PPTX
Hydrogel Based delivery Cancer Treatment
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
PDF
Presentation1 [Autosaved].pdf diagnosiss
PPTX
2025-08-10 Joseph 02 (shared slides).pptx
PPTX
Relationship Management Presentation In Banking.pptx
PDF
Tunisia's Founding Father(s) Pitch-Deck 2022.pdf
PPTX
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
PPTX
Introduction to Effective Communication.pptx
Project and change Managment: short video sequences for IBA
Self management and self evaluation presentation
Learning-Plan-5-Policies-and-Practices.pptx
Anesthesia and it's stage with mnemonic and images
Tour Presentation Educational Activity.pptx
ENGLISH PROJECT FOR BINOD BIHARI MAHTO KOYLANCHAL UNIVERSITY
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
Tablets And Capsule Preformulation Of Paracetamol
Introduction-to-Food-Packaging-and-packaging -materials.pptx
An Unlikely Response 08 10 2025.pptx
Hydrogel Based delivery Cancer Treatment
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
Presentation1 [Autosaved].pdf diagnosiss
2025-08-10 Joseph 02 (shared slides).pptx
Relationship Management Presentation In Banking.pptx
Tunisia's Founding Father(s) Pitch-Deck 2022.pdf
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
Introduction to Effective Communication.pptx

Errors errors, everywhere! - JSession