Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's sort of a middle ground between event sourcing and ordinary mutable entities: versioned entities.

http://higherlogics.blogspot.com/2015/10/versioning-domain-e...

The particular schema described there isn't suitable for highly concurrent entities, but a more suitable schema could be employed that achieves the same goals.



We did something similar to this for a CRUD app that needed to become append only, have a full change log, have approve/deny events, and the ability to be rolled back. We still had an event table, but instead of having event data it just had a reference to a 'shadowed' (versioned) entity in the entity table. Once an event is approved, you project the shadowed entity on to the real one. That way the ID of the real entity never changes. This worked really well for our very specific use case (simple CRUD events, monolithic app.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: