Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D2B6310006 for ; Thu, 10 Oct 2013 01:04:27 +0000 (UTC) Received: (qmail 47560 invoked by uid 500); 10 Oct 2013 01:04:27 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 47525 invoked by uid 500); 10 Oct 2013 01:04:27 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 47517 invoked by uid 99); 10 Oct 2013 01:04:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 01:04:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Chris.Suich@netapp.com designates 216.240.18.76 as permitted sender) Received: from [216.240.18.76] (HELO mx11.netapp.com) (216.240.18.76) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 01:04:21 +0000 X-IronPort-AV: E=Sophos;i="4.90,1067,1371106800"; d="scan'208";a="58211648" Received: from vmwexceht06-prd.hq.netapp.com ([10.106.77.104]) by mx11-out.netapp.com with ESMTP; 09 Oct 2013 18:03:57 -0700 Received: from SACEXCMBX01-PRD.hq.netapp.com ([169.254.2.46]) by vmwexceht06-prd.hq.netapp.com ([10.106.77.104]) with mapi id 14.03.0123.003; Wed, 9 Oct 2013 18:03:57 -0700 From: "SuichII, Christopher" To: "" Subject: Re: [PROPOSAL] Modularize Spring Thread-Topic: [PROPOSAL] Modularize Spring Thread-Index: AQHOs/LZLIj4+hybAEqN28tYSCNAF5nL0SCAgABmiQCAAA3gAIAACJkAgAAibgCAAAzegIAAC70AgAAFrACAACIDAIAAFi6AgAag5wCAALyVgIAAIxgAgAAeV4CAAAQSgIAAtkYAgA79GwCAABAHAIAAAT8AgAAT+gCAACIOgIAAFaOAgADjloCAABbqAIAAA9IAgAAu/gCAAAMBgIAHuq8AgAA/14CAABF0gA== Date: Thu, 10 Oct 2013 01:03:56 +0000 Message-ID: References: <3AAC8EBA-5BFB-4310-B899-89A02A70A7C6@netapp.com> <77B337AF224FD84CBF8401947098DD8716AC39@SJCPEX01CL01.citrite.net> <0DF63E46-E7BF-41A9-B16F-0CA833ECE25A@netapp.com> <524F1302.5070406@gmail.com> <1A414B89-6915-43F7-8E8E-66AF35A5316C@netapp.com> <6C5E100E-4D83-4468-BED9-0B3B787635FD@netapp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.104.60.116] Content-Type: text/plain; charset="Windows-1252" Content-ID: <675D101A72191D43AF62D0388645A913@hq.netapp.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Yep, that's the idea. In fact, we really need it to be dynamic so that the = strategy or provider can respond depending on the action. For example, snap= shotting may be supported while reverting may not be. --=20 Chris Suich chris.suich@netapp.com NetApp Software Engineer Data Center Platforms =96 Cloud Solutions Citrix, Cisco & Red Hat On Oct 9, 2013, at 8:01 PM, Darren Shepherd wrote: > I think I'm fine with that. Is the enum type return dynamically at > runtime. So the API would be something like "PlugInPriority > canHandle(...)"? >=20 > Darren >=20 > On Wed, Oct 9, 2013 at 1:13 PM, SuichII, Christopher > wrote: >> I think I'll look into a version of (2). The difference being that I thi= nk using an int is too large of a range and provides unnecessary granularit= y. If two strategies or providers both have snapshot strategies, they are b= oth simply going to return the max int. However, if we use an enum with val= ues like: >>=20 >> HIGHEST, PLUGIN, HYPERVISOR, DEFAULT and NO, (HIGHEST would be reserved = for unforeseen future use, testing, simulators, etc.) >>=20 >> then we allow strategies and providers to fall in the same bucket. All s= trategies and providers would be sorted and asked to handle operations in t= hat order. Ultimately, this requires that plugins do their best to determin= e whether they can actually handle an operation, because if two say they ca= n, there is no way for the MS to intelligently choose between the two. >>=20 >> -- >> Chris Suich >> chris.suich@netapp.com >> NetApp Software Engineer >> Data Center Platforms =96 Cloud Solutions >> Citrix, Cisco & Red Hat >>=20 >> On Oct 4, 2013, at 6:10 PM, Darren Shepherd wrote: >>=20 >>> Sure, I'm open to suggestions. Basically I think we've discussed >>>=20 >>> 1) Global Setting >>> 2) canHandle() returns an int >>> 3) Strategy has an enum type assigned >>>=20 >>> I'm open to all three, I don't have much vested interest in this. >>>=20 >>> Darren >>>=20 >>> On Fri, Oct 4, 2013 at 3:00 PM, SuichII, Christopher >>> wrote: >>>> Well, it seems OK, but I think we should keep on discussing our option= s. One concern I have with the global config approach is that it adds manua= l steps for 'installing' extensions. Each extension must have installation = instructions to indicate which global configurations it must be included in= and where in that list it should be put (and of course, many extension are= going to say that they should be at the front of the list). >>>>=20 >>>> -Chris >>>> -- >>>> Chris Suich >>>> chris.suich@netapp.com >>>> NetApp Software Engineer >>>> Data Center Platforms =96 Cloud Solutions >>>> Citrix, Cisco & Red Hat >>>>=20 >>>> On Oct 4, 2013, at 12:12 PM, Darren Shepherd wrote: >>>>=20 >>>>> On 10/04/2013 11:58 AM, SuichII, Christopher wrote: >>>>>> Darren, >>>>>>=20 >>>>>> I think one of the benefits of allowing the priority to be specified= in the xml is that it can be configured after deployment. If for some reas= on two strategies or providers conflict, then their priorities can be chang= ed in XML to resolve the conflict. I believe the Spring @Order annotation a= n be specified in XML, not just as an annotation. >>>>>>=20 >>>>>> -Chris >>>>>>=20 >>>>>=20 >>>>> I would *prefer* extensions to be order independent, but if we determ= ine they are order dependant, then that is fine too. So if we conclude tha= t the simplest way to address this is to order the Strategies based on conf= iguration, then I will add an ordering "global configuration" as described = at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Extensions. >>>>>=20 >>>>> Does the order configuration setting approach seem fine? >>>>>=20 >>>>> Darren >>>>=20 >>=20