Red Hat has been exploring serverless (aka FaaS) through the Fabric8 Funktion project.
It has been long due for us to get serious on the subject.
We are turning all of our libraries into services starting today.
This is going to be a multi year effort but we are committed to it.
We thought hard and long about which service to start with.
In our performance lab, we realized that the slowest and most expensive part of serverless functions was CPU branch misprediction.
In a serverless approach, you want to squeeze as much operations per CPU cycle as possible.
Any misprediction has huge consequences and kill any of the mechanical sympathy effort we put in libraries like vert.x.
In our experiments, we found that the optimal solution was to get rid of if branches in serverless functions.
We are proud to introduce IF as a Service or IFaaS (pronounced aye face).
Your code changes from:
One thing you don’t hear enough about in the microservices world is data.
There is plenty of info on how your application should be stateless, cloud native, yadayadayada.
But at the end of the day, you need to deal with state and store it somewhere.
I can’t blame this blind spot.
Data is hard.
Data is even harder in a unstable universe where your containers will be killed randomly and eventually.
These problems are being tacked though in many fronts and we do our share.
But once you have dealt with the elasticity problem, you need to address a second problem: data evolution.
This is even more pernicious in a microservices universe where:
Today we’ll be talking about Hibernate Validator and how you can provide your own constraints
and/or validators in a fully self-contained manner. Meaning packaging it all into its own JAR file,
in a way that others can use your library by simply adding it to the classpath.
What can be a real life scenario for building your own library with constraints and sharing it? Well, let’s say that
you are building some library with data classes that user might want to validate. As it may be tough
to keep track of all such libraries and write/maintain all those constraints for them - Hibernate
Validator provides authors of such libraries a possibility to write and share their own validation extensions.
Which can be picked up by Hibernate Validator and used to validate your data classes.