Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denismakogon/15561df6dc5ddc60ba74 to your computer and use it in GitHub Desktop.
Save denismakogon/15561df6dc5ddc60ba74 to your computer and use it in GitHub Desktop.
python-troveclient clustering framework refactoring
Modify existing:
trove create -----> trove instance-create
Propose new:
Taking into account different clusterable datastores we need to find
proper way to send valid actions at the same time
(for mongodb - "add_shard", for cassandra - "add_node", etc.)
Options:
trove cluster-scaleup <cluster_id> <action>
Example:
trove cluster-scaleup UUID add_shard
Pros:
Generic framework.
Cons:
Need to know if action is valid.
API should raise exception is given action is not valid for cluster datastore type.
trove <datastore>-cluster-<action> <cluster_id>
Example:
trove mongodb-cluster-add-shard UUID
trove cassandra-cluster-add-node UUID
Pros:
Generic framework.
Client sets proper action.
Cons:
API should raise exception is given action is not valid for cluster datastore type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment