Hey guys,

Here is my first set of feedback, thought I should start this in
chunks rather than all in one go, so picking 3 items at a time.

Connection Management

* HelixConnection seems like it belongs to API
* ZKHelixConnection is a specialization specific to Zookeeper
* We need an factory pattern which allows creating Connections based
on a provider-type. A provider type could be an enum which has
Zookeeper to begin with and we can add other types later. The factory
should be a part of SPI, one implementation of SPI is Zookeeper.
* Should the zkAddress be a String? Should it be a special type like
HelixProviderURL? Having something like String requires us to document
it clearly but having a a specialization like a HelixProviderURL
allows a guided building of such URL. Not sure if its an overkill but
If we use a provider URL we should allow creating them through a
builder pattern.
* We need to declare exceptions when connect fails
* We need to allow for a time delay for the shutdown, something like a
future.get(timeout)


Get an Administrator

* HelixAdministrator seems too generic, it should be
HelixClusterAdministrator given that its an admin for that cluster?
* We should have a HelixAdministrator which can be an administrator to
all clusters. How should we retrieve such an administrator?
* Having to get a connection first and then getting admin object seems
inverted. Why not allow
HelixAdmin.create(HelixProviderURL).getConnection(). It should return
a specialization of the HelixConnection i.e. HelixAdminConnection. We
could then hang specific privileges on the HelixAdminConnection and
not have them on the HelixConnection.
* What happens if an administrator is already created? Should we allow
two administrators?

Resource Create

* ResourceConfig seems like API
* Should we go all the way ResourceConfiguration instead of ResourceConfig?
* ResourceConfigBuilder should have
ResourceConfig.Builder().withId("string") and the remaining should
follow like in the example
* RebalancerConfig seems like API
* Can we figure RebalancerConfig with types? So we dont have three
versions we leverage a type to generate/assemble a builder?
* How do we determine if the resource is already added? That should
dictate the exception.

I think  I will pause and wait for some responses/feedback on how this
medium of feedback feels before I move forward.

Thanks,

Sandeep

Reply via email to