java

How many exceptions?

We all know what exceptions are. We have checked and unchecked exceptions in java. Checked exceptions are for recovering. Like reading a file from disk. public class ReadFile { private AtomicInteger retryCount = new AtomicInteger(0); private static final int maxRetries = 3; private static Logger log = getLogger(ReadFile.class.getName()); private String readFromFile(String fileLocation) { StringBuilder resultStringBuilder… Continue reading How many exceptions?

Advertisements
Microservices

Sagas in microservices

We all know that the shared data in microservices(if they are done right) is eventually consistent. This is due to the CAP theorem which states that availability is usually a better choice than consistency. In a previous post I wrote about having eventual consistency data using Eventuate. Since distributed transactions(2PC) are heavy with a bad… Continue reading Sagas in microservices