In this tutorial we will look at how we can design the game flow for a rock-paper-scissors game using Serialized APIs for Event Sourcing and CQRS.

Our favorite runtime environment for applications is usually Dropwizard but since many out there prefer Spring Boot I decided to use it instead for this article. Our Java client works with any runtime environment or platform you use on the JVM.

Configure the Serialized project

To develop our game we will use Serialized aggregates and projections. The aggregates will store the events for each game and the projections will provide a view of each game as well as…

Photo by Desola Lanre-Ologun on Unsplash

We’ve been using Sematext as a logging provider since the start and we’re really happy with it. They also provide log visualization using Kibana though their web interface. In this post we’ll take a look at how to integrate it with your Dropwizard application.

What’s also nice about Sematext is that they offer a pretty good deal on their free tier, so startups can use it to get started quickly and for free.

This is a summary of the technologies and products we will touch upon in this post:

What is Dropwizard?

Dropwizard is a really nice small…

When meeting with many clients and customers over the years we’ve seen a number of things that are common pitfalls when getting into Event Sourcing (or event-driven development for that matter). We want to share our checklist for getting faster on track when building solutions using Event Sourcing.

Are you using the business language?

Events should speak the language of the domain. Make sure you formulate the events in past tense, using a language that your business people/customers/users could understand. If you do this properly the events can be used to track the story of the business back in time. …

How do we play the Event Sourcing piano?

In part 1 we had a look at some of the fundamental ideas behind Event Sourcing and why it is a powerful technique that brings us lots of benefits. In this post we’ll have a look at some skills that are important to know in order to succeed with Event Sourcing.

1. Use Event Storming to figure out what to do

A great methodology for breaking down and understanding any current or new system is Event Storming — coined by Alberto Brandolini. It deserves a post of its own but meanwhile you can start by looking here:

It might be nothing like what you’re used to

With this series of posts I will try to shed some light on the original idea behind Event Sourcing and how we at Serialized think about it. I will also try to distinguish the technique from other similar architectural patterns and solutions that involves events. Finally we’ll get to how we can implement an event-sourced system and also look at some possible pitfalls and how to avoid them.

In this post (part 1) I will try to describe the fundamentals of how Event Sourcing works and why you should care about it.

Event Sourcing vs. traditional systems

When performing what we call transactional tasks, which…

Building your domain model with event sourcing is maybe not simpler than using a stateful snapshot-style modeling where everything is available at hand.

There are however a few compelling reasons that makes it a very nice tool to use when the thing you’re building is really business-critical.

In this post I will shed some light on some nice characteristics you get from event sourcing when it comes to testing your business logic.

Modeling your domain in a functional style

The methods in an event sourced aggregate root can be designed in different ways but the end result should always be that a command results in zero to…

Originally published at

The implementation of our core domain model should be the neatest part of our code base. We like to make an extra effort to make it as readable as possible and we also tend to be stricter when it comes to keeping immutability.

However, developing a neat intention-revealing model with no side-effects and a clear business language can be tricky.

We want to use value objects instead of primitive data structures as much as possible to create a rich model that speaks the language of the domain. …

Originally published at

Another day at a random large software company in Sweden.

No one really knows how it works. The consultant who wrote the calculation routine quit 8 years ago (leaving a big mess) and now we need to handle this new law that’s being put into action this year.

One of the most important customers just found a serious bug in the reporting tool. The stats are way off and they can’t tell how they got to where they are now. It’s all very confusing. One of the senior developers spent a couple of days trying to…

We recently published the first versions of our Event Sourcing API and Event Projection API.

We created a simple example application that shows how you can build a CQRS/Event Sourcing application using Node.js and Express. If you’re not that familiar with Node.js the code should be quite easy to port to other programming languages and platforms.

The application is meant to showcase our APIs and is not in any way a gold standard for how to build web applications and that’s why we deliberately chose to use plain Javascript and JQuery for the frontend. No fancy frameworks.

You can see the application live here.

Check out the source code below:

We would love to hear what you think about our new APIs!

Mattias Holmqvist

CEO/Co Founder @ Serialized

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store