"Accumulator" convergent data type
jmeredith at basho.com
Wed Oct 7 10:02:25 EDT 2015
Conceptually I think it should work - the same PN counter design could
handle floats as well as integers. You'd have to make sure the P and N
values only grew by handling the sign - if you want to add a negative float
you would do N += abs(V). There are also concerns around error bounds and
all those kinds of things you deal with in floats. I'll risk stating the
obvious and say you could do fixed point stuff with the existing counters
if you multiply / divide by a scale factor on store/retrieval
On Wed, Oct 7, 2015 at 7:40 AM Emyr James <ej4 at sanger.ac.uk> wrote:
> This is more of a question for developing riak as opposed to using it,
> anyway I thought it worth asking.
> You have the "Counter" convergent datatype which allows increment and
> decrement of arbitrary integer values.
> Would it be possible to implement an "Accumulator" datatype which would
> be a floating-point equivalent of counter and allow increment and
> decrement by arbitrary floating point values ?
> The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a
> company registered in England with number 2742969, whose registered
> office is 215 Euston Road, London, NW1 2BE.
> riak-users mailing list
> riak-users at lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users