You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Jordan Zimmerman <jo...@jordanzimmerman.com> on 2016/09/28 08:42:05 UTC

Re: ZOOKEEPER-2169

FYI - I’ve applied the last remaining request from Review Board and moved the patch to Github:

https://github.com/apache/zookeeper/pull/82

-Jordan

> On Aug 30, 2016, at 7:27 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
> 
>> As I understand TTL nodes, you want to have them when you don't want to have sessions
> 
> That’s not the only use case. For example, here at Elasticsearch we have a need for a semi-persistent node. It’s a node that lasts for about an hour. Whether or not there is a session is irrelevant. I ended up adding a recipe to Curator for it but it would be much nicer to have direct support in ZK for this. Again, I think you’re conflating the session issue with TTL nodes. They are different topics.
> 
> -Jordan
> 
>> On Aug 30, 2016, at 12:23 PM, Flavio Junqueira <fp...@apache.org> wrote:
>> 
>> As I understand TTL nodes, you want to have them when you don't want to have sessions. I find it odd that you still need to create a session when you choose to use TTL nodes to avoid sessions. It is correct that you can create session/create TTL/close session in this order, but again, if you're trying to avoid sessions, then it doesn't seem to be very appealing to use TTL nodes this way.
>> 
>> In any case, I need to go through the e-mail thread that Camille pointed out. There is possibly some insight there that I'm missing.
>> 
>> -Flavio
>> 
>>> On 30 Aug 2016, at 14:21, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
>>> 
>>> Yes, you need a session to create the TTL node. I believe discussion about needing a session to create the node is beyond the scope of this issue and should be addressed by a new Jira issue. It doesn’t affect the utility of TTL nodes that you must first have a ZK session. Users who no longer want a session can merely close the ZK handle after creating the TTL node. 
>>> 
>>> -Jordan
>>> 
>>>> On Aug 30, 2016, at 7:41 AM, Flavio Junqueira <fp...@apache.org> wrote:
>>>> 
>>>> 
>>>>> On 29 Aug 2016, at 19:51, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
>>>>> 
>>>>>> On the server side, we already have a mechanism to expire sessions, do we a separate scheme to expire TTL nodes or can we use the same mechanism? Does it make sense to consider a TTL node as a degenerate case of a session in which I have a single ephemeral node? My recollection is that it currently uses the container manager instead.
>>>>> 
>>>>> The TTL implementation I did takes advantage of the Container node feature. A TTL node is a variation of a container node. It doesn’t require a session (like any persistent node). 
>>>>> 
>>>> 
>>>> It doesn't require a session, but the client has no way to create such a TTL node without creating a session first, right? You need the zk handle, which has a session associated, to create a TTL node as I understand it.
>>>> 
>>>> -Flavio
>>>> 
>>> 
>>> 
>> 
>