Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 18811 invoked from network); 27 Aug 2009 08:27:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Aug 2009 08:27:57 -0000 Received: (qmail 71337 invoked by uid 500); 27 Aug 2009 08:27:56 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 71252 invoked by uid 500); 27 Aug 2009 08:27:56 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 71243 invoked by uid 99); 27 Aug 2009 08:27:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 08:27:56 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of amilasuriarachchi@gmail.com designates 74.125.92.150 as permitted sender) Received: from [74.125.92.150] (HELO qw-out-1920.google.com) (74.125.92.150) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 08:27:47 +0000 Received: by qw-out-1920.google.com with SMTP id 4so249649qwk.28 for ; Thu, 27 Aug 2009 01:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=XJIZLpXgB6IMGyhlblua7mcSxcsCUUM9f6arPzOWMVE=; b=nivUg6AiC9iKopjLvsjyAb7VVGKFVoSZDjGumDIUd+KjSIjYf3zCEClkTfHk9/ltqU RpjKIvI/IiMgXpihp6vsoexl9Ajk79Cf9v8EcctdM92hbmlIuGrxjX95J98k1SE3IgXl yX49wH2Bmnn8VkbziKZOXNc9LfY3bcUUujbkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=o4syCfvUW1SVdJ1vTVFtGUsUEfS3oM6rqhlQX+EcQeq8WvpMFcX96Gj7+mVHpicUM8 1CcXHpoSpXDRMtFMI+qqnc/DQ/g/IvZlfMoH6wJNWnRGrQpxN+e2WEDbnkyt637jOf0r 6Z7o7A/cq2IlJl7L41UBSknBs78qJmZjZnlKY= MIME-Version: 1.0 Received: by 10.229.54.148 with SMTP id q20mr2741747qcg.18.1251361646271; Thu, 27 Aug 2009 01:27:26 -0700 (PDT) In-Reply-To: <672a01200908262136m151720c3n99c08b8ae875df1@mail.gmail.com> References: <672a01200908262136m151720c3n99c08b8ae875df1@mail.gmail.com> Date: Thu, 27 Aug 2009 13:57:26 +0530 Message-ID: <60708f4b0908270127p7c987fb4mec82ebb674271e39@mail.gmail.com> Subject: Re: [PROPOSAL] Axis2 Deployer behaviour on hot update From: Amila Suriarachchi To: axis-dev@ws.apache.org Content-Type: multipart/alternative; boundary=001517741bbc695d8c04721b56f3 X-Virus-Checked: Checked by ClamAV on apache.org --001517741bbc695d8c04721b56f3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, Aug 27, 2009 at 10:06 AM, Ruwan Linton wrote: > Hi devs, > > I am trying to implement the Hot deployment and Hot update of the synapse > artifacts, and realized that there are some issues; I first thought of > writing our own deployment behaviour because we wanted some conditions to be > checked on the hot update case undeployment of the artifacts. > > Let me first describe how Hot update works in axis2, correct me if I am > wrong but from what I have figured out so far, axis2 repository listener > task calls unDeploy method of the deployer implementation first and then > calls the deploy method again to deploy the artifact with the changes. > > So this approach has two issues, > > 1. There is a considerable downtime of the artifact which is being hot > updated > 2. There is no means of knowing the case where the undeploy method > being called, for example synapse needs to have a main sequence for it to > operate properly, so synapse has to force the user to not to undeploy the > main sequence while it should allow the user to hot update it. > > I propose adding a update method to the Deployer interface or passing the > state as an argument, we could use the DeploymentFileData class to provide > the operation, but that doesn't resolve the issue because the undeploy > method has a String file name as its argument, so this canot be fixed > without an API change in the deployer implementation. > > Being said the above I can implement this in Synapse, but since we had huge > debates earlier on writing stuff on synapse replacing axis2 stuff just > because they do not fit into synapse without letting the axis2 community > know about those, I thought of proposing this to the axis2 as well. > > WDYT? > > Or may be I am missign something which can resolve the above 2 issues, in > which case please be kind enough to point me to the behaviour that I should > be using.. :-) I went through the deployment engine code and it seems bit complicated and can not solve without changing Deployer interface. Let me put this suggestion if it works for you :). At the undeploy method you get the file name. Then you can check whether this file exists. if not exist this is only an undeployment so you do the undeployment if exists then this is a update, you keep this entry in your deployer. Now at the deploy method if there is an entry you do an update and if not do a fresh deployments. Anyway I think, writing a synapse deployer would be a correct long term solution since you can customise it purely for synapse needs. thanks, Amila. > > > Thanks, > Ruwan > > -- > Ruwan Linton > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb > WSO2 Inc.; http://wso2.org > email: ruwan@wso2.com; cell: +94 77 341 3097 > blog: http://ruwansblog.blogspot.com > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ --001517741bbc695d8c04721b56f3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Aug 27, 2009 at 10:06 AM, Ruwan = Linton <ruwa= n.linton@gmail.com> wrote:
Hi devs,

I am trying to implement the Hot deployment and Hot update = of the synapse artifacts, and realized that there are some issues; I first = thought of writing our own deployment behaviour because we wanted some cond= itions to be checked on the hot update case undeployment of the artifacts.<= br>
Let me first describe how Hot update works in axis2, correct me if I am= wrong but from what I have figured out so far, axis2 repository listener t= ask calls unDeploy method of the deployer implementation first and then cal= ls the deploy method again to deploy the artifact with the changes.

So this approach has two issues,
  1. There is a considerable dow= ntime of the artifact which is being hot updated
  2. There is no means = of knowing the case where the undeploy method being called, for example syn= apse needs to have a main sequence for it to operate properly, so synapse h= as to force the user to not to undeploy the main sequence while it should a= llow the user to hot update it.
I propose adding a update method to the Deployer interface or passing = the state as an argument, we could use the DeploymentFileData class to prov= ide the operation, but that doesn't resolve the issue because the undep= loy method has a String file name as its argument, so this canot be fixed w= ithout an API change in the deployer implementation.

Being said the above I can implement this in Synapse, but since we had = huge debates earlier on writing stuff on synapse replacing axis2 stuff just= because they do not fit into synapse without letting the axis2 community k= now about those, I thought of proposing this to the axis2 as well.

WDYT?

Or may be I am missign something which can resolve the abo= ve 2 issues, in which case please be kind enough to point me to the behavio= ur that I should be using.. :-)

I went through the dep= loyment engine code and it seems bit complicated and can not solve without = changing Deployer interface.

Let me put this suggestion if it works for you :).

At the undepl= oy method you get the file name. Then you can check whether this file exist= s.
if not exist this is only an undeployment so you do the undeployment=
if exists then this is a update, you keep this entry in your deployer. Now = at the deploy method if there is an entry you do an update and if not do a = fresh deployments.

Anyway I think, writing a synapse deployer would = be a correct long term solution since you can customise it purely for synap= se needs.

thanks,
Amila.


Thanks,
Ruwan

-- <= br> Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341= 3097
blog: http://r= uwansblog.blogspot.com



--
Amila Suriarachc= hi
WSO2 Inc.
blog: ht= tp://amilachinthaka.blogspot.com/
--001517741bbc695d8c04721b56f3--