Quantcast
Channel: User user1944408 - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Eventualy consistent distributed database with idempotent increase operator?

$
0
0

Is there a distributed high availability, eventually consistent db that supports idempotent operation on scalar values?

If we use normal updates then there is a possibility that we will have 2 different values on different nodes and none of the values would be correct because we need to increase amounts by both transaction values.

Is there a distributed db where I can send a command increase(key, attribute[column], diff) so that when I receive a response I can be sure that that operation will be executed on other replicas regardless of the current value of the account? In that way I will have eventual consistency for increase operation even if 2 different nodes are increased by a different value because that increase would propagate to other replicas.

I am not talking about conditional updates as it would not work on high availability db like cassandra (that's why they don't have that feature), I am interested in atomic increase operation.

Thanks.

P.S.In the case of idempotent increase I would have a command increase(key, attribute, diff, lock_key) so that db wouldn't do increase if it already received the same command with the same lock_key

tl;dr:

Is there a way to make a precise counter in distributed AP kind database? 2 problems:1) If I send operation to increase a counter and I don't get response I would send that request again but do not want to increase the counter twice.2) If that counter is updated in the same time on another replica I would like to eventually combine this increases, not to overwrite the values.So is there a command like increase("John's balance", +5.67, "sdfsdfas") where sdfsdfas is a string used to discard duplicate update. Is there a db that replicates this kind of commands?


Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>