Scala

Performance Comparison between immutable Seq, List, Vector

I have recently attended the Advanced Scala Training Course by TypeSafe during the Scala Days Conference in Amsterdam. During the course we discussed a lot on how to write cleaner and more performant Scala code: one of the parameters that can greatly influence your performance is the type of collections used. Which type of collection… Continue reading Performance Comparison between immutable Seq, List, Vector

Akka · Tutorial

Peer-to-Many Communication in Akka

The most common communication channel in Akka is Peer-to-Peer, where an individual actor sends a message directly to another individual actor actor. However, sometimes this is not enough as we may need a Peer-to-Many type of communication, where an individual actor sends a message to a group of actors. This is particularly useful when you… Continue reading Peer-to-Many Communication in Akka

Functional Programming

Pure Functions

One of the key principles of functional programming is writing pure functions. What is a pure functions? Why do we care? Why everyone is talking about it? This article will try and answer these questions. Purity and Referentially Transparent Expressions A pure function is composed only by referentially transparent expressions. An expression is referentially transparent… Continue reading Pure Functions

Akka · Tutorial

How to Integrate ReactiveMongo in your Akka Spray Application

Scalability can be challenging when database access is needed: the common approach is to block the thread until a response is received. ReactiveMongo is a MongoDB Scala Driver that provides fully non-blocking asynchronous I/O operation that increases the scalability of your system. In a previous post we have seen how to build a REST Api… Continue reading How to Integrate ReactiveMongo in your Akka Spray Application