Oops - I realized I didn’t put this in Curator. It’s in the Elasticsearch Cloud code (proprietary - sorry).
-Jordan > On Aug 30, 2016, at 1:36 PM, Flavio Junqueira <f...@apache.org> wrote: > > As Jordan described, he has implemented it in Curator. I haven't had a look > at the implementation, but perhaps he can point you to code and doc. > > -Flavio > > >> On 30 Aug 2016, at 18:29, Irfan Hamid <iha...@salesforce.com> wrote: >> >> Isn't a TTL node and a session somewhat orthogonal issues? Can we create >> TTL nodes today within a session? Or would there need to be a thick client >> implementation that manages them by scheduled tasks that delete said node? >> >> On Tue, Aug 30, 2016 at 10:23 AM, Flavio Junqueira <f...@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 <jor...@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 <f...@apache.org> wrote: >>>>> >>>>> >>>>>> On 29 Aug 2016, at 19:51, Jordan Zimmerman <jor...@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 >>>>> >>>> >>>> >>> >>> >