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 62BBB10CAA for ; Fri, 29 Nov 2013 11:58:24 +0000 (UTC) Received: (qmail 63755 invoked by uid 500); 29 Nov 2013 11:58:22 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 63468 invoked by uid 500); 29 Nov 2013 11:58:19 -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 63460 invoked by uid 99); 29 Nov 2013 11:58:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Nov 2013 11:58:17 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andrephacker@gmail.com designates 209.85.160.46 as permitted sender) Received: from [209.85.160.46] (HELO mail-pb0-f46.google.com) (209.85.160.46) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Nov 2013 11:58:12 +0000 Received: by mail-pb0-f46.google.com with SMTP id md12so14463113pbc.33 for ; Fri, 29 Nov 2013 03:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=KjBi7NFCztt130H/8s+N2SSSXOxueK+Vh+fK8heWO+8=; b=nzlV8hpgS0MtpOy2edUDvEYfFbqLTr2DsZohWDyZEPMOdalkGgFjoZTEs/61h7L0y0 DgAxQLtVDA0TrobmiMFzGFvM8j7Np/EDJcLy2TxNm+nxolXnxKI1rnHz0/WWgqvlV87V 6xpKVHMTTkjmuIPxoTLzxBcrugOeU6R9KWmbeBsEKUErPqWTyoe0I/7lTU4cgUA/fjWU jwtMtwpN2nGQC50pLaWsV/rySgcHKaGrW9oZMGq0FL29K2IUahm212MXYsix+XYNrYHM xA3zY1u8dLx1drl5VvwBZLF0UwDf3XaKF8y5CWFKp1puCKCLCgTH4tyMDxz9ymqAp64A LpXQ== MIME-Version: 1.0 X-Received: by 10.68.218.165 with SMTP id ph5mr15840731pbc.11.1385726270755; Fri, 29 Nov 2013 03:57:50 -0800 (PST) Received: by 10.70.15.130 with HTTP; Fri, 29 Nov 2013 03:57:50 -0800 (PST) Date: Fri, 29 Nov 2013 12:57:50 +0100 Message-ID: Subject: Integrate ZooKeeper in another master-worker application From: =?ISO-8859-1?Q?Andr=E9_Hacker?= To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=047d7b2ee1291fd8f604ec4f8a63 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2ee1291fd8f604ec4f8a63 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, I work for the Stratosphere project [1] (think of it as an extended Hadoop/MapReduce system) and currently look whether it makes sense to use ZooKeeper to implement some functionality. First we consider to use it for counters (hadoop-like counters), and later for coordination, e.g. of iterative tasks. We would not want to require our customers to manually deploy ZK so my question is whether there is any best practice how to integrate ZK into another (java) application? I saw that Giraph deploys the zookeeper jar file and on startup creates a config-file and then starts a jvm using ProcessBuilder [2]. They also allow you to use your existing zookeeper. Do you think this is a good approach? Are there others (e.g. run ZK in our existing jvm)? FYI: Stratosphere is a master-worker system. Initially we would start ZK on the master only, later we could start it at multiple nodes to ensure fault-tolerance. As far as I understood, the number of nodes should depend on the read/write behaviour and on the desired level of fault-tolerance, but we also have full functionality with a single node. Thank you for any hints, Andr=E9 Hacker [1] http://stratosphere.eu/ [2] https://apache.googlesource.com/giraph/+/old-move-to-tlp/src/main/java/org/= apache/giraph/zk/ZooKeeperManager.java --047d7b2ee1291fd8f604ec4f8a63--