[infinispan-dev] Distributed Counter Discussion

Pedro Ruivo pedro at infinispan.org
Mon May 16 09:49:40 EDT 2016


Hi all,

This is an update email.

I've just made a preview for the distributed counters. You can find it 
in [1]

In this initial version I'm targeting a more consistent approach because 
it covers a large uses cases (you'll lose on performance) and it's easy 
to test. All the updates are performed atomically, the return value is a 
consistent and it doesn't lose values. It supports limits, notifications 
and resets.

Since performance is a hot topic (there is no free lunch unfortunately) 
and an eventually consistent counter fits in a bunch of uses cases, I'm 
planning to add another counter manager with this properties. But I'll 
have to remove the reset (it is not commutative with inc/dec) and take 
advantage of the functional API (without locking) to have CRDT 
properties. Does it make sense to you?

Another task missing is comparing the performance between all the 
implementations available and check if it match with the theory above.

Any feedback is more than welcome since there are a quite few things to 
keep track on.

Cheers,
Pedro

[1] https://github.com/infinispan/infinispan/pull/4350

On 04/07/2016 02:12 PM, Tristan Tarrant wrote:
> On 07/04/2016 15:06, Sanne Grinovero wrote:
>> For the "eventually consistent" case, returning a local value might be
>> fine but you'd need to define also how writes are merged and what
>> guarantees it aims to provide (or which we want to intentionally
>> ignore)
>
> Fortunately a counter has commutative ops, so order is unimportant and
> it makes things so much easier ;)
>
>> And what about the sequence use case? I guess it can wait, just
>> tracking the need for that too.
>
> Yes, that is a separate thing as it needs far stricter guarantees.
>
> Tristan
>


More information about the infinispan-dev mailing list