MicroProfile Fault Tolerance Annotations

In our last article about Microprofile Fault Tolerance we explained the motivation for this project and the need to provide a few design patterns under the microservice friendly Microprofile spec, namely:

  • Bulkhead – isolate failures in part of the system.
  • Circuit breaker – offer a way to fail fast.
  • Retry – define criteria on when to retry.
  • Fallback – provide an alternative solution for a failed execution.

Read the rest at Tomitribe’s blog.

MicroProfile Fault Tolerance

With the rise of microservices or large scale distributed systems and communicating through HTTP and NoSql databases, we also see the rise of eventual consistency. The focus on reliability or the perfect operation at all times had to shift to resilience; the ability of an application to recover from certain types of failure and yet remain functional. All-or-nothing and reliable transactions were paramount, data had to be safely stored above all, sacrificing the user experience and cost. The objects on those transactions could also be very complex, frequently using multiple tables and even different databases. Typically, if a transaction failed, the user would receive an error requiring his action; usually to resubmit the request or contact support. To keep response times low, vertical scaling with costly “big iron” was common.

Read the rest on Tomitribe’s blog.

JavaOne, the first two days

It’s again that time of the year when you cross an ocean to hear people talk about Java (!?), see some friends and wake up at 4am because of the jet lag.

About the sessions… The use of lambda expressions in the construction of new APIs or in evolution of the existing ones is becoming widespread.

The new JSR-354, Money and Currency API, was one of the nominees for this year’s JCP Awards, and has a very elegant use of lambda expressions. I plan to take a detailed look at this API in the future.

JAX-RS 2.1 will also use lambdas to make it easier to use Future<T>, InvocationCallback<T> and CompletableFuture<T> for non blocking writes with REST endpoints. Server side events and extension points to use RxJava were also announced.

A standard for asynchronous stream processing, like RxJava, has been mentioned. Take a look at Reactive Streams.

Also JMS 2.1 is coming with major changes to message driven beans (MDB). Multiple queue listers per MDB are being planed, non durable topics, callbacks will be able to auto un-box the message payload and set message headers and properties, following the JAX-RS way. Other features being discussed are the CDI beans as JMS listeners, a standardized way to deal with the dead letter queue, the delivery of messages in batches and also an API for connection factories.

And… If you are planing microservices, please make a favor to yourself and follow to what Adam Bien has to say about it.