Closed
Description
This issue is just opened to purpose to put together related pull requests. It will be closed when they are merged or closed.
- feat: support transaction #277
- Fix MULTI transactions calling the block twice #294
- Support watch & unwatch properly #295
- Implement "pinning" cluster connection to a single node -
RedisClient::Cluster#with
#298 - Considerations:
- the determination of the node that the transaction should be sent to
- The client can't determine the node until the first command included keys is passed.
- the handling redirects duaring the resharding
- The client should not redirect any errors caused by user side bugs.
- the optimistic locking with the watch command
- The watch command can watch multiple keys. However it should be called to a single node in a sharded cluster. So in practically, it allows only keys to a single slot.
- the key validation
- There is a discussion whether should do it proactive or reactive.
- I think the client doesn't need the proactive validation if the server do the strict validation.
- the compatibility between the redis-clustering gem
- I think the redis-cluster-client gem should not be complex in excess due to the redis gem.
- the design
- We should keep the interface same as the redis-client as possible.
- We shouldn't bring any complexity to the code base just for the feature. Once the code messed up, we'll be hard to maintain it.
- Of cource all bugs should be fixed.
- Our gem shouldn't affect in excess by the redis-clustering gem.
- the determination of the node that the transaction should be sent to