Akka Streams patterns

Streams processing have been around for a while and encompasses a great number of applications:

  • HTTP servers handling stream of incoming HTTP requests
  • Message streams: Twitter hose, user posts, …
  • Time-series messaging: stream from IoT sensors
  • Database querying: result set contains a stream of record
  • ….

Most interestingly reactive streams have gain traction over the past few years. They bring back-pressure into the game in order to avoid having the destination stream over flooded by messages from the source stream.

This post focuses on AkkaStream, a reactive stream implementation based on Akka actors. Unlike actors which are untyped, AkkaStreams provides type safety at every stage of the stream pipeline and also comes with a nice and fluent API. However the documentation is sometimes lacking or not easy to search when someone needs to implement common patterns. This post tries to cover the most common ones in a clear and concise way. Continue reading “Akka Streams patterns”

The Cassandra Java Driver

Cassandra drivers are not just a dumb piece of software that sends CQL strings to a Cassandra node and waits for responses.

They are actually quite smart and are architectured in a way that should make your life easier while still attempting to get the most performance out of Cassandra.

In this post I am going to focus on the Java driver, have a quick look at its architecture and on some of the features it offers. Continue reading “The Cassandra Java Driver”

Reducing type class boilerplate with Shapeless

If you followed our previous post on forging a DSL using type classes, you surely notice that writing type class instances is a rather repetitive task.

In today’s post we’re going to get rid of this by derivating type class instances automatically using Shapeless. We also use this post as an excuse to experiment with Shapeless and try to understand all the “magic” that’s happening. Continue reading “Reducing type class boilerplate with Shapeless”