What is Akka Serverless?
In short: There are no actors. It’s a 4GL framework in the cloud.
My first thoughts when I heard the name "Akka Serverless" are:
It takes care of all the hardware details like AWS
It will go a step further and also takes care of setting up a JVM with an Akka actorsystem
Maybe even with clustering?
With some nice monitoring
Maybe there is some interesting way to deploy single actors to it?
Of course, I was very interested in trying this out!
It turns out that it’s not any of these. What "Akka Serverless" actually is:
a 4GL framework
to create APIs (Rpc or Rest)
It is actually serverless
Let’s first take a little detour and to talk about what 4GL frameworks are and what is good and bad about them.
These are frameworks like Delphi, Oracle SB, Tibco, Squeak, Lego Mindstorms
Often also called Middleware
They are usually marketed to business people or children. With IDEs that feature a lot of drag-and-drop or drawing instead of coding.
They have heavy constraints on what you can do. These can be sensible principles that you might want to adhere to anyway. If your use-case is simple and your needs match perfectly with what the framework provides, it will be very quick and easy to use.
But at some point you’ll probably want something that doesn’t fit. Maybe at first you can build a little hack to build what you want in a roundabout way. Or you make some concession in the desired functionality. Eventually, your code will be so intertwined with the framework, it’s hard to tell what the hacks and concessions are. It will be almost impossible to change to another framework. At this point, it’s probably best to start again from scratch. This time using a lighter framework.
They often don’t work well with build/deployment tools, automatic tests, Git, etc.
In general, the easy things are made easier, but the hard things are made harder. Think about where you’ll spend most of your time and where most of the bugs will come from. Does this tradeoff make sense?
At the very least think of a way out; If you’ve made some things with it, how easy is it to move them to another tool.
Is Akka Serverless a good 4GL?
If, after all these considerations, you’re somehow still insistent on using a 4GL framework. Then Akka Serverless is one of the best.
It uses good tools, that you probably want to use anyway. Like Protobuf, Grpc, Docker, Sbt. There is support for local running and automatic testing.
The database abstraction is convenient. There are even multiple state models to choose from.
It’s built with some sensible principles in mind, like reactive and domain-driven design.
There is support for automatic tests and for running locally.
Talk with Lightbend
I’ve had a good talk with Jeremy Pollock from Lightbend. They are already aware of 2 of the biggest problems and are working on changing them:
The name. They also think that "Akka Serverless" is misleading. They’re busy to think up a better name to change to.
Currently, the user of the API has to supply an id for a "create entity" request. It makes more sense for the API to create the entity id and put it in the response. Lightbend is also changing this.