Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 96851 invoked from network); 24 Feb 2010 17:02:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Feb 2010 17:02:20 -0000 Received: (qmail 17434 invoked by uid 500); 24 Feb 2010 17:02:19 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 17404 invoked by uid 500); 24 Feb 2010 17:02:19 -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 17372 invoked by uid 99); 24 Feb 2010 17:02:19 -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 17:02:19 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.145.54.173] (HELO mrout3.yahoo.com) (216.145.54.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2010 17:02:08 +0000 Received: from SNV-EXPF01.ds.corp.yahoo.com (snv-expf01.ds.corp.yahoo.com [207.126.227.250]) by mrout3.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id o1OH15vY027454 for ; Wed, 24 Feb 2010 09:01:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=received:user-agent:date:subject:from:to:message-id: thread-topic:thread-index:in-reply-to:mime-version:content-type: content-transfer-encoding:x-originalarrivaltime; b=rdoz55MT2uYNG8Z9XZPkQHJTyfSJeGrhHRXu8IXCgTyRwdDpE7ODUJg+uPhjg/n5 Received: from SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.86]) by SNV-EXPF01.ds.corp.yahoo.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Feb 2010 09:01:05 -0800 Received: from 10.72.76.191 ([10.72.76.191]) by SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.84]) via Exchange Front-End Server snv-webmail.corp.yahoo.com ([207.126.227.60]) with Microsoft Exchange Server HTTP-DAV ; Wed, 24 Feb 2010 17:00:42 +0000 User-Agent: Microsoft-Entourage/12.20.0.090605 Date: Wed, 24 Feb 2010 09:00:42 -0800 Subject: Re: is there a good pattern for leases ? From: Mahadev Konar To: Message-ID: Thread-Topic: is there a good pattern for leases ? Thread-Index: Acq1cuXQ8mcJYQPzOk6Sr7dz8vWzng== In-Reply-To: <8bc75ecf1002240340r55dc6bd2v5579f89105045506@mail.gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 24 Feb 2010 17:01:05.0202 (UTC) FILETIME=[F3A47120:01CAB572] X-Virus-Checked: Checked by ClamAV on apache.org 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