Why learn another editor in the first place? The main role of a good editor is to not get into your way while working, and maybe even help a bit from time to time. If you are a programmer, chances are you are spending a large amount of time using one – and that’s why it’s so important to choose ...
Read More »Home »
Event sourcing + free monads = free sourcing?
I recently wrote about Event Sourcing and Free Monads. The natural next step is combining the two! How would a free monad adjusted for event sourcing look like? Please bear in mind that the below is just really a draft, not a complete solution. Hence any suggestions for improvements are very welcome! But, let’s review the basic assumptions. Our application ...
Read More »In today’s post-OO world, is dependency injection still relevant?
It’s 2015. Most of the new popular languages are more or less functional. The old ones, like Java, gain functional programming elements. In Scala, people are increasingly leaning towards the pure side, using more FP and less OO. So – Dependency Injection? Really? You could say that DI is just using (constructor) parameters. I’m saying that as well in my ...
Read More »Clustering reactmq with akka-cluster
In the last two posts on reactmq, I described how to write a reactive, persistent message queue. The queue has the following characteristics: there is a single broker storing the messages, with potentially multiple clients, either sending or receiving messages provides at-least-once-delivery; receiving a message blocks the message; unless it is ...
Read More »Making the Reactive Queue durable with Akka Persistence
Some time ago I wrote how to implement a reactive message queue with Akka Streams. The queue supports streaming send and receive operations with back-pressure, but has one downside: all messages are stored in-memory, and hence in case of a restart are lost. But this can be easily solved with the experimental akka-persistence module, which just got an update in ...
Read More »Evaluating persistent, replicated message queues
Message queues are useful in a number of situations; for example when we want to execute a task asynchronously, we enqueue it and some executor eventually completes it. Depending on the use case, the queues can give various guarantees of message persistence and delivery. For some use-cases, it is enough to have an in-memory message queue. For others, we want ...
Read More »Benchmarking SQS
SQS, Simple Message Queue, is a message-queue-as-a-service offering from Amazon Web Services. It supports only a handful of messaging operations, far from the complexity of e.g. AMQP, but thanks to the easy to understand interfaces, and the as-a-service nature, it is very useful in a number of situations. But how fast is SQS? How does it scale? Is it useful ...
Read More »Cluster-wide Java/Scala application deployments with Docker, Chef and Amazon OpsWorks
Docker is great for running isolated containers on a single node. However, most software systems run on multiple nodes, so in addition to Docker, we need some way of specifying which containers should run on which nodes. The specific problem that I want to solve is the following: I have two Scala daemons, which I want to run on multiple ...
Read More »Reactive Queue with Akka Reactive Streams
Reactive streams is a recently announced initiative to create a standard for asynchronous stream processing with built-in back-pressure, on the JVM. The working group is formed by companies such as Typesafe, Red Hat, Oracle, Netflix, and others. One of the early, experimental implementations is based on Akka. Preview version 0.3 includes actor producers & consumers, which opens up some new ...
Read More »