Flavio Paiva Junqueira commented on ZOOKEEPER-383:

Thanks for the comments, Ben. The short answer to your question is yes, we 
could in the way you're saying. In fact, initially I had in mind processing the 
operation in the processResult callback methods. However, I found this approach 
confusing for understanding and maintaining the code, so I ended up writing the 
core logic of create, open, and close in the run() method of 

It is true, though, that we could eliminate the thread of 
LedgerManagementProcess and make run() a method that is invoked by other 
threads. The reason why I preferred to have this architecture is to isolate the 
execution of the create, open, and close procedures. There are operations, like 
ledger recovery, that are more expensive and it is perhaps a good idea to have 
them executed by a separate thread. 

What do you think? 

> Asynchronous version of createLedger()
> --------------------------------------
>                 Key: ZOOKEEPER-383
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-383
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: contrib-bookkeeper
>            Reporter: Utkarsh Srivastava
>            Assignee: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-383.patch
> While there are async versions for read and write, there is no async version 
> for creating a ledger. This can cause applications to have to change their 
> whole thread design. 
> It should be easier and more consistent to add an async version of 
> createLedger().

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