Open haadcode opened 8 years ago
The CRDT needed for this was implemented recently by @shamb0t. To implement it here, one can follow the G-Counter as a template.
This would be a great task for first time contributors and would be highly valuable feature!
CounterStore currently supports only increase operations
inc(value)
. It should also support decrementsdec(value)
.This can be done by implementing a PN-Counter in https://github.com/haadcode/crdts and adding appropriate interface to CounterStore.
PN-Counter works like this: https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type#State-based_PN-counter