yfinkelstein / node-zookeeper

node.js client for Apache Zookeeper
MIT License
479 stars 111 forks source link

Transactions support #320

Open alexbidiuk opened 2 years ago

alexbidiuk commented 2 years ago

There is no support of Transaction class

Do you have plans of implementing it?

DavidVujic commented 2 years ago

Hi @alexbidiuk, this looks interesting. What is it used for?

alexbidiuk commented 2 years ago

@DavidVujic , it's just a wrapper to invoke multiple commands in atomic way.

Usage depends on your business logic needs. For example I used it to remove some subtree, starting from children, because other way race conditions were happening

DavidVujic commented 2 years ago

Thank you for explaining @alexbidiuk!

Usually, this library is aiming to keep up with the features in the official ZooKeeper C Client. But I agree this kind of feature would be useful, and if it is possible to develop it using Node.js (wrapping the basic C Client functionality) I think it would be a great addition.

I'll add the feature request label to this issue. It might also be related to the feature request described in #229.