Event Sourced application

after 4 years of production experience

Mirosław Pragłowski / @mpraglowski

So you are a fan of Domain Driven Design

and you know what Event Sourcing is.

You are about to start new exciting green field project

or you still working on legacy but profitable one.

Let's talk!

How to "sell"
Domain Driven Design

to your bosses & business owners?

Start with your team

You need some allies

Ubiquitious language

Business will be happy to be understood by developers

...and finally to understand developers

Business value

Build the right features...

Easier to maintain & change...

Focus on the most important ones.

It's not the technical perfection
what is important in business apps.

How to "sell"
Event Sourcing

Do not

Just start publishing domain events

... but remember to store them.

Implement small feature without asking for approval.

Legal requirements

There are areas where business already do ES forced by law.

Audit log & ease of reasoning

Correlation & Causations ids to know all paths.

Sell them business value

not a technical solution

What are the pitfalls, traps and tip & tricks

to introduce those techniques in your project.

Educate your team members

You all need to understand the solution.

Switch the mindset

CRUDy mindset won't fit.

Go back if needed

It's not one way.

Validate your design

All works fine in on my machine.

But might fail under heavy load.


... that commands are shipped to them by sea freight

... they prevent my mac’s lid from closing

... that every operation raises concerns under EU antitrust regulations

... it takes two camels to carry them

... they have timezones

... that every business rule has its own legal department

Oh, FFS!
I've made a mistake!

That's just Business As Usual

Don't panic!

Talk to you domain experts

Corrective actions

Versioning in an Event Sourced System

by Greg Young

Say, microservices one more time!

Context is king!

Bounded context

Embrace async

Because why not :)

Real world is not consistent

Deal with that!

Once upon a time

everything worked with


(at least until several tens of years ago)

Eventually consistent

Amazon recommendations

Google search results

Your DropBox files

Even Your bank account

Every cache is based on eventual consistency

Consistency, Availability and Partition Tolerance

CAP theorem

Choose 2!

so again

Embrace async

at least for business apps

Event Sourced app

with Rails & RES

Similar solutions available

Beware of frameworks

Build your adapters (anti-corruption layer)

What is RES

Rails Event Store (RES) is a library for publishing, consuming, storing and retrieving events. It's your best companion for going with an event-driven architecture for your Rails application.







Available at: