Return-Path: Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: (qmail 91293 invoked from network); 13 Feb 2011 22:00:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Feb 2011 22:00:28 -0000 Received: (qmail 66495 invoked by uid 500); 13 Feb 2011 22:00:28 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 66457 invoked by uid 500); 13 Feb 2011 22:00:27 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 66449 invoked by uid 99); 13 Feb 2011 22:00:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Feb 2011 22:00:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 13 Feb 2011 22:00:25 +0000 Received: (qmail 91068 invoked by uid 99); 13 Feb 2011 22:00:03 -0000 Received: from localhost.apache.org (HELO mail-wy0-f170.google.com) (127.0.0.1) (smtp-auth username mahadev, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Feb 2011 22:00:03 +0000 Received: by wyb39 with SMTP id 39so5633230wyb.15 for ; Sun, 13 Feb 2011 14:00:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.166.67 with SMTP id f45mr41775wel.112.1297634401580; Sun, 13 Feb 2011 14:00:01 -0800 (PST) Received: by 10.216.50.134 with HTTP; Sun, 13 Feb 2011 14:00:01 -0800 (PST) In-Reply-To: References: <201102131710.21091.thomas@koch.ro> Date: Sun, 13 Feb 2011 14:00:01 -0800 Message-ID: Subject: Re: ExecutorService over a zookeeper From: Mahadev Konar To: user@zookeeper.apache.org Cc: Aaron Crow Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Please look at http://hadoop.apache.org/zookeeper/mailing_lists.html on how to unsubscribe. thanks mahadev 2011/2/13 Aaron Crow : > unsubscribe > > 2011/2/13 Thomas Koch > >> =F7=A6=D4=C1=CC=A6=CA =F4=C9=CD=DE=C9=DB=C9=CE: >> > Hello. >> > >> > I am trying to implement distributed executor service over a zookeeper >> and >> > encountered a problem I am not sure how to deal with. >> > >> Hi, >> >> I've the impression, you're doing it too complicate. Why not have a znod= e >> jobs/ and put all your jobs as persistent znodes in there. >> So your job_queue could look like: >> >> jobs/ >> =9Ajob1 >> =9Ajob2 >> =9Ajob3 >> >> A consumer can then lock a job by putting an ephemeral node in one of th= e >> job >> znodes: >> >> jobs/ >> =9Ajob1 >> =9Ajob2/ >> =9A =9A.lock >> =9Ajob3 >> >> Other consumers see that somebody is already working on job2. If the >> consumer >> should die, the ephemeral lock will vanish and another consumer could ta= ke >> over. >> You should not publish results in ZK but use some other communication >> method. >> ZK is really not meant as a messaging solution. >> Maybe you'd be better served with a standard message queue (e.g. Apache >> activeMQ, rabbitMQ) and use ZK only for coordination? If you have really >> high >> message load, you could have a look at Hedwig (google://zookeeper hedwig= ). >> >> Best regards, >> >> Thomas Koch, http://www.koch.ro >> >