News for hackers. Stuff that matters.
Re:A generalised solution to distributed consensus by ccleve on Saturday March 09, 2019 @10:48PM (#19350063)
Yes.

I did two implementations, one with plain text files and one with a kv store. For plain text files, I had to maintain file offsets of the records so I could traverse backward and truncate records that had to be replaced, and then break the files into segments so I could retire segments that are no longer needed. It had all kinds of little bugs.

Then I reimplemented using a kv store, and it took a tiny fraction of the time. And surprisingly had better performance.

Just create a good interface at the start, use the kv store underneath, and then later if you don't want the dependency swap it out for the more complicated code.

Re:A generalised solution to distributed consensus by bch on Saturday March 09, 2019 @11:45PM (#19350333)
Cool - I’d like to talk about your design and how you arrived at it if you’re interested.
Re:A generalised solution to distributed consensus by ccleve on Monday March 11, 2019 @11:56AM (#19359903)
Happy to. I just added my email address to my profile.