Closes #13 - Clients now register in zookeeper as transactors.  

Pull request for #13
PersistentEphemeralNode in Curator handles a lot of those issues.  However,
I added an IT to delete the ephemeral node from Zookeeper and make sure it
was recreated.  I also throw an exception if you call
TransactorID.getLongID() after you call TransactorID.close().

On Wed, Jul 23, 2014 at 11:20 AM, Keith Turner <notifications@github.com>
wrote:

> In modules/core/src/main/java/io/fluo/impl/TransactorID.java:
>
> > +  }
> > +
> > +  private Long createID() throws Exception {
> > +    DistributedAtomicLong counter = new DistributedAtomicLong(
> > +        config.getSharedResources().getCurator(),
> > +        config.getZookeeperRoot() + Constants.Zookeeper.TRANSACTOR_COUNT,
> > +        new ExponentialBackoffRetry(1000, 10));
> > +    AtomicValue<Long> nextId = counter.increment();
> > +    while (nextId.succeeded() == false) {
> > +      nextId = counter.increment();
> > +    }
> > +    return nextId.postValue();
> > +  }
> > +
> > +  private void createEphemeralNode() throws InterruptedException {
> > +    node = new PersistentEphemeralNode(config.getSharedResources().getCurator(),
>
> If the Transactor process pauses (like java gc or swap) then zookeeper may
> delete the ephemeral node, however the process is still running. Need to
> determine what happens in this case and come up w/ a strategy for handling
> it.
>
> Also need to determine what happens when all of the zk servers go down and
> come back up. Will the ephemeral node still be there?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/fluo-io/fluo/pull/93/files#r15293970>.
>