orbitdb-archive / ipfs-log

Append-only log CRDT on IPFS
https://orbitdb.github.io/ipfs-log/
MIT License
398 stars 55 forks source link

Pass in own sorting / tie breaking function #204

Closed aphelionz closed 5 years ago

aphelionz commented 5 years ago

From: https://github.com/ipfs/dynamic-data-and-capabilities/issues/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

aphelionz commented 5 years ago

cc @satazor

aphelionz commented 5 years ago

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

satazor commented 5 years ago

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?

aphelionz commented 5 years ago

Great question.

What about one of these two:

satazor commented 5 years ago

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

aphelionz commented 5 years ago

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

aphelionz commented 5 years ago

@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?

haadcode commented 5 years ago

@aphelionz I believe @satazor wanted something like described in https://github.com/ipfs/dynamic-data-and-capabilities/issues/50#issuecomment-440245307. As to a specific function, dunno exactly what to compare :)

aphelionz commented 5 years ago

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 :)

aphelionz commented 5 years ago

@satazor @haadcode https://github.com/orbitdb/ipfs-log/pull/209