HNHacker News
TopNewBestAskShowJobs

ouro

11 karma · joined January 7, 2017

submissionscomments
ouro··on Domain-Driven Design
If you are doing CRUD in DDD ... "You are doing it wrong"
ouro··on Event Sourcing is Hard
I am completely confused by your description ...

I have also not used a 2pc transaction coordinator in well over a decade.

Also you use the term "saga" which is correct in that what people are often doing here is not in fact a saga (which actually has a pattern description) it is usually a process manager which is a different pattern.

ouro··on Event Sourcing is Hard
I have actually written a book on this.

Its not that hard to deal with. Dealing with it through ad-hoc "we will come up with something as we go along" can be a bit of a pain though. It is in fact fairly trivial to handle if some thought is put into it.

ouro··on EventStore: Open-Source, Functional Database with Complex Event Processing in JS
To be fair I have been talking about event sourcing for over a decade. The concepts have been around far longer than that. In fact most databases "event source" their own internal structures.

There is however benefit to modelling a system in that way and not just an internal transaction log. I have done many talks on the subject and you should be able to pull one up on youtube etc fairly quickly (its a bit much to go through in a comment).

ouro··on How to Handle Monetary Values in JavaScript
I might suggest reading https://doc.lagout.org/science/0_Computer%20Science/3_Theory...

This is in general how floating point math works.

ouro··on Building a CQRS/ES web application in Elixir using Phoenix
my answer above ^^ assumes we really want to remove it. compensating actions are generally the preferred option
ouro··on Building a CQRS/ES web application in Elixir using Phoenix
I can see why your projects failed. That EventStore does not support you editing an event is not something that makes it "not production ready" it is in fact a feature that keeps you from doing stupid things.

If you go and edit an event, how do subscribers receive that edit? Let's imagine I have a projection updating a sql db and you now edit an event,how will this projection receive the edit?

"We had no solution for this problem in prod. How would you fix an event that should not have gotten in to the store? (Wrong contract, bad data etc) I understand it shouldn't happen, but in the real world all kinds of things go wrong."

You should do some more research into eventsourced systems as there are patterns for handling these exact scenarios. http://files.movereem.nl/2017saner-eventsourcing.pdf discusses some. In your scenario the most common is read the problem stream out, write it to a new stream (with any changes that you want) then either delete the old stream or leave a last event in the old stream saying it has been migrated to the new stream.