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 43C8118248 for ; Tue, 16 Jun 2015 13:13:48 +0000 (UTC) Received: (qmail 59520 invoked by uid 500); 16 Jun 2015 13:13:48 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 59472 invoked by uid 500); 16 Jun 2015 13:13:48 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 59461 invoked by uid 99); 16 Jun 2015 13:13:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2015 13:13:47 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of angal.sh@gmail.com designates 74.125.82.49 as permitted sender) Received: from [74.125.82.49] (HELO mail-wg0-f49.google.com) (74.125.82.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2015 13:11:33 +0000 Received: by wgez8 with SMTP id z8so11968932wge.0 for ; Tue, 16 Jun 2015 06:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+Rsoid3HypP/QQIS+NJ7Bc7Mx7ZTyOuabNCQWaRRpjU=; b=hhc9Rhgb1soUA8BT3JcQdpCB0A0ZXTu7cyeXkVw8+cPm2yMfJAAjd7BfbRHDTKeUOm AlS/48h//yAuR1C/RaPTfHmjXDLntyRYLfp1nmVd4SXel6WVKvbhEKWd2Agzcm37qHD5 wE7cy1cLDQ2KfkEKJkJzlpZo8dZC7ozgb3kVLnjNteQ0nFfbCFXUqED4njYy2h3iXRtP Ka3jfbz3FlF7uVDAXFeM/jG1FtuAs2B9/KvgvCYieIc26s2fM6hMcASgD53e6vXq4Cmv +ekKoMvL7y/2jg2UGVoCr9Jn5nQvbAAgnafQI91sIbIWqhG9GRhDwdROQ+M6L3K9uILx 3TbA== MIME-Version: 1.0 X-Received: by 10.180.72.145 with SMTP id d17mr43395141wiv.69.1434460401553; Tue, 16 Jun 2015 06:13:21 -0700 (PDT) Received: by 10.194.187.134 with HTTP; Tue, 16 Jun 2015 06:13:21 -0700 (PDT) In-Reply-To: References: Date: Tue, 16 Jun 2015 18:43:21 +0530 Message-ID: Subject: Re: [GSOC] GCE Load Balancing Support for Stratos - weekly update From: Asanka Sanjaya Herath To: dev Cc: Isuru Haththotuwa , Gayan Gunarathne Content-Type: multipart/alternative; boundary=14dae9cc9492add5d80518a25658 X-Virus-Checked: Checked by ClamAV on apache.org --14dae9cc9492add5d80518a25658 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Gayan, =E2=80=8B > Can you please describe how do you achieve this? I think you are asking that how I implemented a way to wait for API call completion. There are three types of operations in GCE. 1. Global operations [1] 2. Region operations [2] 3. Zone operations [3] Therefore every time we do a API call, one of these operation objects will be created in IaaS side. That operation has an attribute called status. If status is DONE, operation is completed. So I periodically polled that operation object from IaaS in order to check whether the operation has been completed or not. I implemented three methods for this in GCEOperations.java class. a. waitForGlobalOperationCompletion(String operationName) b. waitForRegionOperationCompletion(String operationName) c. waitForZoneOperationCompletion(String operationName) =E2=80=8B > Once you implement the listening to topology events for configuring the > GCE LB, shall we have a Google hangout for this?=E2=80=8B I'm happy to have a hangout for this. I think I'll be able to complete that task within this week. I'll let you know once I'm done. [1]. https://cloud.google.com/compute/docs/reference/latest/globalOperation= s [2]. https://cloud.google.com/compute/docs/reference/latest/regionOperation= s [3]. https://cloud.google.com/compute/docs/reference/latest/zoneOperations On Tue, Jun 16, 2015 at 11:36 AM, Gayan Gunarathne wrote: > > Hi Asanka, > > On Tue, Jun 16, 2015 at 4:27 AM, Asanka Sanjaya Herath > wrote: > >> Hi, >> >> In last week I was working on following tasks. >> >> 1. Implementing a way to wait for API call completion >> > > Can you please describe how do you achieve this? > > >> 2. Getting the instance ID(The member ID in IaaS side) and adding the >> instance to target pool >> >> Now I think the basic functionality of the extension is completed. I >> tested it with a sample PHP application which is deployed using Stratos = and >> I was able to access the application through the GCE load balancer >> IP(Corresponding forwarding rule IP). >> > > Great.Nice to hear that. > > >> Here I'm listing TO DOs according to my opinion. >> >> 1. Implement the reload() method >> 2. Implement the stop() method >> 3. Adding a firewall rule >> 4. Add validation checks >> 5. Statistics publishing to CEP >> 6. Exception handling >> 7. Testing >> 8. Discuss and implementing a better way to start the load balancer(Stan= d >> alone mode or in application sign up process). >> 9. Standardize the code >> >> Any comment is highly appreciated. >> >> Github repo: >> >> https://github.com/asankasanjaya/stratos/tree/master/extensions/load-bal= ancer/gce-extension >> >> Good progress so far. Once you implement the listening to topology > events for configuring the GCE LB, shall we have a Google hangout for thi= s? > > > -- >> Thanks, >> Regards, >> ASH >> > > > > -- > > Gayan Gunarathne > Technical Lead, WSO2 Inc. (http://wso2.com) > Committer & PMC Member, Apache Stratos > email : gayang@wso2.com | mobile : +94 766819985 > > > > > > --=20 Thanks, Regards, ASH --14dae9cc9492add5d80518a25658 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Gayan,

<= /div>
=E2=80=8B
Can you please describe how do you= achieve this?=C2=A0

I think you are asking that how I implemented a way to wait f= or API call completion. There are three types of operations in GCE.
1. Global operations [1]
2. Region= operations [2]
3. Zone operations [3]

Therefore every time we do a API c= all, one of these operation objects will be created in IaaS side. That oper= ation has an attribute called status. If status is DONE, operation is compl= eted. So I periodically polled that operation object from IaaS in order to = check whether the operation has been completed or not.

I implemented three methods for this in GC= EOperations.java class.

a. waitForGlobalOperationCompletion(String operationName)=C2=A0
b.=C2=A0waitForRegionOperationCompletion(String operationNam= e)=C2=A0
c.=C2=A0waitForZoneOperationCompletion(Str= ing operationName)

=E2=80=8B
Once you implement the= =C2=A0listening to topology events fo= r configuring the GCE LB, shall we have a Google hangout for this?=E2=80=8B

I'm happy to hav= e a hangout for this. I think I'll be able to complete that task within= this week. I'll let you know once I'm done.


On Tue, Jun 16, 2015 = at 11:36 AM, Gayan Gunarathne <gayang@wso2.com> wrote:

Hi Asanka,
On = Tue, Jun 16, 2015 at 4:27 AM, Asanka Sanjaya Herath <<= a href=3D"mailto:angal.sh@gmail.com" target=3D"_blank">angal.sh@gmail.com> wrote:
Hi,
=

<= /div>
= In last week I was working on following tasks.

1. Implementing a way t= o wait for API call completion
=C2=A0
Can you please describe how do you achieve this?
= =C2=A0
2. Getting the instance ID(The mem= ber ID in IaaS side) and adding the instance to target pool

Now I thin= k the basic functionality of the extension is completed. I tested it with a= sample PHP application which is deployed using Stratos and I was able to a= ccess the application through the GCE load balancer IP(Corresponding forwar= ding rule IP).=C2=A0
=C2=A0
G= reat.Nice to hear that.=C2=A0

=

Here I'm listing TO DOs according to my opinion.
=

<= /div>
= 1. Implement the reload() method
2. Implement the stop() method
3. Adding a= firewall rule
4. Add validation checks
5. Statistics publishing to CEP
6. = Exception handling
7. Testing
8. Discuss and implementing a better way to s= tart the load balancer(Stand alone mode or in application sign up process).=
9. Standardize the code

Any comment is highly appreciated.

=
Githu= b repo:
=
Good progress so far= . Once you implement the=C2=A0listening to topology events for configuring the GC= E LB, shall we have a Google hangout for this?


--
<= font face=3D"times new roman, serif">Thanks,
Regards,
ASH



--

Gayan GunarathneTechnical Lead,=C2=A0WSO2 Inc.=C2=A0(http://w= so2.com)
Committer & PMC Mem= ber, Apache Stratos
email := =C2=A0gayang@wso2.com<= /a>=C2=A0 | = mobile :=C2=A0+94 766819985
=C2=A0
<= span>=C2=A0


=C2=A0



--
=
Thanks,
Regards= ,
ASH
--14dae9cc9492add5d80518a25658--