orbitdb-archive/ipfs-log

Pass in own sorting / tie breaking function

aphelionz opened this issue · 10 comments

From: ipfs-inactive/dynamic-data-and-capabilities#50

Remove lamport clocks as the implicit tie breaker and instead make it a configuration. The reason is that lamport clocks occupy a lot of space when there are a lot of replicas, which is unnecessary in some use-cases, such as the one in Discussify

@satazor Which issues will you be tackling first? I'm going to be working on these as well, starting with this one.

In parallel to all these issues, I’m leading an identity effort on the IPFS DDC WG as well as some other stuff such as recording a video about the status of discussify and preparing a workshop that I will be giving next week. This to say that I will be doing a lot of stuff “concurrently”.

I need to first analyze the codebase and ideally I would pick an easier one first. Which one do you think it’s the best?

Great question.

What about one of these two:

#200 seems easy, but it will be a breaking change. Is it a problem to start with this one?

Not a problem at all. Personally I'm excited to see what comes of it w/r/t CBOR.

@satazor I have this working in theory. Do you have an example of a function you'd want to pass in instead of the default LastWriteWins to write some unit tests with?

@aphelionz I believe @satazor wanted something like described in ipfs-inactive/dynamic-data-and-capabilities#50 (comment). As to a specific function, dunno exactly what to compare :)

I just made it the last argument of the Log constructor. I'll just make a PR now and y'all can have at it :)