Monads demystified

In this short post I want to take a look at monads from a pragmatic perspective, i.e. why and how monads can be useful for developers. I won’t talk about any theory, but instead show code examples in Scala. I’ll even call things monad which don’t fully obey the monad laws as long as they are monadic enough to be useful (well known experts did that before, so I’m not afraid).

… Read the whole post on the codecentric blog.

Advertisements
Monads demystified

Introduction to Akka Actors

In the first part of this series we gave you a high-level overview of Akka – now we are going to take a deep dive into the realm of Akka actors as provided by the akka-actor module which lay the foundations for all other Akka modules.

As we believe that one can’t learn coding without reading and/or writing code, we will develop a tiny actor based library step-by-step: a publish-subscribe based event bus called PubSub. Of course Akka comes with production-ready local and distributed solutions for this domain, so this is just to get our hands dirty with a well known example. We are going to use the Scala programming language, simply because it’s so much more convenient for writing Akka based code, but Java could be used to get the same results.

… Read the whole post on the codecentric blog.

Introduction to Akka Actors