twitter4s

twitter4s: A Scala client for the Twitter API

A few months ago, I started looking into the Twitter API and I have developed twitter4s, an asynchronous non-blocking Twitter client in Scala. In this article, we will introduce twitter4s providing examples of how to download tweets from a user timeline and how to perform some simple data analysis. The code shown in this tutorial… Continue reading twitter4s: A Scala client for the Twitter API

REST · Spray · Tutorial

How to build a Scala REST CRUD application with Spray

In previous articles we have described how to build a REST Api with Spray and how to (de)serialize case classes with json4s. However, in order to keep things simple, we didn't always do things as suggested by spray.io. In this article we will redeem ourselves and we will describe how to build a REST CRUD… Continue reading How to build a Scala REST CRUD application with Spray

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

Scala · Tutorial

How to use Case Classes in Scala

Scala has adopted many concepts from other functional programming languages: higher-order functions from Haskell, actors model from Erlang, futures from Clojure, etc. However, Scala has also introduced new tools in the functional programming world: case classes is one of them. Case classes are a special type of classes, as the compiler automatically adds some useful… Continue reading How to use Case Classes in Scala

Akka

Akka Actors: Best Practices

Actors are components of message-passing systems that are particularly popular these days. They make concurrency a lot easier to understand compared to the traditional thread-monitor-lock model. An actor is a thread-like program that run independently from other actors. It has a mailbox to receive messages from other actors, where each message represents a task to… Continue reading Akka Actors: Best Practices