Real-World Event Sourcing (PragProg)

Kevin Hoffman

edited by Kelly Talbot @KellyTalbot

Reality is event-sourced; your mind processes sight, sound, taste, smell, and touch to create its perception of reality. Software isn’t that different. Applications use streams of incoming data to create their own realities, and when you interpret that data as events containing state and context, even some of the most complex problems become easily solvable. Unravel the theory behind event sourcing and discover how to put this approach into practice with practical, hands-on coding examples. From early-stage development through production and release, you’ll unlock powerful new ways of clearing even the toughest programming hurdles.

Our applications are bombarded with data. It’s hard enough to derive state from that data, let alone discover how we arrived at that state. With event sourcing you can treat the stream of data as a simple sequence of events that you use to construct whatever state you need. Event sourcing is more than events; it adds patterns, rules, and constraints to produce robust and easy-to-maintain systems. In this book, you’ll learn which rules can never be broken and which ones are flexible. By grounding yourself in theory, rules, and practical approaches, you’ll be able to build real-world, event-sourced applications.

Get your hands dirty with fundamental event-sourcing building blocks such as commands, aggregates, projectors, process managers, injectors, and notifiers. Combine these building blocks to produce elegant solutions to complex problems. Leave “hello world” far behind as you tackle the more advanced aspects of event sourcing that give you the confidence you need to run these applications in production. Leverage event sourcing to create distributed applications with ease; model and handle failure; and deal with replays, schema evolution, security, and much more.

This book doesn’t shy away from confronting the hard parts of event sourcing, instead giving you clear advice and examples for tackling the most difficult details.

Empower your applications with the full force of event sourcing today.


Kevin Hoffman is the Engineering Director for Cloud Services at Synadia, the company behind NATS, a popular messaging and streaming server. Kevin specializes in distributed applications and has made enough event sourcing mistakes on his own to fill a book with what he’s learned and experienced.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

21 Likes

No expert on the topic so can’t comment on the content per se, but I read the first two chapters and must compliment the experience so far.

The book gently introduces event sourcing, points out pitfalls, gradually builds up the pace and simultaneously is engaging to read. Kudos @autodidaddict

More personally, this way of modelling data and state seems to intuitively ‘click’ for me. Now I just need a good reason to use it in the real world (:

7 Likes

Glad you’re enjoying it! Comments like this make all the hard work worth it

4 Likes

Hello Kevin, commend you on tackling a challenging topic.

  1. Are you using any popular libraries such as incident?

  2. In what way will this book be different from other books that tackled ES. Such as the “building conduit” book

https://leanpub.com/buildingconduit/read#leanpub-auto-testing-user-registration-validation

  1. Will you also cover the more complicated but important areas such as PM and sagas, as well?

  2. Hope you can also offer your opinions on how to architect an ES system as well.
    Thanks

1 Like

Looking forward to reading this as well.

1 Like

Just finished reading the book. Concepts were presented with clarity. I was able to type in and run pretty much all the code in the book and it worked!

However, missed a chapter on deploying such system in production. Is there any plan to include such a chapter in future?

I myself was playing with this guide - Deployment — Commanded v1.4.6 and was able to setup a multi-node cluster using global registry. However, this part did not work as expected - Running on a cluster of nodes — EventStore v1.4.6

After doing the clustering I was getting all event generated 3 times as I think each node was executing the same commands/events. May be the application needs to be modified to be cluster aware to avoid this? but no idea at this point how!

In any case, thanks for writing this unique book using Elixir language!

1 Like

Any idea how to solve the above mentioned problem @autodidaddict? Thanks!