Andrew Kornev commented on ZOOKEEPER-38:

While JIRA comments is not the best place to discuss basics of object-oriented 
design, I'd like to point out that interfaces are not about "pluggability" and 
the number of potential implementations is not an indication of whether or not 
an interface should be introduced. I highly recommend the reviewer take another 
look at Design Patterns by GoF (chapters 1 and 2) and Emergent Design by Scott 
L. Bain just to name a few (both of them are available on Safari).

I also recommend the reviewer take a look at the unit tests included with the 
patch. There, one can see how loose coupling (achieved thru the use of 
interfaces, among other things) improves testability of the code. It is now 
possible to unit test classes individually and in isolation -- something that 
has never been possible with the existing zookeeper code before.

Wrt point 4, I'll update the code to use the URL class instead.
Wrt point 5, if I understand the question correctly, what if we want to run 
multiple zookeeper servers within the same JVM and you want to be able to 
associate different providers with each of those servers? Besides, we get this 
feature essentially for free. There is one extra line of code (the while() 
statement) that deals with loading multiple providers.

> headers (version+) in log/snap files
> ------------------------------------
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to