Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5E491200B17 for ; Tue, 21 Jun 2016 17:54:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5CF01160A4F; Tue, 21 Jun 2016 15:54:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7F854160A07 for ; Tue, 21 Jun 2016 17:54:24 +0200 (CEST) Received: (qmail 63862 invoked by uid 500); 21 Jun 2016 15:54:23 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 63852 invoked by uid 99); 21 Jun 2016 15:54:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 15:54:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 394B8180233 for ; Tue, 21 Jun 2016 15:54:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id HQzjZDRHEobp for ; Tue, 21 Jun 2016 15:54:20 +0000 (UTC) Received: from mail-vk0-f46.google.com (mail-vk0-f46.google.com [209.85.213.46]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id CE0BC5FB40 for ; Tue, 21 Jun 2016 15:54:19 +0000 (UTC) Received: by mail-vk0-f46.google.com with SMTP id j2so26054136vkg.2 for ; Tue, 21 Jun 2016 08:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=zTTaS3xQFz/sh1bkThXy+i8dkayP2aQNSmd5nXiwqpo=; b=j4ICeARNNmLK3VwCC52itt5hgLFnWyvg7PwCEA+mL4O6iLjRLPopgFLzY0wytA6/qn QQN49b8e+youoWSvkM4SL94NMocev/ZzxONhYVaDU9uraNan15MU4fxNo7bPPOf5CgHp Tc0FPYG9VwZrdptTFmbUotUPdbn566zKxtbfq0Sqerx2Ez8MElUPFBpLD9OjxZ+G3ltp sgv1Pu8y5HHUHMAr2OV7/lRE4EbxJH32+SUFrl9omsP2pjotOKYltzPWLLIVP912Ds48 57dhZtMPMvEy9HLv5ZM9keYt+um93eeDJgA2JycoD4I13dyfTP09yQ04stQsK7Dk3jEx p2Kg== 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; bh=zTTaS3xQFz/sh1bkThXy+i8dkayP2aQNSmd5nXiwqpo=; b=i4uBiPoh7psyvRe8f25Tf+JkysVooGO2F5AxDsTZB0kdR+mJS07MsGdXUkdaWrSAlf NlVNY3+iLsO6bdHb4+zuiLzHeQ1PXNsRz1M6C9nAoID6Dz5s3FR9p0aFSEC1wMYkwyCh UiLInoyW7Kj3qBzi6b+qWq89KnHOwR+cq2yEucACEi0N4BEz30TUf2TcN3bTr2dssQ4I 6XPvaY5AUI1Rr7GQkuefxOgqINxrXJxHIVvQQ7aeKrJ3NctONnpnsY3IE+L5hYeZpsOs u17jt/nRjHMlol3Q2QEvt7Xcl7xW7PoH+H1/IqNNo2si2p57Hg73tTxZpu9jtgEo6lju TltA== X-Gm-Message-State: ALyK8tIVgVE3kxHjttj0Q+ZzlV7/L4+U4igddW/U1Wue0tfxxEp3RkC+w8Uj3blDxveA+xujGpkNRnjGQE5WBg== X-Received: by 10.31.94.201 with SMTP id s192mr9782763vkb.89.1466524458498; Tue, 21 Jun 2016 08:54:18 -0700 (PDT) MIME-Version: 1.0 References: <57694C65-0002EF8B@deventm.deventm-group.org> In-Reply-To: <57694C65-0002EF8B@deventm.deventm-group.org> From: =?UTF-8?Q?Domingo_Su=C3=A1rez_Torres?= Date: Tue, 21 Jun 2016 15:54:08 +0000 Message-ID: Subject: Re: Groovy hot deploy in production To: "users@groovy.apache.org" Content-Type: multipart/alternative; boundary=001a114e513c67430a0535cbd521 archived-at: Tue, 21 Jun 2016 15:54:25 -0000 --001a114e513c67430a0535cbd521 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I always avoid hot deployments, I prefer to have multiple running JVMs and a proxy or load balancer in front. On Tue, Jun 21, 2016 at 9:18 AM Erwin M=C3=BCller wrote: > Why not have start and stop hooks for such stuff? > > Have an interface with onStart() and onStop() methods, and call them when > you load and unload a class. > > If you really need modularity, use OSGi. > > Regards, Erwin. > > Sun Jun 19 2016 15:00:56 CEST from "Aplomb Chen" = Subject: > Groovy hot deploy in production > > Hi Guys, > > > > Will you use groovy hot deploy in production environment? Is it reliable > to do so? > > > > I am worried that it may have issue when you are doing below, > > 1, Defined a Array as class attribute, make it has 10000 objects, next > time code hot deploy that the array is erased in code, then that must be = an > memory leak, right? > > 2, If you execute a periodic timertask in a groovy, next time code hot > deployed, if the timetask is no longer needed from your code, but the > started timertask will still be running, right? > > > > If we demands developers avoid using class attributes or starting any > thread thing as a development rule, will hot deploy still be good for > production? > > > > Aplomb > > > > Best regards > > > > -- > Erwin M=C3=BCller - erwin.mueller@deventm.org > Software Entwickler - (+49) 01577-9505569 > Pgp - https://pgp.mit.edu/pks/lookup?op=3Dget&search=3D0x02E820911DD910FD > Meine Seite - http://www.mueller-public.de/ > ANRI - http://www.anr-institute.com/ > --001a114e513c67430a0535cbd521 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I always avoid hot deployments, I prefer to have multiple = running JVMs and a proxy or load balancer in front.


=

On Tue, Jun 21,= 2016 at 9:18 AM Erwin M=C3=BCller <erwin.mueller@deventm.org> wrote:

Why not have start and stop hooks for such stuff?

Have an interface with onStart() and onStop() methods, and call them whe= n you load and unload a class.

If you really need modularity, use OSGi.

Regards, Erwin.

Sun Jun 19 2016 15:00:56 CEST from "Aplomb Che= n" <aplo= mb.chen@gmail.com> Subject: Groovy hot deploy in produ= ction

Hi Guys,=C2=A0

=C2=A0

Will you use groovy hot deploy in production environment? Is it re= liable to do so?

=C2=A0

I am worried that it may have issue when you are doing below,=C2= =A0

1, Defined a Array as class attribute, make it has 10000 objects, = next time code hot deploy that the array is erased in code, then that must = be an memory leak, right?

2, If you execute a periodic timertask in a groovy, next time code= hot deployed, if the timetask is no longer needed from your code, but the = started timertask will still be running, right?

=C2=A0

If we demands developers avoid using class attributes or starting = any thread thing as a development rule, will hot deploy still be good for p= roduction?

=C2=A0

Aplomb

=C2=A0

Best regards



--001a114e513c67430a0535cbd521--