Category Archives Akka

akka http case class validation directive

If you work with Akka HTTP for a while, you should definitely know that it has multiple ways for model validation. I talk about http request body validation. Probably in 99% of cases you would like to ensure that user send something meaningful to the server. So exactly for this purpose Akka HTTP provides validation mechanisms. But what if you want to send back to the client side information about all invalid fields?

How a newcomer can understand Akka's principles of work? Couple of examples from the documentation could be not enough. From the other side, a simple application which shows Akka in action is a very good way for demonstration of Actors capabilities. So let's start the acquaintance with the simple Akka use case!

Probably the most popular process which happens behind the scenes in Akka is a messaging. And it's not, what comes to mind instantly, no any text messages like in Skype or mobile phones. Akka Actors can deal with different objects and classes which represent messages (Strings also allowed). As usually I'll use Scala as a programming language.

12
Close