Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-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 9AE9310FBF for ; Thu, 5 Dec 2013 02:30:46 +0000 (UTC) Received: (qmail 80984 invoked by uid 500); 5 Dec 2013 02:30:46 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 80955 invoked by uid 500); 5 Dec 2013 02:30:46 -0000 Mailing-List: contact dev-help@stratos.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.incubator.apache.org Delivered-To: mailing list dev@stratos.incubator.apache.org Received: (qmail 80948 invoked by uid 99); 5 Dec 2013 02:30:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 02:30:46 +0000 X-ASF-Spam-Status: No, hits=-1997.8 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,RP_MATCHES_RCVD,URIBL_DBL_REDIR X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 05 Dec 2013 02:30:44 +0000 Received: (qmail 80902 invoked by uid 99); 5 Dec 2013 02:30:24 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 02:30:24 +0000 Received: from localhost (HELO mail-vc0-f172.google.com) (127.0.0.1) (smtp-auth username imesh, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 02:30:24 +0000 Received: by mail-vc0-f172.google.com with SMTP id hz11so12468110vcb.3 for ; Wed, 04 Dec 2013 18:30:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=nG+7HtbI+clfouWbVWoiJQsNFsN5g6YrB7CqpMmg9fs=; b=KBG3mL95YGhcVd+KCOjTcmWwReOyCry9e7TgAUshE6v3z9ZFsRdfuzB8TXbauH1iQs BUihJ9hHp9NTDzV8e3QLEpzinjEBLb5k0wb/PXXfCqLHeyWpOPlj2PuRS1YC8xFtbinl BCh6uOJltWypEyI8oFz8qDGrMgi92mIQQp/ObQ7L8L7qWtAZkixdsILkocHyFCgst32f UtDShdBHWjAtlo4boRc0gze5ixdsasFbHTxm1qY1dDz147GosnWJTDIxrcVmNHywTGiC 5qPKWITYfG567il/9KEbJ126/3tOwcB/Cfsbja7QYdKGQtIepxFEtDm21Z0P1XOM+f+M i5EA== MIME-Version: 1.0 X-Received: by 10.220.86.69 with SMTP id r5mr61356204vcl.9.1386210623051; Wed, 04 Dec 2013 18:30:23 -0800 (PST) Received: by 10.52.188.4 with HTTP; Wed, 4 Dec 2013 18:30:22 -0800 (PST) In-Reply-To: References: Date: Thu, 5 Dec 2013 08:00:22 +0530 Message-ID: Subject: Re: LB messages processor chain From: Imesh Gunaratne To: "dev@stratos.incubator.apache.org" Content-Type: multipart/alternative; boundary=001a11c1ff44c5bc0604ecc04f04 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1ff44c5bc0604ecc04f04 Content-Type: text/plain; charset=ISO-8859-1 Hi Chris, I totally agree, yes we could think that messaging as the transport and the events are as the API. I think we definitely need to add this information to the Wiki. I will prepare some content for this topic and add it to the documentation. For the moment please refer the brief description below: Initially Load Balancer waits for the Complete Topology Event: - This is the starting point for building the Topology data structure. - This event has been introduced to make sure that if the Load Balancer restarts it could still build the topology from the right point. - This is only received once. Then on top of it other events are applied. Other events are received in the following order by the Load Balancer: 1. Service Created: This adds a new service to the Topology. 2. Cluster Created: This adds a new cluster to a given service. 3. Instance Spawned: This adds a new member to a given cluster. 4. Member Started: This changes the state of a given member to Starting. 5. Member Activated: This changes the state of a given member to Activated. Now this member is ready to serve requests. The following events could received in any order: - Member Suspended: This changes the state of the member to Suspended. - Member Terminated: This changes the state of the member to Terminated. - Cluster Removed: This removes a given cluster from a service. - Service Removed: This removes a given service from the Topology. Really appreciate your concerns on this. Many Thanks Imesh On Thu, Dec 5, 2013 at 2:36 AM, chris snow wrote: > Hi Imesh, > > Messaging is how other components communicate with LB, so I'm thinking > that messaging is the transport, and the objects sent in the messages > represent the API. > > A tester who would want to test the LB as a black box would be interested > in the API as that represents the external behaviour of the LB. > > In a soap based component, the API is easy to find because it is > documented by the wsdl. However, in a component like LB that uses > messaging and not soap, how would someone determine the API? > > Does my question make any more sense now? > > Many thanks, > > Chris > Hi Chris, > > I'm sorry for the confusion. > Actually the load balancer does not expose a service. It communicates with > the other components via the message broker. > > The standard is to implement service stubs for each service in place them > in incubator-stratos/service-stubs/. There we could find the WSDL of each > service. However please note that at the moment we may have number of > un-used service stubs in this folder. > > Thanks > Imesh > > > > > On Tue, Dec 3, 2013 at 2:57 PM, Udara Liyanage wrote: > >> Hi chris, >> >> If it is a web service there is a wsdl for the service. By looking at the >> WSDl you can view the exposed methods, the input needed and the output >> returned from them. >> >> For example Cloud Controller has exposed a API called >> CloudControllerService. You can find the related WSDL at the following >> folder. >> [stratos]/service-stubs/org.apache.stratos.cloud.controller.service.stub >> >> >> >> On Tue, Dec 3, 2013 at 2:03 AM, chris snow wrote: >> >>> Hi Imesh, >>> >>> Sorry, the question was: "how can a developer/tester/architect examine >>> the external API that is exposed by the LB (and other Stratos >>> components)?". >>> >>> A software tester would want to view the API so that they can >>> determine how they will test the component through that API. >>> An architect would want to view the API so that they can understand the >>> services exposed by the component without looking through the code base. >>> >>> The API for a stratos component is the list of messages that it >>> supports. How can an architect or tester find a list of messages that each >>> Stratos component supports? >>> >>> Many thanks, >>> >>> Chris >>> >>> >>> >>> >>> >>> On Tue, Dec 3, 2013 at 1:52 AM, Imesh Gunaratne wrote: >>> >>>> Hi Chris, >>>> >>>> There was no requirement to expose a SOAP/REST API in the load >>>> balancer. Therefore there is no WSDL/WADL added. >>>> >>>> BTW if your requirement is to examine the behaviour >>>> of TopologyEventProcessorChain it shouldn't be that difficult. Basically >>>> each processor corresponds to its event, if it didn't find the required >>>> event it will pass the call to the next processor. Once it finds the >>>> matching event it will build the Topology in Topology Manager and fire the >>>> matching event listener. >>>> >>>> Thanks >>>> Imesh >>>> >>>> >>>> On Tue, Dec 3, 2013 at 3:31 AM, chris snow wrote: >>>> >>>>> In the case of the LB MessageProcessorChain, the following processors >>>>> have been added to the list: >>>>> >>>>> org.apache.stratos.messaging.message.processor.topology.ServiceCreatedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.ServiceRemovedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.ClusterCreatedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.ClusterRemovedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.InstanceSpawnedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.MemberStartedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.MemberActivatedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.MemberSuspendedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.MemberTerminatedEventProcessor >>>>> org.apache.stratos.messaging.message.processor.topology.CompleteTopologyEventIgnoreProcessor >>>>> >>>>> In a component that exposes a SOAP/REST API, I would look at the >>>>> WSDL/WADL to examine the API. As a WSDL/WADL aren't available for the LB >>>>> component, how can I examine the API without having to run the code and >>>>> inspect the MessageProcessorChain? >>>>> >>>>> Many thanks, >>>>> >>>>> Chris >>>>> >>>> >>>> >>> >>> >>> -- >>> Check out my professional profile and connect with me on LinkedIn. >>> http://lnkd.in/cw5k69 >>> >> >> >> >> -- >> Udara Liyanage >> Software Engineer >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> >> web: http://udaraliyanage.wordpress.com >> phone: +94 71 443 6897 >> > > --001a11c1ff44c5bc0604ecc04f04 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Chris,

I totally agree, yes we could= think that messaging as the transport and the events are as the API.
=

I think we definitely need to add this information to t= he Wiki. I will prepare some content for this topic and add it to the docum= entation. For the moment please refer the brief description below:

Initially Load Balancer waits for the Complete Topology= Event:
- This is the starting point for building the Topology da= ta structure.
- This event has been introduced to make sure that = if the Load Balancer restarts it could still build the topology from the ri= ght point.
- This is only received once. Then on top of it other events are appli= ed.

Other events are received in the following ord= er by the Load Balancer:

1. Service Created: This = adds a new service to the Topology.
2. Cluster Created: This adds a new cluster to a given service.
<= div>3. Instance Spawned: This adds a new member to a given cluster.
4. Member Started: This changes the state of a given member to Starting.=
5. Member Activated: This changes the state of a given member to Activ= ated. Now this member is ready to serve requests.

= The following events could received in any order:

- Member Suspended: This changes the state of the member to Suspended.
- Member Terminated: This changes the state of the member to Terminat= ed.
- Cluster Removed: This removes a given cluster from a servic= e.
- Service Removed: This removes a given service from the Topology.

Really appreciate your concerns on this.

Many Thanks
Imesh


On Thu, Dec 5, 2013 at 2:36 AM, chris sn= ow <chsnow123@gmail.com> wrote:

Hi Imesh,

Messaging is how other components communicate with LB, so I&= #39;m thinking that messaging is the transport, and the objects sent in the= messages represent the API.

A tester who would want to test the LB as a black box would = be interested in the API as that represents the external behaviour of the L= B.

In a soap based component, the API is easy to find because i= t is documented by the wsdl.=A0 However, in a component like LB that uses m= essaging and not soap, how would someone determine the API?

Does my question make any more sense now?

Many thanks,

Chris

Hi Chris,

I'm sorry for the confu= sion.=A0
Actually the load balancer does not expose a service. It= communicates with the other components via the message broker.

The standard is to implement service stubs for each service in p= lace them in incubator-stratos/service-stubs/. There we could find the WSDL= of each service. However please note that at the moment we may have number= of un-used service stubs in this folder.

Thanks
Imesh




On T= ue, Dec 3, 2013 at 2:57 PM, Udara Liyanage <udara@wso2.com> wro= te:
Hi chris,

=
If it is a web service there is a wsdl for the service. By looking at= the WSDl you can view the exposed methods, the input needed and the output= returned from them.

For example Cloud Controller has exposed a API called CloudControllerSe= rvice. You can find the related WSDL at the following folder.
[stratos]/= service-stubs/org.apache.stratos.cloud.controller.service.stub



On = Tue, Dec 3, 2013 at 2:03 AM, chris snow <chsnow123@gmail.com> wrote:
Hi Imesh,

Sorry, the question was: =A0&= quot;how can a developer/tester/architect examine the external API that is = exposed by the LB (and other Stratos components)?". =A0=A0
<= br>
A software tester would want to view the API so that they can determin= e how they will test the component through that API.
An architect= would want to view the API so that they can understand the services expose= d by the component without looking through the code base.

The API for a stratos component is the list of messages= that it supports. =A0How can an architect or tester find a list of message= s that each Stratos component supports?=A0

Many th= anks,

Chris





On Tue, Dec 3, 2013 at 1:52 AM, Imesh Gunaratne <<= a href=3D"mailto:imesh@apache.org" target=3D"_blank">imesh@apache.org&g= t; wrote:
Hi Chris,

There was no requirement to expose a SOAP/REST API in the load balancer. = Therefore there is no WSDL/WADL added.

BTW if your requirement is to examine the behaviour of= =A0TopologyEventProcessorChain it shouldn't be that difficult. Basicall= y each processor corresponds to its event, if it didn't find the requir= ed event it will pass the call to the next processor. Once it finds the mat= ching event it will build the Topology in Topology Manager and fire the mat= ching event listener.

Thanks
Imesh


On Tue, Dec 3, 2013 at 3:31 AM, chris snow <chsnow12= 3@gmail.com> wrote:
In th= e case of the LB MessageProcessorChain, the following processors have been = added to the list:

org.apache.stratos.messaging.message.processor.to= pology.ServiceCreatedEventProcessor org.apache.stratos.messaging.message.pr= ocessor.topology.ServiceRemovedEventProcessor org.apache.stratos.messaging.= message.processor.topology.ClusterCreatedEventProcessor org.apache.stratos.= messaging.message.processor.topology.ClusterRemovedEventProcessor org.apach= e.stratos.messaging.message.processor.topology.InstanceSpawnedEventProcesso= r org.apache.stratos.messaging.message.processor.topology.MemberStartedEven= tProcessor org.apache.stratos.messaging.message.processor.topology.MemberAc= tivatedEventProcessor org.apache.stratos.messaging.message.processor.topolo= gy.MemberSuspendedEventProcessor org.apache.stratos.messaging.message.proce= ssor.topology.MemberTerminatedEventProcessor org.apache.stratos.messaging.m= essage.processor.topology.CompleteTopologyEventIgnoreProcessor

In a component that exposes a SOAP/REST API,= I would look at the WSDL/WADL to examine the API. =A0As a WSDL/WADL aren&#= 39;t available for the LB component, how can I examine the API without havi= ng to run the code and inspect the MessageProcessorChain?

Many thanks,

Chris
=




<= /div>--
Check out m= y professional profile and connect with me on LinkedIn. http://lnkd.in/cw5k69



--


--001a11c1ff44c5bc0604ecc04f04--