Thiruvalluvan M. G. commented on ZOOKEEPER-793:

I've not gone into the actual logic of this implementation. The following 
comments are based on the common C++ best practices.
   - The main interface Client uses the pimpl idiom, which is great. Is it 
possible to separate interface and the implementation? This will help our 
clients to unit test their wares without a server by mocking the interface.
   - The client should be non-copyable. The simplest way to do it is to 
privately derive from boost::noncopyable. With the current implementation, a 
copy of client will cause the Impl destructed twice. I guess Publisher and 
Subscriber should also be made non-copyable.
  - Some non-const references are being passed, where, I think, const reference 
is intended. E.g. Publisher::asyncPublish's callback parameter.
  - Client class does not follow the "rule-of-three": 
  - Herb Sutter advices to "Avoid Exception Specifications" - Item 75 in 

I don't have a Linux box handy. I'll get one and try this out.

> Large-scale Pub/Sub System (C++ Client)
> ---------------------------------------
>                 Key: ZOOKEEPER-793
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-793
>             Project: Zookeeper
>          Issue Type: Sub-task
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>         Attachments: hedwig-cpp-0.1.tar.gz
> Write a c++ client for hedwig

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