-
Notifications
You must be signed in to change notification settings - Fork 434
FAQ
Curator is a set of Java libraries that make using Apache ZooKeeper much easier. While ZooKeeper comes bundled with a Java client, using the client is non-trivial and error prone.
The existing Java clients are difficult to use and are limited. There are good clients for languages other than Java (Scala, etc.)
Curator is focused on the recipes: locks, leaders, etc. Most people interested in ZooKeeper don't need to be concerned with the details of connection management, etc. What they want is a simple way to use the recipes. Curator is directed at this goal.
- Very poor documentation (is there any?)
- Recipes/management code highly coupled
- Error handling is very weak (everything becomes RuntimeException)
- Hard-coded/minimal retry mechanism
- Only a few recipe implementations out of the box
- Unclear if it's still being supported
(class ZooKeeper that ships with the distribution)
- Very low level
- Requires a great deal of extra work to use correctly
- Very difficult to use correctly
- You must manually manage connection loss, retries, etc.
(WriteLock in the recipes directory):
- Not a very good implementation
- Has many problems:
- Uses session id as lock node reference (this should be a UUID)
- Retry mechanism is hard coded
- No checks for initial connection
ZooKeeper clients are very difficult to write correctly. It is distributed as a low level implementation. You must manually manage connections, recoverable exceptions, etc. The recipes are not trivial to write. In fact, the lock recipe as it's currently documented is incorrect!
You should choose an implementation that is well implemented and well tested. Curator is my third attempt at a ZooKeeper client (third time's the charm!). It is being used heavily inside of Netflix and is being actively developed.
ZooKeeper is notoriously difficult to use correctly. Clients are expected to handle connection problems, network partitions, recoverable exceptions, etc. The Errors wiki details how Curator deals with these issues.
- Curator
- Javadoc
- Coverage Report
- Getting Started
- Examples
- FAQ
- Client
- Framework
-
Recipes
- Leader Latch
- Leader Election
- Shared Reentrant Lock
- Shared Lock
- Shared Reentrant Read Write Lock
- Shared Semaphore
- Multi Shared Lock
- Distributed Queue
- Distributed Id Queue
- Distributed Priority Queue
- Distributed Delay Queue
- Simple Distributed Queue
- Barrier
- Double Barrier
- Shared counter
- Distributed Atomic Long
- Path Cache
- Node Cache
- Utilities – Test Server, Test Cluster, ZKPaths, EnsurePath, QueueSharder, Reaper, ChildReaper
- Tech Notes
- Errors
- Exhibitor Integration
- Extensions
- Logging and Tracing