szepet opened a new pull request #959: ZOOKEEPER-3402: Add multiRead operation
URL: https://github.com/apache/zookeeper/pull/959
 
 
   So, the possibility of the multi version of getChildren, getData, and a 
common multiRead interface was already mentioned and briefly discussed in the 
conversation thread of #922.
   This patch introduces the concept of multiRead operation.
   Note: This is a 'work-in-progress', not every comment is added, and test 
cases should be extended as well. Currently, the aim is to decide whether this 
direction is something that the community would get behind or should fin.
   I've faced more design decision while implementing this (note: I wanted to 
keep the backward compatibility at all cost), the more important ones were the 
following:
   1. Whether the new read operations should be part of Op or should we create 
new descendant classes of `Op` like `ReadOp` and `WriteOp`. In this case, I 
believe it would be unnecessary to create new classes since it would create a 
lot of code duplication (despite the common ancestor) and the flow of the 
processing would not be as clean as in the initial state. However, by simply 
adding an OpKind enum to the class enables us to ensure the type-safety 
behavior (read and write operations should not mix) and still preserve the 
clean processing flow.
   2. At which point of request processing should we capture the mixed 
(transaction and read operation) multi requests? It seems pretty clear to catch 
them client side and not create extra work for the server.
   3. Do we even need a `multiRead` operation or this whole improvement could 
be just part of multi? Well, the main problem is the following: currently, on 
server side (and in general, everywhere in ZooKeeper) the fact that multi only 
contains transactions is a heavily used and built upon it. The whole `multi` 
processing flow should be rewritten from zero and also the server would get a 
significant extra work for that. So yeah, it seems pretty clear to me that 
introducing the `multiRead` operation is beneficial.
   
   Hope these thoughts make sense! Any observations, questions are welcome!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to