Yes, I'm conflating session and TTL nodes because etcd has TTL nodes to avoid having ephemerals which depend on some notion of lease or session... At least that's my understanding of their design choice.
You're pointing out a use case in which you don't care whether you have to create sessions or not. My concern is about applications that end up using TTL znodes instead of ephemerals because they don't want to create sessions, e.g., they want to submit a one-off request to the ensemble. Are the applications of TTL nodes more like the one you're describing or are they more Iike what I'm describing? I honestly don't know the answer, but at the moment you have some advantage because you have one real app and I have zero. I think there was some discussion earlier in the e-mail thread about HTTP requests, but I need to refresh my cache about it. -Flavio > On 30 Aug 2016, at 18:27, Jordan Zimmerman <jor...@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 <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 >>>> >>> >>> >> >