[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15461288#comment-15461288
 ] 

Camille Fournier commented on ZOOKEEPER-2169:
---------------------------------------------

OK Finally looking at this in detail. Overall it seems pretty good. I have 
mixed feelings about calling the create type PERSISTENT_WITH_TTL since they 
aren't exactly persistent, hence the TTL, but I'm willing to let that go unless 
others feel it would be confusing.

One thing I was expecting to see was the ability to "touch" a node to reset the 
TTL without having to change other data. By using mTime to indicate liveness 
we're basically saying the only way to reset TTL is to change the data in the 
node (other operations such as setting ACLs, adding children, deleting children 
don't reset that mTime, only initial creation and updating of node data. I 
think we can add some sort of "touch" later if we decide we want to. 

I still want to look at the tests a bit more but I'm getting comfortable. I'm 
going to add any minor comments I have to the reviewboard. 

Finally, I know several others have looked at this code, if you have ([~breed] 
[~fpj] [[~rgs] [~hanm]) it would be helpful to get this finished to get an ack 
that someone has
a) Gone through the doc changes and made sure they look good
b) Gone through the comment changes to the client-facing methods that have 
changed in ZooKeeper and made sure they look good

These tend to be the two areas we discover after the fact we missed something 
obvious (vs small bugs) so if one of you has already done a thorough validation 
of either of these please LMK.

Thanks!

> Enable creation of nodes with TTLs
> ----------------------------------
>
>                 Key: ZOOKEEPER-2169
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2169
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: c client, java client, jute, server
>    Affects Versions: 3.6.0
>            Reporter: Camille Fournier
>            Assignee: Jordan Zimmerman
>             Fix For: 3.6.0
>
>         Attachments: ZOOKEEPER-2169-2.patch, ZOOKEEPER-2169-3.patch, 
> ZOOKEEPER-2169-4.patch, ZOOKEEPER-2169-5.patch, ZOOKEEPER-2169.patch
>
>
> As a user, I would like to be able to create a node that is NOT tied to a 
> session but that WILL expire automatically if action is not taken by some 
> client within a time window.
> I propose this to enable clients interacting with ZK via http or other "thin 
> clients" to create ephemeral-like nodes.
> Some ideas for the design, up for discussion:
> The node should support all normal ZK node operations including ACLs, 
> sequential key generation, etc, however, it should not support the ephemeral 
> flag. The node will be created with a TTL that is updated via a refresh 
> operation. 
> The ZK quorum will watch this node similarly to the way that it watches for 
> session liveness; if the node is not refreshed within the TTL, it will expire.
> QUESTIONS:
> 1) Should we let the refresh operation set the TTL to a different base value?
> 2) If so, should the setting of the TTL to a new base value cause a watch to 
> fire?
> 3) Do we want to allow these nodes to have children or prevent this similar 
> to ephemeral nodes?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to