Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F1D1B17970 for ; Wed, 4 Feb 2015 21:03:41 +0000 (UTC) Received: (qmail 19936 invoked by uid 500); 4 Feb 2015 21:03:42 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 19892 invoked by uid 500); 4 Feb 2015 21:03:42 -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 19881 invoked by uid 99); 4 Feb 2015 21:03:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 21:03:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [209.85.192.174] (HELO mail-pd0-f174.google.com) (209.85.192.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 21:03:37 +0000 Received: by pdjz10 with SMTP id z10so3046999pdj.13 for ; Wed, 04 Feb 2015 13:02:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :mime-version:subject:message-id:date:references:in-reply-to:to; bh=OvfA8MkjQ0jdcRZcr5KhUSiCIoLj/qRLVFfaAGAkbJA=; b=ktPJMHvM6gk2vdsVg96J0S7ual5VSSti+mvrrxIpeaUGTlmzEXOHCgTkuteozZwQlm 0NCf1yttXGPqmiTtXo4NlSXZJQblr6oSfzhjGkO5fWdXzsLq1fJSqAPwWEq18mCCM+Iq gfj1SXoJOCtqSzDN0o4Tt54+wbyS3eeL/83H0goPwMVDWnizyOIqnGkLtgXntV8hFThD QKZEBduzhPxsg3AS6vvdLZpucdpK7ZD8J2lx56KRUc8L29Cgoa+L4xn9Vo0fvFmRrW9I W8LP0EHWq2IiQi8lfJCg4eZsi3ZQPuGrI+1JbnZ1bUlL9z+yV1vaSt7drztV65tYzBEo Ig9g== X-Gm-Message-State: ALoCoQltCPSDs48eyBgfKDfJv1/SV1r9cg+VEezARnmYdx+06LhzBlHBk+woL/4fdULueAXLactE X-Received: by 10.66.152.166 with SMTP id uz6mr165907pab.61.1423083776630; Wed, 04 Feb 2015 13:02:56 -0800 (PST) Received: from [26.121.97.43] ([172.56.41.156]) by mx.google.com with ESMTPSA id fl2sm2962368pab.2.2015.02.04.13.02.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Feb 2015 13:02:55 -0800 (PST) From: Jordan Zimmerman Content-Type: multipart/alternative; boundary=Apple-Mail-0E59908F-3165-4DFF-840C-927D073BBB7E Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: Implementing sharding with zookeeper Message-Id: Date: Wed, 4 Feb 2015 13:02:50 -0800 References: In-Reply-To: To: "user@zookeeper.apache.org" X-Mailer: iPhone Mail (12B466) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-0E59908F-3165-4DFF-840C-927D073BBB7E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable I wrote something that might work for you. Have a look at Nirmata Workflow: = http://nirmataoss.github.io/workflow =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jordan Zimmerman > On Feb 4, 2015, at 12:10 PM, Vitalii Tymchyshyn wrote: >=20 > Hello. >=20 > I have a task that looks like a fit for Zookeeper and I thought I find a > recipe in Curator, but I dont. So, It looks like I need my own recipe. >=20 > The problem is: we have a stream of tasks coming in. All tasks for the sam= e > account must be done sequential. But for different accounts it's OK to do > in parallel, so we want workers to distribute account space between them. >=20 > The first step, of course, is to make an account hash to ensure load is > distributed as smooth as possible. >=20 > Next I could simply use a lot of locks, but this way I can't ensure > fairness. >=20 > Thats why I think I need a Leader who will distribute (or redistribute in > case of node death) the hash space between the live nodes. >=20 > What do you think? May be I am missing something and there is existing > recipe for the task? >=20 > Best regards, Vitalii Tymchyshyn --Apple-Mail-0E59908F-3165-4DFF-840C-927D073BBB7E--