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 60F7C1156C for ; Thu, 26 Jun 2014 14:42:37 +0000 (UTC) Received: (qmail 18588 invoked by uid 500); 26 Jun 2014 14:42:36 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 18542 invoked by uid 500); 26 Jun 2014 14:42:36 -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 18525 invoked by uid 99); 26 Jun 2014 14:42:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2014 14:42:36 +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 glahiru@gmail.com designates 209.85.212.179 as permitted sender) Received: from [209.85.212.179] (HELO mail-wi0-f179.google.com) (209.85.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2014 14:42:34 +0000 Received: by mail-wi0-f179.google.com with SMTP id cc10so1169505wib.12 for ; Thu, 26 Jun 2014 07:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Guod8hxFHwyIENCgY9aEndtU5LlDbKwYjU3D6Yqy+GE=; b=bxin6GtZIb+LDzn8vPyhZIdhaqHLdZTnlB5BOUr37EuD5eDwXlxt70STdam2H0o1y8 pFS7PvBVvKvqzpJJhGclcdcp4STjq8JksAXS45WPyVTvozw3czLdevC/XLa7skWuEN1q NajTAuTQEGpZZWNK0Ad+RrDXyAjhD46Fk6dm/f6aaNnMyRuzbVTWejcqBGiM8WtnvASP /h1nTtFtwfyTiCYjoxnKoqYHXaMcyDq7WR9qOmy3bXSWQZJZZvZxlDjyGoSpebhYEpW/ +NRc9hiysUIb+v5NqkyV9J8K0eAthRrBGEY/jKOs8dJC2vmSxuDaWj+qMg0I323GbbP0 gYaA== MIME-Version: 1.0 X-Received: by 10.194.110.10 with SMTP id hw10mr18498915wjb.81.1403793726897; Thu, 26 Jun 2014 07:42:06 -0700 (PDT) Received: by 10.216.191.138 with HTTP; Thu, 26 Jun 2014 07:42:06 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Jun 2014 10:42:06 -0400 Message-ID: Subject: Re: Best way to bundle zk in our product From: Lahiru Gunathilake To: Rakesh R Cc: "user@zookeeper.apache.org" Content-Type: multipart/alternative; boundary=089e010d870c6e342a04fcbe32c7 X-Virus-Checked: Checked by ClamAV on apache.org --089e010d870c6e342a04fcbe32c7 Content-Type: text/plain; charset=UTF-8 HI Rakesh, Thanks for your response. If ZK call System.ext() my application will immediately crash I guess. And can I connect to ZK using zkCli if I do embedded mode. I believe answer is NO... I have a feeling cleanest way is to ask users to download ZK and start or bundle ZK jars with all scripts and always start as a separate JVM. Regards Lahiru On Thu, Jun 26, 2014 at 10:20 AM, Rakesh R wrote: > Hi Lahiru, > > I had embedded ZooKeeper server without any issues but not in the > production cluster. I feel you can use it for day to day development phase. > Its being used in ZK unit tests, please refer > org.apache.zookeeper.test.QuorumUtil or > org.apache.zookeeper.server.quorum.QuorumPeerTestBase. > > I've noticed few cases, this may be useful to you. > > 1) ZK server code has System.exit() which may affect your service. > 2) Better to redirect ZK logs to a separate log file which will help in > debugging issues independently. > 3) Observe the network traffic and GC, this may affect ZK server > communications and resulting in failures. > 4) In general, it would be difficult to restart your service or ZK server > without affecting each other. > > > -Rakesh > > -----Original Message----- > From: Lahiru Gunathilake [mailto:glahiru@gmail.com] > Sent: 26 June 2014 18:50 > To: user@zookeeper.apache.org > Subject: Best way to bundle zk in our product > > Hi All, > > With all the community help I was able to integrate ZK to Apache > Airavata[1] to achieve fault-tolerance and it was a very interesting > experience to work with ZK. It works as it explains without any issue. > > Now I have an issue how to bundle and ship it. Currently what I have asked > the community is to start ZK instance then run our services. Personally I > like that approach and its much cleaner and in production we can cluster > both Airavata and ZK. But for the curiosity I want to know is there a > better way to bundle like an embedded zk which is stable enough for day > today development or there is a better way to do it. > > [1] > Regards > Lahiru > > -- > System Analyst Programmer > PTI Lab > Indiana University > -- System Analyst Programmer PTI Lab Indiana University --089e010d870c6e342a04fcbe32c7--