Live data from Hacker News

Event Sourcing Is Hard (2019)

chriskiehl.com

121–126 of 126 posts

Re: Event Sourcing Is Hard (2019)

#121
post #101

Earlier quoted context omitted.

Oh yes same here. I wrote a code generator that wrote all the code in the end. Now I maintain a shitty code generator. You can’t win. I think you eventually run out of fucks. I have.

That's when you write a fuck generator, so fucks can be given automatically on your behalf while you fuck off somewhere else.

Now that’s genius automation :)

Re: Event Sourcing Is Hard (2019)

#122

Earlier quoted context omitted.

Its honestly not that hard to build a WAL-style solution exactly the way you want it for your own application. You just have to get away from the "you shouldn't write your own xyz" boogeyman experience long enough to figure it out. Do you know how to model your events using a type system? Can you be bothered to implement a Serialize and Deserialize method for each event type, or simply use a JSON serializer? Do you k…

100% agree. I only used wal2json because my risk tolerance for the project was between "can't be bothered to pay the onboarding/maintenance cost of Kafka for Debezium" and "can't be bothered to implement a reader for the (well documented IIRC) stable binary WAL format" which is a weird spot to be in. This was a PoC written meant to demonstrate how we could implement the features we needed from ES using no more than s…

> "can't be bothered to pay the onboarding/maintenance cost of Kafka for Debezium"

Debezium can also be used without Kafka; either via Debezium Engine [1], where you embed it as a library into your JVM-based application and it will invoke a callback method you registered for every change event it receives. That way, you can react to change events in any way you want within your application itself, no messaging infrastructure required. The other option is using Debezium Server [2], which takes the embedded engine to connect Debezium to all sorts of messaging/streaming systems, such as Apache Pulsar, Google Cloud Pub/Sub, Amazon Kinesis, Redis Streams, etc.

[1] https://debezium.io/documentation/reference/stable/developme...

[2] https://debezium.io/documentation/reference/stable/operation...

Re: Event Sourcing Is Hard (2019)

#123
I worked on an event sourced system once, many years ago.

I'm not saying I hate the separation of write and read models, and all the challenges that brings (heck, the platform I'm working on now does that, and it's not a big deal), but it was massively bloated and overly complex for a system that would collect some data from users, submit it to a panel of third party services, and display results back to those users.

The reasons for going this route were complex, and not entirely clear to me, although I can pick on two: firstly, they'd run into performance and scalability issues with their existing CRUD-ish SQL Server-backed implementation and, secondly, Thoughtworks told them it would be a good idea.

I don't want to handwave this away but I've encountered enough insoluble SQL Server performance issues over the years to be confident those issues could have been solved much more simply (and the same is likely true for Oracle, Postgres, et al). I'm not suggesting that intractable performance issues don't exist on relational platforms, just that most times people think they've encountered one, they're mistaken.

Would I use event sourcing again? Maybe. But I'd need a really strong use case for it, and I'd certainly kick the tyres on any technical organisation that was using it before I joined.

Re: Event Sourcing Is Hard (2019)

#124

As this article pops out again, I'd like to the point that although it may have some valid points, those points are not about Event Sourcing. What's expressed in the article is the Event Streaming or Event-Driven approach. So when events are not the source of truth etc. All of the event stores that I know supports strong consistency on appends, optimistic concurrency. Many guarantee global ordering. Some help in idem…

I wrote the summary of my thoughts on this article: https://event-driven.io/en/event_streaming_is_not_event_sour...

Re: Event Sourcing Is Hard (2019)

#125
post #18

Silly question: isn't the way you're supposed to handle the observer pattern thing to be that you can follow processing chains using correlation IDs? Ie. the initial event of a dataflow gets tagged with a unique ID and then there's some database magic that lets you track that ID through the system? Like, I can see where that would go wrong once you merge multiple events together, but that seems a different failure po…

"Database magic" is worrisome

Eh, you could do it manually by hanging a projection on $all and republishing to streams per correlation id. But it's cheaper to let the db do it internally.

Re: Event Sourcing Is Hard (2019)

#126
post #18

Earlier quoted context omitted.

"Database magic" is worrisome

Eh, you could do it manually by hanging a projection on $all and republishing to streams per correlation id. But it's cheaper to let the db do it internally.

So it's not a strict dependency, more in the spirit probably of an optimisation: "here's how you own it, but most people let the substrate do it for you..." type thing.
Post reply on HN