Re:Building a highly-available web service without a database
by tdrhq on Sunday August 11, 2024 @09:40AM
(#41216073)
I haven't seen either of these! But I have to say, my inspiration here came from existing libraries. (My only innovation here is taking an existing library that did the whole transaction log thing, and putting it behind a Raft cluster.)
The batching thing is something we can easily do with the library that I'm using. It allows us to define functions as arbitrary transactions. Within the transaction I can do anything that changes state, including changing multiple fields, so we don't have to keep flushing the log after every field.
1. I take it you've seen the LMAX talk [0], and were similarly inspired? :)
2. Are you familiar with the event sourcing approach? It's basically what you describe, except you don't flush to disk after editing every field, you batch your updates into a single "event". (you've come at it from the exact opposite end, but it looks like roughly the same thing).
[0] https://www.infoq.com/presentations/LMAX/