23 karma · joined October 25, 2010
Akka Serverless then also lets you define views on these entities - this is not something that is easy to do with a key value store, keeping the projection and the values in sync, ensuring that even when there's an error part way through an operation, that you don't end up with partial updates where the value is updated but the view isn't, ensuring that updates of the view are isolated from updates of the value to maximise performance, etc.
Akka Serverless is about inverting your view of how you see state. State isn't something that lives somewhere else that you manipulate, separate from your code. State is what you deploy. Akka Serverless gives you state models that are designed for distributed systems (which a serverless platform is), they scale, are fault tolerant, and are built on decades of computer science research.
Quite the contrary. I (the author) have done a lot of asynchronous Java development using promises and other asynchronous constructs. The boilerplate is a cost that I'm willing to accept.
However, in my experience, working with other Java developers as well as consulting and providing support to quite a number of enterprise companies full of Java developers, I find time and time again that it is not a cost that other Java developers are willing to accept. You provide them with fluent async libraries, you educate them again and again why they shouldn't block on calls to remote clients, you provide sample code, and they ignore your advice because the code is too hard to read. I'm not saying that all Java developers are like this, I'm just saying that from my observations working across many enterprise companies, most are like this.
https://jazzy.id.au/default/2012/10/16/benchmarking_scala_ag...
Since it's all just bytecode, then there's no difference in what you can do when it comes to scalability. However, it's the semantics, that you think are just personal preference, of Scala that make writing scalable code easier, it biases you towards scalable code with things like default immutability and using asynchronous io and things like that. Anything you do in Scala you can do in Java, but the question is, when the syntax overhead of for example monadic programming is over 5 times greater than the equivalent scala code (and many times less readable and maintainable), would you do that? Most developers don't. I wrote another blog post about that here:
http://jazzy.id.au/default/2012/11/02/scaling_scala_vs_java....