Posts tagged with event sourcing

Implementing event sourcing: testing aggregates

by Freek Van der Herten – 4 minute read

Earlier this year we released v2 of laravel-event-sourcing. This package is probably the easiest way to getting started with event sourcing in Laravel. A significant feature of v2 was the addition of aggregates.

Today we released another new version of the package that adds test methods. These methods allow you to verify if the aggregate behaves correctly. In this post, I'll show you an example and explain how the test methods are implemented.

These test methods were inspired by the awesome testing methods Frank De Jonge made in his Eventsauce package.

Read more

Patterns for Decoupling in Distributed Systems

verraes.net

On his blog, Mathias Verraes started a series of posts on patterns for decoupling in distributed systems. I'll link to just one of the posts here, but they're all worth your time.

The mind switch is to think of the passage of time as just another Domain Event, exactly like all the other events. After all, if we define a Domain Event as a granular point in time where something happened that is relevant to the business, then certainly the next business day, month, or quarter, is extremely relevant.

Read more [verraes.net]

Join thousands of developers

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

Laravel event projector v2 has been released

by Freek Van der Herten – 18 minute read

Laravel event projector is a package that aims to be the entry point for event sourcing in Laravel. It can help you setting up aggregates, projectors and reactors. Earlier today our team released v2. This version streamlines the projectors and reactors from v1 and adds support for aggregates.

In this blogpost I'd like to explain a potential problem with traditionally built applications. After that we'll take a look at what projectors and aggregates are. Finally we'll walk through an example how you can create an aggregate laravel-event-projector.

Read more

Domain Events vs. Event Sourcing

www.innoq.com

Christian Stettler explains why domain events and event sourcing should not be mixed up.

What do domain events have in common with event sourcing? Certainly the word “event” in the name. But beyond that, when talking to architects and developers in projects, at conferences or trainings, I often hear that domain events go well with event sourcing and that event sourcing is an ideal source of domain events. In this blog post I would like to outline why I personally do not share this view.

Read more [www.innoq.com]

A short introduction to laravel-event-projector

by Freek Van der Herten – 1 minute read

The last few months I've been working on a package called laravel-event-projector. This package aims to be a simple and very pragmatic way to get started with event sourcing in Laravel. Ahead of it's release, which will happen in a few days, I've recorded a small video introduction. You can find the…

Read more

What you'll need to build projections

dev.to

A great post by Barry O Sullivan on what, in my mind, is one of the biggest advantages of event sourcing: the ability to create projections.

Projections are a necessary part of any event sourced or CQRS system. These systems don't rely on a single generic data source such as a normalised MySQL database. Instead you build up your data sets by playing through the events, i.e the “film”, "projecting" them into the shape you want. This allows lot of flexibility as you're no longer bound by a single data model on which you have to run increasingly monstrous SQL queries (12+ joins anyone?). With projections you can build a data model specifically for the problem/question at hand.

Read more [dev.to]

A package that makes event sourcing in Laravel a breeze ?

by Freek Van der Herten – 11 minute read

In most applications you store the state of the application in the database. If something needs to be changed you simply update values in a table. When using event sourcing you'll take a different approach. All changes to application state are stored as a series of events. The key benefit here is…

Read more

Event sourcing made simple

The team at Kickstarter made a simple, synchronous event sourcing library implemented in Ruby.

We’ll go over a high level introduction to Event Sourcing where we will highlight the four components that make a (minimal) Event Sourcing system: Events, Calculators, Aggregates and Reactors. We will then talk about how we implemented a (minimal) Event Sourcing Framework at Kickstarter for d.rip. And finally we’ll reflect a bit on the ah-ha moments and the challenges that we’re going through with this approach — 9 months after having started to work on d.rip and 4 months after launch.

https://kickstarter.engineering/event-sourcing-made-simple-4a2625113224

Read more

Event Sourcing: what it is and why it's awesome

If you haven't heard about event sourcing or are unsure about what it is, Barry O Sullivan has got you covered. Recently he wrote up a blogpost that explains it very clearly.

Event Sourcing (ES) is opposite of this. Instead of focussing on current state, you focus on the changes that have occurred over time. It is the practice of modelling your system as a sequence of events. ... It solves all the big problems our team has faced when building large scale distributed business software. It allows us to talk to the business in their language, and it gives us the freedom to change and adapt the system with ease.

https://dev.to/barryosull/event-sourcing-what-it-is-and-why-its-awesome

Read more

How we talk about tech

Ross Tuck gave a one of kind closing keynote at this year's (excellent) Dutch PHP Conference. Clear your schedule for the coming hour and watch the video of the talk with full attention. It's really great.

IMG_4307

At the conference there were a lot of talks on events sourcing. The two talks with that subject that stood out for me were Shawn McCool's (where he applied event sourcing to the board game Quantum), and Greg Young's opening keynote. Watch the latter one here:

Read more