Grokzen / redis-py-cluster

Python cluster client for the official redis cluster. Redis 3.0+.
https://redis-py-cluster.readthedocs.io/
MIT License
1.1k stars 315 forks source link

Build a new ClusterManager class/mechanism #390

Open Grokzen opened 4 years ago

Grokzen commented 4 years ago

So right now there is a mix of server management commands or other command that is usually unrelated to normal redis-server operations like GET/SET/LISTS/HASH/ZSET/GEO and more. Some command and features is more used in the administration side of things for a redis cluster and then you should not really be using them in a normal cluster client usage anyway.

In the past there has been a similar class like this that would facilitate cluster management and other separate commands but that feature was removed as it was merged into the main RedisCluster client class. But since we still have commands remaining inside the client that is blocked that should really be sorted out and a implementation that works for all commands should be sorted out.

One of the main problems with the RedisCluster client is that a lot of the management style commands have to make a decision of what cluster implementation that you want to use to execute the function and make a decision on the data side of things.

This change would facilitate both solutions as it would provide some default execution logics for any management function but it would also expose different methods and features for the client user to easily implement their own cluster logic based on their own needs.