Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate not Using ZK C Library #67

Open
tgockel opened this issue Jan 19, 2018 · 0 comments
Open

Investigate not Using ZK C Library #67

tgockel opened this issue Jan 19, 2018 · 0 comments

Comments

@tgockel
Copy link
Owner

tgockel commented Jan 19, 2018

The C library is fine for starters, but it might not be a great long-term solution.

  • There is no way to implement Logging Hooks #21: The log_callback_fn has the signature void (*)(const char *message) with no way to associate a user context. This means we cannot do per-connection logging...or really anything but a global. This might be fine if the log callback function could be set without a zhandle (set via either zookeeper_init2 or zoo_set_log_callback)
  • The watch callback code is horrendously hacky and probably not thread-safe. It might not leak memory, but the code is so damn convoluted it's hard to tell.
  • All the adapter code looks horrible, but the transaction layer is especially bad.
  • The connection interface described in AFIO-like connection interface #66 seems quite difficult/impossible to implement using the C library.
  • It is the only dependency in the software.

Obviously, walking away from the battle-tested C library is a huge disadvantage here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant