Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 84391 invoked from network); 24 Feb 2010 19:10:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Feb 2010 19:10:26 -0000 Received: (qmail 74726 invoked by uid 500); 24 Feb 2010 19:10:25 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 74675 invoked by uid 500); 24 Feb 2010 19:10:25 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 74665 invoked by uid 99); 24 Feb 2010 19:10:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2010 19:10:25 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of waite.134@googlemail.com designates 72.14.220.152 as permitted sender) Received: from [72.14.220.152] (HELO fg-out-1718.google.com) (72.14.220.152) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2010 19:10:15 +0000 Received: by fg-out-1718.google.com with SMTP id d23so651582fga.11 for ; Wed, 24 Feb 2010 11:09:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=9LZlo82ACKWUgAROTaQZha7vSY5xSdAw8hVPm6AhCjM=; b=lq2a+CocQueqTw037fKf5PrCqka3f9h4oHAub6ppEK1qpC9/R0s5SDfoFqBFRdh54w OyQoA2lJWV+LD56P557oYe3J2uQrIiHezCzepGwAFelWPKPe4pRdXbmVztRSRjacdy7M woFzRcviPmtVFB9P8LsbnNWxoIemhm25NRmyM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ryHVImeVTzBxmwliXzAjcy8pnyP8nx+xYSiEt86lPa0qXJFhuKCg4CWUgyIZ+foBxz FwgADXjeNGCAJSmw4IBMbpsRsrfktpvWlC7gAL7v8TO5ZWTVBAoFbPVUnng7PvAf1QwN xKWZZR8++trRHqOB2zk6Ma85+bJpXdm8qkxgM= MIME-Version: 1.0 Received: by 10.102.174.3 with SMTP id w3mr159992mue.16.1267038595462; Wed, 24 Feb 2010 11:09:55 -0800 (PST) In-Reply-To: References: <8bc75ecf1002240340r55dc6bd2v5579f89105045506@mail.gmail.com> Date: Wed, 24 Feb 2010 19:09:55 +0000 Message-ID: <8bc75ecf1002241109u249df8b6paf0a7bcf1a402ff9@mail.gmail.com> Subject: Re: is there a good pattern for leases ? From: Martin Waite To: zookeeper-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=0016364d232766387904805d697d X-Virus-Checked: Checked by ClamAV on apache.org --0016364d232766387904805d697d Content-Type: text/plain; charset=ISO-8859-1 Hi Mahadev, That is interesting. All I need to do is hold the connection for the required time of a session that created an ephemeral node. Zookeeper is an interesting tool. Thanks again, Martin On 24 February 2010 17:00, Mahadev Konar wrote: > Hi Martin, > There isnt an inherent model for leases in the zookeeper library itself. > To implement leases you will have to implement them at your application > side > with timeouts triggers (lease triggers) leading to session close at the > client. > > > Thanks > mahadev > > > On 2/24/10 3:40 AM, "Martin Waite" wrote: > > > Hi, > > > > Is there a good model for implementing leases in Zookeeper ? > > > > What I want to achieve is for a client to create a lock, and for that > lock > > to disappear two minutes later - regardless of whether the client is > still > > connected to zk. Like ephemeral nodes - but with a time delay. > > > > regards, > > Martin > > --0016364d232766387904805d697d--