Git Product home page Git Product logo

Comments (6)

Grokzen avatar Grokzen commented on August 17, 2024

@iandyh If you would do this, do you have a plan for how to do it? Would you make a specialized class that just have these commands so that you do not accidentially use them in normal operation mode?

Also do you mean to just give the ability to use these commands and not reimplement the tool redis-trib.rb that can do alot more than just use these basic commands?

from redis-py-cluster.

iandyh avatar iandyh commented on August 17, 2024

@Grokzen For the first question, I haven't thought too much about the implementation yet. If it will be a specific class, naming it will be difficult: RedisClusterCluster looks weird to me. :) It might be look like rc = RedisCluster(); rc.cluster.slots().

For the second question, the reason why some cluster commands are needed is because I need to write a tool to manage the cluster. e.g. Add 10 new nodes to the cluster and move some slots to these new nodes. To achieve this, at least the cluster slots command is necessary to avoid parsing the raw results from redis-trib.rb. And the rest operations can be done via redis-trib.rb though. So the commands which retrieve information from cluster are on top priority.

from redis-py-cluster.

Grokzen avatar Grokzen commented on August 17, 2024

About the name, i could go for something like ClusterMgmt or RedisClusterMgmt or something similar.

It should not be that big of a problem to implement this class from what i see in the docs at redis.io In most cases i can just make the function with a similar name and make them as simple as possible and let the caller handle as much logic as possible.

I will see if i can get some testable code up and running in a few days or so.

from redis-py-cluster.

iandyh avatar iandyh commented on August 17, 2024

@Grokzen #73 I made a quick implementation so we can have something to discuss on.

from redis-py-cluster.

Grokzen avatar Grokzen commented on August 17, 2024

@iandyh I will have a look at it later tonights

from redis-py-cluster.

Grokzen avatar Grokzen commented on August 17, 2024

@iandyh Closing this based on the merged PR #73

from redis-py-cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.