Transaction using aerospike

Hi experts,

I am a newbie on Aerospike world. please help me with following query.

What is the best way to handle transaction on aerospike and which client should be the preferred one?

What is my transaction?

  1. Get the current value of the given key
  2. Check the given value is greater then or equal to current value.
  3. If the answer is yes from point (2) deduct the given value with current value.

I can perform the above steps using lua scripts but the performance of lua script is not great. is there is any alternative to it.

Preferred client ? golang or node js.

I believe you are looking for the “Read-modify-write” pattern: http://www.aerospike.com/docs/client/java/usage/kvs/write.html#read-modify-write

This is also discussed here: