This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Description
Why you need it?
Now dfget gets the list of supernodes from configuration file or command line parameters.
It's inconvenient to update the list or
- inconvenient to update client's configuration when scale up or scale down the supernodes cluster.
- cannot customize the selection logic that better fits the user's scenario
How it could be?
Dragonfly defines the interface how to get supernodes and provides a default implementation that get supernodes from config/CLI. Then users can write a new implementation to select supernodes.

SupernodeLocator is defined interface which dfget's core flow invokes
StaticLocator is the default implementation Dragonfly provided
DynamicLocator is a user customized implementation for example:
- it get supernode from
StaticLocator firstly, and return it to caller if exists
- otherwise, it get the list of supernodes from remote manager and store the result into local cache for next time
Other related information