Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39DF518ED1 for ; Fri, 29 Jan 2016 14:30:59 +0000 (UTC) Received: (qmail 52614 invoked by uid 500); 29 Jan 2016 14:30:59 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 52583 invoked by uid 500); 29 Jan 2016 14:30:59 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 52571 invoked by uid 99); 29 Jan 2016 14:30:58 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jan 2016 14:30:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 46FCBC0CE4 for ; Fri, 29 Jan 2016 14:30:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.002 X-Spam-Level: *** X-Spam-Status: No, score=3.002 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=johnmccabe-net.20150623.gappssmtp.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id t68JXIW5sxZu for ; Fri, 29 Jan 2016 14:30:45 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 478AC31ACF for ; Fri, 29 Jan 2016 14:30:43 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id p63so71006388wmp.1 for ; Fri, 29 Jan 2016 06:30:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnmccabe-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=n3im+XvKtfUvFy7H00N+ZCy8srk8zUsgCuW0Uub80Jk=; b=BRw7NFoLRIGTJtO/yy2dnuit7sjBsnd8YDe0fOytSY1NtA4MfkilLY2KiRWq8xyNXb Y4VeUVqgLCV8SjW4KWxeOi5SL6nbtgadKhLy3eUnZV/2tE/lGWSZIkivWCoWoaLc9406 It4W1O54oa5yT/o8bLOzynO3qVAk0aramUquP/w7DNLLL25TrEgr3DLTZ6GzEf37ckFP Eq5PLQ5V51k0LxgHbeNxFVSTdoljJOXm1/Xd4p82RE7mTa19ZDTC7j7/r+0QkL4zdZZp Re/IWwkRsaGD8ZZolVH0JgdNEPTdVePrPI9K7uJbHpNJNPcd6haKqUAlSzCOj2vDmtuO enzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; bh=n3im+XvKtfUvFy7H00N+ZCy8srk8zUsgCuW0Uub80Jk=; b=UVbuan8Katm1x7zFjbZ04oFJZFvQh/1UDFepPNdV6AxpVDeZQv18Ka+CR0JTJMqKav 43ta5usQsGJYvwfSGCA6yHe08gAj9odfQsD0sRudG/4b00xpS9L6gGvU/k+L67a/MKj6 gsI+7cqLzdDXKMOL2YGzuGMfHJ1uMrDqzPHiWn7BCoyXo8JmPHWisJ76TAix91o1jHja apFXnTqPkFqJm2n0sCqT58LPAHk5EK1Lt0gBvaIJIypl00G34n+eo5EcW9GQFRR8yP5i bCvWl5DgEY8qqmHpVzQYh6Qc6OWUPvJiY0M+1kidSzMx0ewxH+pciI0g00TLRorGCXgw xnFA== X-Gm-Message-State: AG10YORITVkNLkVLF7NXyJ4243ebt1mvIt6HHbSfX6sbZNrIOYlIjHRzdlkAi6iih/0KiH/KuUsI5E/yNadEcg== X-Received: by 10.28.142.8 with SMTP id q8mr9165459wmd.47.1454077842936; Fri, 29 Jan 2016 06:30:42 -0800 (PST) MIME-Version: 1.0 References: <56AA42FF.2020902@CloudsoftCorp.com> In-Reply-To: From: John McCabe Date: Fri, 29 Jan 2016 14:30:33 +0000 Message-ID: Subject: Re: Brooklyn Daemon Solution To: dev@brooklyn.apache.org Content-Type: multipart/alternative; boundary=001a1144278a4def0c052a79e106 --001a1144278a4def0c052a79e106 Content-Type: text/plain; charset=UTF-8 [bumping so aleks can see the thread] On Thu, 28 Jan 2016 at 16:41 Andrew Kennedy < andrew.kennedy@cloudsoftcorp.com> wrote: > Or what about running a Brooklyn Docker image as a systemd service! > > - http://container-solutions.com/running-docker-containers-with-systemd/ > - https://github.com/ibuildthecloud/systemd-docker > > Andrew. > > On Thu, 28 Jan 2016 at 16:34 Alex Heneveld < > alex.heneveld@cloudsoftcorp.com> > wrote: > > > > > Hi Aleksandr- > > > > What's the advantage of a native daemon over just wrapping it as a linux > > service script ? > > > > Best > > Alex > > > > > > On 28/01/2016 11:32, Aleksandr Vasilev wrote: > > > Hello everyone! > > > > > > I spent last few days looking at the solution to run Brooklyn process > as > > a > > > daemon and found two options: > > > 1. Run daemon via Apache Commons Daemon (jsvc) > > > 2. Write a custom daemon in C > > > > > > Both solutions has its own pros and cons, so let's look at what I think > > > they are: > > > > > > JSVC: > > > Pros: > > > - Ready to use solution. Running a daemon via jsvc is very similar to > > > running java application from the command line with similar arguments > > > passed. > > > - Builds as usual in Maven > > > > > > Cons: > > > - Still requires you to write daemon code, which in my opinion kills > the > > > out-of-the-box usability > > > - Has tons of bugs, including: not been able to find classes in > > classpath, > > > not been able to run by non-root users, not been able to run on several > > > *nix systems (Mac OS, BSD) > > > - The codebase hasn't changed since 2013 and seems abandoned > > > - SVN repo often isn't accessible for some reason, right now the > > webserver > > > returns 503 error code: > > > http://svn.apache.org/viewvc/commons/proper/daemon/trunk/ > > > > > > Custom Daemon (written in C): > > > Pros: > > > - Cross-platform, runs on any *nix system supported by Brooklyn > > > - Very little code to maintain > > > - Independent from third-party solutions, requires only gcc to build > > > - Easy to make LSB-compliant init scripts to control the daemon > > > > > > Cons: > > > - Requires some overhead to build C code in Maven > > > > > > Having all these options considered, I propose writing daemon for > Apache > > > Brooklyn in C language and use gcc compiler to build it. It will > require > > > introducing some changes to Maven build process, but there are plenty > of > > > solutions for doing this, such as Maven NAR plugin, which is actively > > > maintained: > > > https://github.com/maven-nar/nar-maven-plugin > > > > > > Best Regards, > > > Aleksandr Vasilev > > > DevOps Engineer | Cloudsoft Corporation > > > > > > > -- > > Andrew Kennedy ; Founder clocker.io project ; @grkvlt ; Cloudsoft > --001a1144278a4def0c052a79e106--