You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by C Scott Andreas <sc...@paradoxica.net> on 2014/06/17 19:29:51 UTC
ZooKeeper C++ Client
Hello,
Is there a modern, tested, and recommended C++ client for interacting with
ZooKeeper? I've seen a few references around the web to spikes toward an
implementation and a couple examples on GitHub, but am not aware of many in
active use. I'd be interested to hear if anyone's aware of current work in
this area.
The zkfuse package in contrib wraps the C client but appears purpose-built
and does not ship with a test suite. Canonical examples of use of the C
bindings also seem rare; it looks like the docs are marked TBD
<http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html#ch_programStructureWithExample>
–
though Flavio's written a very helpful example
<https://github.com/fpj/zookeeper-book-example/tree/master/src/main/c>
distributed
with the O'Reilly book for 3.5.x. If there is not a preferred C++ example,
is there a particularly high-quality wrapping of the C lib that's
recommended as a starting point for implementing one?
Thanks,
– Scott
Re: ZooKeeper C++ Client
Posted by Yan Xu <ya...@jxu.me>.
Hi Scott,
Yes Apache Mesos uses ZooKeeper for leader election and membership
detection. You can take a look at
https://github.com/apache/mesos/tree/master/src/zookeeper to see if it
suits your needs and send your questions to user@mesos.apache.org
Even though we don't currently distribute our zookeeper wrapper as a
standalone library, it should be fairly easy to separate it out. It depends
on https://github.com/apache/mesos/tree/master/3rdparty/libprocess which
you can link statically.
https://github.com/apache/mesos/blob/master/src/Makefile.am shows a few
examples of integrating libprocess.
- Yan
---
Jiang Yan Xu <ya...@jxu.me> | @xujyan <https://twitter.com/xujyan>
On Tue, Jun 17, 2014 at 10:31 AM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:
> I know Mesos uses ZooKeeper and it was written in C++. But, I haven’t
> looked closely at how they use it.
>
> -JZ
>
>
> From: C Scott Andreas scott@paradoxica.net
> Reply: user@zookeeper.apache.org user@zookeeper.apache.org
> Date: June 17, 2014 at 12:30:18 PM
> To: user@zookeeper.apache.org user@zookeeper.apache.org
> Subject: ZooKeeper C++ Client
>
> Hello,
>
> Is there a modern, tested, and recommended C++ client for interacting with
> ZooKeeper? I've seen a few references around the web to spikes toward an
> implementation and a couple examples on GitHub, but am not aware of many in
> active use. I'd be interested to hear if anyone's aware of current work in
> this area.
>
> The zkfuse package in contrib wraps the C client but appears purpose-built
> and does not ship with a test suite. Canonical examples of use of the C
> bindings also seem rare; it looks like the docs are marked TBD
> <
> http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html#ch_programStructureWithExample
> >
> –
> though Flavio's written a very helpful example
> <https://github.com/fpj/zookeeper-book-example/tree/master/src/main/c>
> distributed
> with the O'Reilly book for 3.5.x. If there is not a preferred C++ example,
> is there a particularly high-quality wrapping of the C lib that's
> recommended as a starting point for implementing one?
>
> Thanks,
>
> – Scott
>
Re: ZooKeeper C++ Client
Posted by Yan Xu <ya...@jxu.me>.
Hi Scott,
Yes Apache Mesos uses ZooKeeper for leader election and membership
detection. You can take a look at
https://github.com/apache/mesos/tree/master/src/zookeeper to see if it
suits your needs and send your questions to user@mesos.apache.org
Even though we don't currently distribute our zookeeper wrapper as a
standalone library, it should be fairly easy to separate it out. It depends
on https://github.com/apache/mesos/tree/master/3rdparty/libprocess which
you can link statically.
https://github.com/apache/mesos/blob/master/src/Makefile.am shows a few
examples of integrating libprocess.
- Yan
---
Jiang Yan Xu <ya...@jxu.me> | @xujyan <https://twitter.com/xujyan>
On Tue, Jun 17, 2014 at 10:31 AM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:
> I know Mesos uses ZooKeeper and it was written in C++. But, I haven’t
> looked closely at how they use it.
>
> -JZ
>
>
> From: C Scott Andreas scott@paradoxica.net
> Reply: user@zookeeper.apache.org user@zookeeper.apache.org
> Date: June 17, 2014 at 12:30:18 PM
> To: user@zookeeper.apache.org user@zookeeper.apache.org
> Subject: ZooKeeper C++ Client
>
> Hello,
>
> Is there a modern, tested, and recommended C++ client for interacting with
> ZooKeeper? I've seen a few references around the web to spikes toward an
> implementation and a couple examples on GitHub, but am not aware of many in
> active use. I'd be interested to hear if anyone's aware of current work in
> this area.
>
> The zkfuse package in contrib wraps the C client but appears purpose-built
> and does not ship with a test suite. Canonical examples of use of the C
> bindings also seem rare; it looks like the docs are marked TBD
> <
> http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html#ch_programStructureWithExample
> >
> –
> though Flavio's written a very helpful example
> <https://github.com/fpj/zookeeper-book-example/tree/master/src/main/c>
> distributed
> with the O'Reilly book for 3.5.x. If there is not a preferred C++ example,
> is there a particularly high-quality wrapping of the C lib that's
> recommended as a starting point for implementing one?
>
> Thanks,
>
> – Scott
>
Re: ZooKeeper C++ Client
Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
On 17 June 2014 10:31, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
> I know Mesos uses ZooKeeper and it was written in C++. But, I haven’t
> looked closely at how they use it.
>
They have wrapper classes, albeit this is not factored out as a separate
library. I.e.:
https://github.com/apache/mesos/blob/master/src/zookeeper/zookeeper.cpp
Maybe it could be?
-rgs
Re: ZooKeeper C++ Client
Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
I know Mesos uses ZooKeeper and it was written in C++. But, I haven’t looked closely at how they use it.
-JZ
From: C Scott Andreas scott@paradoxica.net
Reply: user@zookeeper.apache.org user@zookeeper.apache.org
Date: June 17, 2014 at 12:30:18 PM
To: user@zookeeper.apache.org user@zookeeper.apache.org
Subject: ZooKeeper C++ Client
Hello,
Is there a modern, tested, and recommended C++ client for interacting with
ZooKeeper? I've seen a few references around the web to spikes toward an
implementation and a couple examples on GitHub, but am not aware of many in
active use. I'd be interested to hear if anyone's aware of current work in
this area.
The zkfuse package in contrib wraps the C client but appears purpose-built
and does not ship with a test suite. Canonical examples of use of the C
bindings also seem rare; it looks like the docs are marked TBD
<http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html#ch_programStructureWithExample>
–
though Flavio's written a very helpful example
<https://github.com/fpj/zookeeper-book-example/tree/master/src/main/c>
distributed
with the O'Reilly book for 3.5.x. If there is not a preferred C++ example,
is there a particularly high-quality wrapping of the C lib that's
recommended as a starting point for implementing one?
Thanks,
– Scott