Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 27613 invoked from network); 3 Jan 2008 08:28:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2008 08:28:01 -0000 Received: (qmail 51260 invoked by uid 500); 3 Jan 2008 08:27:44 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 51234 invoked by uid 500); 3 Jan 2008 08:27:44 -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 51223 invoked by uid 99); 3 Jan 2008 08:27:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 00:27:44 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 08:27:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D517C71422C for ; Thu, 3 Jan 2008 00:27:33 -0800 (PST) Message-ID: <8373297.1199348853867.JavaMail.jira@brutus> Date: Thu, 3 Jan 2008 00:27:33 -0800 (PST) From: "Amila Chinthaka Suriarachchi (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-3421) An algorithum to determine the phase order In-Reply-To: <28870578.1199243673823.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-3421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555504#action_12555504 ] Amila Chinthaka Suriarachchi commented on AXIS2-3421: ----------------------------------------------------- I went through your algorithm and as you have told It uses the same basic concepts. Instead of using relocation for each and every phase you have rebuild all. getMinIndex apprently use the same logic as relocation function in my implementation. I saw these lines // If something by this name already exists, ensure it's compatible if (previous.isFirst() != deployable.isFirst()) { throw new Exception("Can't deploy '" + name + "', values for first don't match!"); } if (previous.isLast() != deployable.isLast()) { throw new Exception("Can't deploy '" + name + "', values for last don't match!"); } is this means we are going to throw an exception for I think it should not be. > An algorithum to determine the phase order > ------------------------------------------- > > Key: AXIS2-3421 > URL: https://issues.apache.org/jira/browse/AXIS2-3421 > Project: Axis 2.0 (Axis2) > Issue Type: Improvement > Components: deployment > Reporter: Amila Chinthaka Suriarachchi > Attachments: dynamic_phase2.tar > > > This algorithm users a simplified logical model to determine the phase > order of a given set of phases with phase rules. > Following description is only based on the after and before rules for > simplicity. Sample shows how it can integrate with phaseFirst and phaseLast rules > as well. > 1. This algorithum only works with before rules. i.e after is also consider > as a before rule. > eg. if > we assume this equals to > and > 2. A seperate list called before phases list is used to keep the before phases > of a given phase. This detail is used to validate a rule and relocate a phase. > eg. for above case here is the before lists > > > > before list of any phase is clearly a subset of phases below it. > One phase by one phase added to the final phase order list. At any time this > phase order list contains a valid phase order according to the known phase rules. > So all phases has their before list as specified by the rules. > PsudoCode for adding a Phase (A). > // phase A only have a before rule. if original rule has an after rule then > // we add another rule using the first law > if A already exists > // if a exists then validate it with before and after phases > if before phase rule given (B) > if before phase exists > // if the before phase already in the system, we have to add this rule to the > // system i.e update the before lists > Add B's phases to A and all the other phases having A in their before list. > Relocate B if it already not after A (see the relocate procedure below) > else > // before phase not in the system > Add before phase as the last phase > Add before phase to A and all the other phases having A in their before list. > else > // i.e if A does not exists in the system > if before phase rule given (B) > if before phase exists > Place A just before the B > Add all B's phases to the As' before list. > else > // if there is no before phase > Add the before phase to end of the list > Place A just before B > Add all B's phases to the As' before list > else > //i.e no before rule is given. then we can safely place this at the end > Add A to end of phase order > So this method would keep the list in the with the orignal condition and hence > we can keep on adding phases > Relocate Algorithum > Relocate Phase A > Go through the phase order list until find a phase belongs to before list. > // this means we have to insert this phase at lest before this point (i). > // As mentioned earlier before list of a phase must be a subset of phase below it > // so all the phases below this point (i) can not have A as a before list phase > Check whether below phase contain A as a before list phase > if exits throw an exception > else insert A at the i th position. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org