[Dev] WSO2 BPS 3.6.0-ALPHA is Released.

2016-07-17 Thread Hasitha Aravinda
Hi Devs,

BPS team is pleased to announce the Alpha release of WSO2 Business Process
Server 3.6.0. This release comes with both the run-time and the tooling
distributions.

*WSO2 BPS 3.6.0-ALPHA*

The distribution is available to download at [1].

[1] - https://github.com/wso2/product-bps/releases/tag/v3.6.0-alpha

This release​ ​contains following improvements and bug fixes [2].

[2] -
https://wso2.org/jira/secure/IssueNavigator.jspa?mode=hide=13142
​​
Known issue for this release [3].

[3] -
https://wso2.org/jira/secure/IssueNavigator.jspa?mode=hide=13143


*WSO2 BPS Tooling 3.6.0-ALPHA2*

The tooling distribution is available to download at [4].

[4] -
https://github.com/wso2/devstudio-tooling-bps/releases/tag/Released-release-3.6.0-alpha2-alpha2-2016-07-15-172216

It contains following improvements and bug fixes [5].

[5] -
https://wso2.org/jira/secure/IssueNavigator.jspa?mode=hide=13144


~ WSO2 BPS Team ~

-- 
--
Hasitha Aravinda,
Associate Technical Lead,
WSO2 Inc.
Email: hasi...@wso2.com
Mobile : +94 718 210 200
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] WSO2 App Manager 1.2.0 RC1

2016-07-17 Thread Dinusha Senanayaka
Found issue [1] which need to be fixed. Hence closing this vote and we will
be opening RC2 vote soon.

[1] https://wso2.org/jira/browse/APPM-1568

Regards,
Dinusha.

On Sun, Jul 17, 2016 at 10:05 PM, Lakshani Gamage  wrote:

> Hi all,
>
> I tested followings.
>
>- Business Owner functionalities.
>- App creation and life cycle changing flows.
>- App documentation. (Publisher and Store)
>- Sorting and Searching in Store.
>- Smoke tested with Oracle DB.
>
> Works fine. I didn't encounter any issues.
>
> [+] Stable - go ahead and release
> Thanks and Regards,
> Lakshani.
>
> On Sat, Jul 16, 2016 at 5:19 PM, Thilini Shanika 
> wrote:
>
>> Adding Architecture
>>
>> On Sat, Jul 16, 2016 at 6:36 AM, Thilini Shanika 
>> wrote:
>>
>>> Hi Devs,
>>>
>>> This is the 1st Release Candidate of the WSO2 App Manager 1.2.0
>>>
>>> Please download, test the product and vote. Vote will be open for 72
>>> hours or as needed.
>>> Refer to github readme for guides.
>>>
>>> The distribution is available to download at [1]
>>>
>>> [1] :
>>> https://github.com/wso2/product-app-manager/releases/download/v1.2.0-RC1/wso2appm-1.2.0.zip
>>>
>>> Fixed Issue in [2], known issues [3], tag to be vote upon [4]
>>>
>>> [2] : https://wso2.org/jira/issues/?filter=13104
>>> [3] : https://wso2.org/jira/browse/WSFRUBY-72?filter=13140
>>> [4] : https://github.com/wso2/carbon-appmgt/tree/v1.2.0-RC1
>>>
>>> Please vote as follows.
>>> [+] Stable - go ahead and release
>>> [-]  Broken - do not release (please explain why)
>>>
>>> Thanks,
>>> App Manager Team
>>>
>>> --
>>> Thilini Shanika
>>> Senior Software Engineer
>>> WSO2, Inc.; http://wso2.com
>>> 20, Palmgrove Avenue, Colombo 3
>>>
>>> E-mail: tgtshan...@gmail.com
>>>
>>>
>>
>>
>> --
>> Thilini Shanika
>> Senior Software Engineer
>> WSO2, Inc.; http://wso2.com
>> 20, Palmgrove Avenue, Colombo 3
>>
>> E-mail: tgtshan...@gmail.com
>>
>>
>> ___
>> Architecture mailing list
>> architect...@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Lakshani Gamage
>
> *Software Engineer, WSO2*
>
> *Mobile : +94 71 5478184 <%2B94%20%280%29%20773%20451194>*
> *Blog : http://lakshanigamage.blogspot.com/
> *
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Dinusha Dilrukshi
Associate Technical Lead
WSO2 Inc.: http://wso2.com/
Mobile: +94725255071
Blog: http://dinushasblog.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] Provide Support to run Jaggery apps in Tomcat Server

2016-07-17 Thread Chanaka Cooray
Hi,

I have tested this feature with the AS6 and it seems to be working fine. To
proceed with the integration of this with AS, we need a jaggery release
with the feature.

Thanks,
Chanaka.

On Mon, Jul 4, 2016 at 3:10 PM, Manjula Rathnayake 
wrote:

> Hi Nisala and Kasun,
>
> Great. This will help us to include AS6 as a jaggery runtime in AppCloud.
>
> thank you.
>
> On Mon, Jul 4, 2016 at 3:04 PM, KasunG Gajasinghe  wrote:
>
>>
>>
>> On Mon, Jul 4, 2016 at 1:48 PM, Nisala Nanayakkara 
>> wrote:
>>
>>> Hi Manjula,
>>>
>>> Yes.Jaggery support will be inbuilt into the server with the release of
>>> AS-6.0.0 next milestone. This email and documentation is provided to inform
>>> the procedure of running jaggery apps in a pure tomcat server, not in the
>>> AS-6.0.0. I will update the finalized documentation and configuration
>>> details for AS-6.0.0 in a separate mail thread, once we finished the
>>> fine-tuning process.
>>>
>>> Thanks,
>>> Nisala
>>>
>>> On Mon, Jul 4, 2016 at 1:39 PM, Manjula Rathnayake 
>>> wrote:
>>>
 Hi all,

 IIUC, when we release the next AS-6.0.0 milestone, jaggery support is
 inbuilt into the server. And users do not need to follow above instructions
 to copy jars etc. Please correct If it is not.

>>>
>> Yes, that's the case. So, we need separate documentation on how to deploy
>> Jaggery apps in AS6 as well.
>>
>>
>>>
 thank you.

 On Mon, Jul 4, 2016 at 12:42 PM, Sinthuja Ragendran 
 wrote:

> Hi,
>
> Anyhow ultimately when all the carbon products move to AS 6.0 based
> platform, we can merge all those into one.
>
> Thanks,
> Sinthuja.
>
> On Mon, Jul 4, 2016 at 12:38 PM, Nisala Nanayakkara 
> wrote:
>
>> Hi Kasun,
>>
>> Yes.We can do a performance round. Currently we manage the Tomcat
>> Jaggery/ AS6 support code base under a new branch [1] in our jaggery
>> repository. Current jaggery is based on tomcat version 7 and Tomcat 
>> Jaggery
>> implementation is based on tomcat version 8. So there are some api 
>> changes
>> in the jaggery level. So it is difficult to manage these codebases in 
>> same
>> place.
>>
>> Thanks,
>> Nisala
>>
>> On Sun, Jul 3, 2016 at 9:01 AM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>> Good work Nisala.
>>>
>>> Can we also do a performance round to see whether there are any perf
>>> gains when running Jaggery apps in vanilla Tomcat/AS6?
>>>
>>> How are you going to manage the codebase for Carbon vs Tomcat
>>> Jaggery support? Better if we can maintain it in the same place.
>>>
>>> On Sat, Jul 2, 2016 at 12:51 PM, Nisala Nanayakkara >> > wrote:
>>>
 Hi all,

 This is an update regarding the feature 'Provide Support to run
 Jaggery apps in Tomcat Server'.

 At present Jaggery scripts can only be executed in a jaggery
 server. Because Jaggery Server which is powered by WSO2 carbon OSGi
 Runtime, is the Runtime Environment that hosts Jaggery applications. 
 The
 goal of this feature is to provide support to run jaggery apps in a 
 pure
 tomcat server without any modifications to the jaggery apps.This will
 enable developers to write Jaggery scripts and directly deploy them in
 apache tomcat server. So this will improve the flexibility of the 
 jaggery
 apps.

 This is an extension for the Apache tomcat 8 to run the jaggery app
 without modifying it. Although this is implemented as a requirement of 
 WSO2
 Application Server 6, Users who want to run jaggery apps without 
 jaggery
 server, can use this feature to run their jaggery apps in Apache tomcat
 server.

 I have attached the documentation and sample jaggery with this
 email. Please find these attachments and relevant jaggery branch 
 here[1].
 Please feel free to ask any questions.

 [1] - https://github.com/wso2/jaggery/tree/tomcat-8.0.x-jaggery

 Thanks,
 Nisala

 --
 *Nisala Niroshana Nanayakkara,*
 Software Engineer
 Mobile:(+94)717600022
 WSO2 Inc., http://wso2.com/

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>>
>>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>>> email: kasung AT spamfree wso2.com
>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>> blog: http://kasunbg.org
>>>
>>>
>>>
>>
>>
>>
>> --
>> *Nisala 

Re: [Dev] [Mesos artifacts] Deploy script is failing to check database service

2016-07-17 Thread Imesh Gunaratne
On Thu, Jul 7, 2016 at 10:51 AM, Isuru Haththotuwa  wrote:

> Hi,
>
> Yes, myself and Pubudu also faced this issue, lets fix it properly.
>
> On Wed, Jul 6, 2016 at 10:57 PM, Pubudu Gunatilaka 
> wrote:
>
>> Hi Akila,
>>
>> Yes we faced several issues related to this. Apart from what you have
>> mentioned, we encountered mysql app name is not getting resolved. This
>> could be the delay in updating Mesos DNS. For these issues we looking into
>> following options.
>>
>> *Option 1:*
>> Use a sleep before deploying a carbon server. Not the best option.
>>
>> *Option 2:*
>> Depend on the health status results.
>>
>> Currently, we do use a health check for mysql apps. Using dcos CLI we can
>> check the status of the app whether the app is alive or not. But this
>> cannot guarantee the DBs are ready to serve requests and Mesos DNS is
>> updated.
>>
>

> What if we query the Mesos DNS in addition to port checking to see if its
> updated? AFAIR what we are seeing is an java.net.UnknownHostException,
> related to the DB hostname.
>

​May be we can wait for MySQL sockets as we do for Carbon server transports.

Thanks​

-- 
*Imesh Gunaratne*
Software Architect
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: https://medium.com/@imesh TW: @imesh
lean. enterprise. middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] "When createAppInDataBase failed, adding addAppCreationEvent also getting failed"

2016-07-17 Thread Manjula Rathnayake
Hi all,

+1. This is about failure of first action of app creation, if it is failed,
just show error message and continue. No need to update database.

thank you.

On Mon, Jul 18, 2016 at 9:18 AM, Mahesh Chinthaka  wrote:

> Yes adding a failure pop up message would be enough IMO. I forgot to
> mention that in my previous reply. Thanks Danushka
>
> On Mon, Jul 18, 2016 at 9:13 AM, Danushka Fernando 
> wrote:
>
>> To be specific, AFAIK even we name these as events, This is not for data
>> publishing kind of a thing. This is only to render the ui. Then there is an
>> issue of UI when its broken in earlier stages it don't show the msg box
>> with msg of application creation failed. So before showing that it should
>> show a red 'X' mark in-front of particular action. eg: Building Docker
>> Image.
>> IIRC when the all events got removed from DB, UI keep spinning with empty
>> table. So lets not add the entry of failed event. And then when there are
>> no events in event table for configured time lets popup failure message.
>> @Manjula: WDYT?
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729
>>
>> On Mon, Jul 18, 2016 at 8:50 AM, Mahesh Chinthaka 
>> wrote:
>>
>>> Hi All,
>>>
>>> Isnt it better to avoid adding an event at this point ?
>>> Since nothing has been created related to application , no need of
>>> adding an event right ?
>>>
>>> WDYT ?
>>>
>>> On Sat, Jul 9, 2016 at 8:19 AM, Amalka Subasinghe 
>>> wrote:
>>>
 Hi,

 In our app creation logic, we have number of steps and when each step
 failed/succeeded, we add a event to a event table.

 We found a situation, where the createAppInDataBase step failed, then
 the addAppCreationEvent also getting failed.
 That's because, in createAppInDataBase we add application and version
 data to the database and then in addAppCreationEvent we query the
 AC_VERSION table to get the application version.

 How we fix this issue? although the createAppInDataBase step failed,
 addAppCreationEvent cannot be failed.

 [1] https://wso2.org/jira/browse/APPCLOUD-206

 Thanks
 Amalka


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>>> Email: mahe...@wso2.com | Web: www.wso2.com
>>>
>>
>>
>
>
> --
> *Mahesh Chinthaka Vidanagama* | Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
> Email: mahe...@wso2.com | Web: www.wso2.com
>



-- 
Manjula Rathnayaka
Associate Technical Lead
WSO2, Inc.
Mobile:+94 77 743 1987
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] "When createAppInDataBase failed, adding addAppCreationEvent also getting failed"

2016-07-17 Thread Mahesh Chinthaka
Yes adding a failure pop up message would be enough IMO. I forgot to
mention that in my previous reply. Thanks Danushka

On Mon, Jul 18, 2016 at 9:13 AM, Danushka Fernando 
wrote:

> To be specific, AFAIK even we name these as events, This is not for data
> publishing kind of a thing. This is only to render the ui. Then there is an
> issue of UI when its broken in earlier stages it don't show the msg box
> with msg of application creation failed. So before showing that it should
> show a red 'X' mark in-front of particular action. eg: Building Docker
> Image.
> IIRC when the all events got removed from DB, UI keep spinning with empty
> table. So lets not add the entry of failed event. And then when there are
> no events in event table for configured time lets popup failure message.
> @Manjula: WDYT?
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
> On Mon, Jul 18, 2016 at 8:50 AM, Mahesh Chinthaka 
> wrote:
>
>> Hi All,
>>
>> Isnt it better to avoid adding an event at this point ?
>> Since nothing has been created related to application , no need of adding
>> an event right ?
>>
>> WDYT ?
>>
>> On Sat, Jul 9, 2016 at 8:19 AM, Amalka Subasinghe 
>> wrote:
>>
>>> Hi,
>>>
>>> In our app creation logic, we have number of steps and when each step
>>> failed/succeeded, we add a event to a event table.
>>>
>>> We found a situation, where the createAppInDataBase step failed, then
>>> the addAppCreationEvent also getting failed.
>>> That's because, in createAppInDataBase we add application and version
>>> data to the database and then in addAppCreationEvent we query the
>>> AC_VERSION table to get the application version.
>>>
>>> How we fix this issue? although the createAppInDataBase step failed,
>>> addAppCreationEvent cannot be failed.
>>>
>>> [1] https://wso2.org/jira/browse/APPCLOUD-206
>>>
>>> Thanks
>>> Amalka
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>> Email: mahe...@wso2.com | Web: www.wso2.com
>>
>
>


-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] "When createAppInDataBase failed, adding addAppCreationEvent also getting failed"

2016-07-17 Thread Danushka Fernando
To be specific, AFAIK even we name these as events, This is not for data
publishing kind of a thing. This is only to render the ui. Then there is an
issue of UI when its broken in earlier stages it don't show the msg box
with msg of application creation failed. So before showing that it should
show a red 'X' mark in-front of particular action. eg: Building Docker
Image.
IIRC when the all events got removed from DB, UI keep spinning with empty
table. So lets not add the entry of failed event. And then when there are
no events in event table for configured time lets popup failure message.
@Manjula: WDYT?

Thanks & Regards
Danushka Fernando
Senior Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Mon, Jul 18, 2016 at 8:50 AM, Mahesh Chinthaka  wrote:

> Hi All,
>
> Isnt it better to avoid adding an event at this point ?
> Since nothing has been created related to application , no need of adding
> an event right ?
>
> WDYT ?
>
> On Sat, Jul 9, 2016 at 8:19 AM, Amalka Subasinghe  wrote:
>
>> Hi,
>>
>> In our app creation logic, we have number of steps and when each step
>> failed/succeeded, we add a event to a event table.
>>
>> We found a situation, where the createAppInDataBase step failed, then the
>> addAppCreationEvent also getting failed.
>> That's because, in createAppInDataBase we add application and version
>> data to the database and then in addAppCreationEvent we query the
>> AC_VERSION table to get the application version.
>>
>> How we fix this issue? although the createAppInDataBase step failed,
>> addAppCreationEvent cannot be failed.
>>
>> [1] https://wso2.org/jira/browse/APPCLOUD-206
>>
>> Thanks
>> Amalka
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Mahesh Chinthaka Vidanagama* | Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
> Email: mahe...@wso2.com | Web: www.wso2.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] "When createAppInDataBase failed, adding addAppCreationEvent also getting failed"

2016-07-17 Thread Mahesh Chinthaka
Hi All,

Isnt it better to avoid adding an event at this point ?
Since nothing has been created related to application , no need of adding
an event right ?

WDYT ?

On Sat, Jul 9, 2016 at 8:19 AM, Amalka Subasinghe  wrote:

> Hi,
>
> In our app creation logic, we have number of steps and when each step
> failed/succeeded, we add a event to a event table.
>
> We found a situation, where the createAppInDataBase step failed, then the
> addAppCreationEvent also getting failed.
> That's because, in createAppInDataBase we add application and version data
> to the database and then in addAppCreationEvent we query the AC_VERSION
> table to get the application version.
>
> How we fix this issue? although the createAppInDataBase step failed,
> addAppCreationEvent cannot be failed.
>
> [1] https://wso2.org/jira/browse/APPCLOUD-206
>
> Thanks
> Amalka
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: mahe...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Update - Provide runtime environment for jaggery apps in AS6

2016-07-17 Thread Maheshika Goonetilleke
Hi Kalpa

Created the job.

On Sat, Jul 16, 2016 at 9:36 AM, Kalpa Welivitigoda  wrote:

> Hi Maheshika,
>
> It seems the job is not yet set up, would you please do the needful?
>
>
> On Thu, Jul 7, 2016 at 11:11 AM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> Hi Maheshika,
>>
>> Can we add a jenkins build job for this branch?
>>
>> On Thu, Jun 30, 2016 at 7:17 AM, Nisala Nanayakkara 
>> wrote:
>>
>>> Hi all,
>>>
>>> Please find the branch here.
>>>
>>> [1] - https://github.com/wso2/jaggery/tree/tomcat-8.0.x-jaggery
>>>
>>> Thanks,
>>> Nisala
>>>
>>> On Thu, Jun 30, 2016 at 7:12 AM, Nisala Nanayakkara 
>>> wrote:
>>>
 Hi all,

 We have created a seperate branch[1] with the changes required for
 providing runtime environment for jaggery apps in AS6. Currently there is
 no jenkins builder setup for this, Please get the 1.0.0-SNAPSHOT version by
 building the branch in local repo. Please inform me if there are any 
 issues.

 Thanks,
 Nisala

 --
 *Nisala Niroshana Nanayakkara,*
 Software Engineer
 Mobile:(+94)717600022
 WSO2 Inc., http://wso2.com/

>>>
>>>
>>>
>>> --
>>> *Nisala Niroshana Nanayakkara,*
>>> Software Engineer
>>> Mobile:(+94)717600022
>>> WSO2 Inc., http://wso2.com/
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards,
>
> Kalpa Welivitigoda
> Senior Software Engineer, WSO2 Inc. http://wso2.com
> Email: kal...@wso2.com
> Mobile: +94776509215
>
> [image: http://wso2.com/signature] 
>



-- 

Thanks & Best Regards,

Maheshika Goonetilleke
Senior Engineering Process Coordinator

*WSO2 Inc*
*email   : mahesh...@wso2.com *
*mobile : +94 773 596707*
*www: :http://wso2.com *lean . enterprise . middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: GSOC2016: [ML][CEP] [SAMOA]Predictive analytic with online data for WSO2 Machine Learner-Samoa Integration

2016-07-17 Thread Maheshakya Wijewardena
Hi Mahesh,

Can you  please share your samoa project?

On Sun, Jul 17, 2016 at 11:19 AM, Mahesh Dananjaya <
dananjayamah...@gmail.com> wrote:

>
> -- Forwarded message --
> From: Mahesh Dananjaya 
> Date: Sun, Jul 17, 2016 at 11:18 AM
> Subject: Re: GSOC2016: [ML][CEP] [SAMOA]Predictive analytic with online
> data for WSO2 Machine Learner-Samoa Integration
> To: Maheshakya Wijewardena 
>
>
> Hi Maheshakaya,
> just need a little help. In Samoa when we want to run a class what is does
> it used this commands [1],
> 1. bin/samoa storm target/SAMOA-Storm-0.0.1-SNAPSHOT.jar
> "ClusteringEvaluation"
> 2. bin/samoa storm target/SAMOA-Storm-0.0.1-SNAPSHOT.jar
> "PrequentialEvaluation -d /tmp/dump.csv -i 100 -f 10 -l
> (classifiers.trees.VerticalHoeffdingTree -p 4) -s
> (generators.RandomTreeGenerator -c 2 -o 10 -u 10)"
>
> what is does is call a class named LocalDoTask [4] and pass this string as
> argument.After that that LocalDoTask call the relevent Tasks such as
> ClusteringEvaluation or PrequentialEvaluation. [2].
>
> Now i have add samoa dependencies to my new maven project, where i used
> original samoa source to write examples and test then earlier.Now i want to
> push them into my new java project with samoa dependencies. I added
> dependency and it was built fine. Now i am calling my local DoTask.java [3]
> file as same as i did with samoa with,
> java -cp target/streaming-1.0-SNAPSHOT.jar org.gsoc.samoa.streaming.DoTask
> "org.gsoc.samoa.streaming.ClusteringEvaluation"
> But seems to be i am incorrect in some place.
> Error: A JNI error has occurred, please check your installation and try
> again
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/samoa/topology/ComponentFactory
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
> at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
> at java.lang.Class.getMethod0(Class.java:3018)
> at java.lang.Class.getMethod(Class.java:1784)
> at
> sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
> at
> sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.samoa.topology.ComponentFactory
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 7 more
>
>
> can i actually call the Task like this.
>
> BR,
> Mahesh.
>
> [1]
> https://samoa.incubator.apache.org/documentation/Prequential-Evaluation-Task.html
> [2]
> https://github.com/apache/incubator-samoa/blob/releases/0.4.0-incubating-RC0/samoa-api/src/main/java/org/apache/samoa/tasks/ClusteringEvaluation.java
> [3]
> https://github.com/dananjayamahesh/GSOC2016/tree/master/gsoc/samoa/streaming/src/main/java/org/gsoc/samoa/streaming
> [4]
> https://github.com/apache/incubator-samoa/tree/releases/0.4.0-incubating-RC0/samoa-local/src/main/java/org/apache/samoa
>
>
> On Thu, Jul 14, 2016 at 3:47 PM, Mahesh Dananjaya <
> dananjayamah...@gmail.com> wrote:
>
>> Hi srinath,
>> sure.i am working on it.thank you.
>> regards,
>> Mahesh.
>>
>> On Thu, Jul 14, 2016 at 11:12 AM, Srinath Perera 
>> wrote:
>>
>>> Hi Mahesh,
>>>
>>> Let's focus on getting SAOMA work with CEP. It is OK to be limited to
>>> few algorithms.
>>>
>>> --Srinath
>>>
>>> On Thu, Jul 14, 2016 at 10:49 AM, Mahesh Dananjaya <
>>> dananjayamah...@gmail.com> wrote:
>>>
 Hi Maheshakya,
 I think we can build new tasks [1] like the one in execution plan in
 cep with samoa. I will try to build a one.
 regards,
 Mahesh.
 [1]
 https://samoa.incubator.apache.org/documentation/Developing-New-Tasks-in-SAMOA.html


 On Thu, Jul 14, 2016 at 10:35 AM, Mahesh Dananjaya <
 dananjayamah...@gmail.com> wrote:

> Hi Maheshakya,
> I am building and running samoa to see its functionality. In samoa
> still we have limited supports in algorithms. Samoa supports only
> classification and clustering with streams. It also use kind of
> StreamProcessor, like the one we use in StreamProcessor extension.  I was
> getting started with Samoa referring to this page [1]. Then i ran couple 
> of
> examples to identified the flow. Samoa use hadoop framework instead spark
> for distribution. But i am using it in a local mode. When i see the Samoa
> core there is only limited algorithms. IMO if we are going to use Samoa we
> have to limit the functionality and algorithms [2]. When i go to developer
> corner in [3], it seems to be something like CEP extension that we are
> using currenlty. SO in Samoa though the algorihtms are limited, they have
> implemented streaming 

Re: [Dev] [GSOC 16] Initial Project Progress

2016-07-17 Thread Osura Rathnayake
Hi Isuru,

Please accept my apologies I have messed up names in my last email. I'm not
going to be available today due to an unavoidable circumstance so can we
please have the meeting on Wednesday? Extremely sorry if it made any
inconvenience. I will update you with a detailed email today for sure.

Thanks in advance,

On Fri, Jul 15, 2016 at 4:04 PM, Isuru Haththotuwa  wrote:

> Hi Osura,
>
> Can you send a detailed updated on the current status? Shall we have a
> meeting on Monday to review the progress.
>
> On Tue, Jul 12, 2016 at 2:03 PM, Osura Rathnayake 
> wrote:
>
>> Hi Imesh,
>>
>> About dynamically adding members to the load balancer, I will cross check
>> it with auto-scaling. I couldn't look into that from auto-scaling end since
>> I couldn't test it yet.
>>
>> about monitoring, yes we can do a POC on that.
>>
>> thanks,
>>
>> On Tue, Jul 12, 2016 at 12:53 PM, Imesh Gunaratne  wrote:
>>
>>> On Tue, Jul 12, 2016 at 12:09 PM, Osura Rathnayake 
>>> wrote:
>>>
 Hi Imesh,

 About centralized logging, I'm trying to get logs to the Log Analytics
 using few methods supported in azure. We can either parse logs in to
 syslogs and send to the Log Analytics or create custom logs specifying the
 logs location. As you said, logs shouldn't be in .txt extension, I got it
 clarified from a azure blog. Will update you soon after I could resolve it.

 ​Right, thanks for the update!​
>>>
>>>
 No you can't dynamically add VMs to the load balancer. Backend pool,
 where all the VMs reside, should be predefined.

>>>
>>> ​Technically that capability should be there. Otherwise we would not be
>>> able to autoscale a server cluster dynamically.
>>> ​
>>>
>>>
 you can auto-scale using scale sets(I'm still researching about it),
 that's the equivalent of AWS auto scaling group . also you can scale up or
 down a VM if it exceeds a certain parameter like CPU usage, using
 monitoring rules.

 *Monitoring *


 Azure has a native monitoring tool which involves collecting and
 tracking metrics, analyzing log files, defining custom metrics and logging
 generated by specific applications or workloads running in Virtual
 Machines. Azure represents monitored data in a graphical manner using
 charts. Monitoring also facilitates triggering alarms when certain
 conditions are met and also it can be configured to take actions on the met
 conditions. Monitoring is done by the Diagnostic Extension and it has
 following capabilities.

 · Collects and uploads the system performance information from
 the Linux VM to the user's storage table, including diagnostic and syslog
 information.

 · Enables users to customize the data metrics that will be
 collected and uploaded.

 · Enables users to upload specified log files to a designated
 storage table.

 Note: Azure storage tables are a non-relational, key-value-pair,
 storage system suitable for storing massive amounts of unstructured data.


 We can add monitor rules so that when an alert triggers it notifies the
 admins via email. Furthermore we can set to take automated actions. Azure
 automate actions by running runbooks. A runbook is a set of tasks that
 perform some automated process in Azure Automation. We can create our own
 runbooks as well. Available runbooks include,

 · Restart VM

 · Stop VM

 · Remove VM

 · Scale up VM

 · Scale down VM

 When scaling up it sets the virtual machine to the next larger size
 within the size group and when scaling down it sets the virtual machine to
 the next smaller size within the size group.

 More about runbooks and automation [1]

>>>
>>> ​Sounds good, will us be able to do a POC on this?​
>>>
>>>

 *Auto scaling *


 Auto-scaling is the process of dynamically allocating the resources
 required by an application to match performance requirements. Virtual
 machine scale sets are an Azure Compute resource you can use to deploy and
 manage a set of identical VMs. With all VMs configured the same, VM scale
 sets are designed to support true auto-scale  no pre-provisioning of VMs is
 required – and as such makes it easier to build large-scale services
 targeting big compute, big data, and containerized workloads [2].


 Note: I couldn’t practically do this as my azure free account lets me
 have only 4 cores and I have used all of them on my current deployment. I’m
 getting a new azure account from one of my friends in a day so hopefully I
 will do this on it and update you.

>>>
>>> ​Great! Thanks!​
>>>
>>>

 [1]
 

Re: [Dev] Is it best practice to return null or an empty object from a method in DAO layer?

2016-07-17 Thread Rasika Perera
Hi All,


> Considering a method returning a user object the client code should not be
> able to proceed further if there is no user.

 This is the use case we need to achieve. How do we enforce clients to
*not* to proceed if the user is not found? I really do promote Design by
Contract . NULL will
give over-flexibility here and it is not what we asked for either. Further,
it might caused redundant NULL checks and NPEs for FREE.

Exceptions are meant to be used for exceptional cases, using them for flow
> control is a bad practice. So I don't think it is a good practice to throw
> Exceptions instead of returning null. In addition using exceptions is
> costly for performance.

Yes, Exceptions might be costly if you used it in bad way. Why not for flow
control? If your code running happy path most of the times, returning
exception on a trap would not be that harmfull. Exceptions are much similar
to other objects except the native call fillInStackTrace
.
Even
Throwable has a constructor without a stacktrace, if you worried on
performance. My rule of thumb is; If performance matters so much, you may
need to re-consider writing your application in Java instead try C or C++.
Java meant to be high-level and code should be self explanatory and
maintainable[1]. Please refer "Null References: The Billion Dollar Mistake"
by T. Hoare[2].

This is my two cents for NULLs ;)

Choosing return NULL over Exceptions is a choice of writing *unreliable*
applications over bad-performance.

Thanks,
Rasika

[1] http://wolfie.github.io/2010/03/14/exceptional-heresy.html
[2]
https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare

On Sun, Jul 17, 2016 at 5:58 PM, Udara Liyanage  wrote:

>
>
> On Sun, Jul 17, 2016 at 2:53 PM, Nuwan Pallewela  wrote:
>
>> Hi,
>>
>> On Wed, Jul 13, 2016 at 10:15 AM, Sabra Ossen  wrote:
>>
>>> Hi,
>>>
>>> Thank you all for your prompt responses :)
>>>
>>> So if it's an ArrayList/Map it's better to return an empty object
>>> rather than null. Got it.
>>>
>>> Regarding a POJO object IMO the usage of null, empty object or exception
>>> depends on the scenario being considered.
>>>
>>> Based on Rasikas' reply since the jaggery level code is using the DAO
>>> method (via manager interface) basically if no user is found then the
>>> exception thrown should be propagated and in the UI an appropriate message
>>> is rendered. Also since anyone else could be using the back end, when an
>>> exception is thrown they would not have to be aware of the internal
>>> implementation (if null or an empty object is returned, specifically he
>>> should be aware if an empty object is returned so that he should write his
>>> front end code accordingly).
>>>
>>> IMO returning an exception is clearer in terms of code but I guess the
>>> discussion could continue further until a guideline is specified.
>>>
>> +1 for throwing an exception in general. If we return a null or empty
>> object if data is unavailable, we may have to do a null check or empty
>> object check when trying to process it most probably. And that check may
>> tend to hide the original problem of unavailability of data and hard to
>> debug if we face an error in a different place because of that.IMO throwing
>> a custom exception which we could handle and log later or give an error
>> message  to user will be more suitable.
>> What to use with ArrayList and Maps is also depends on how we are going
>> to manipulate the returned value. If we are going to access data in a
>> ArrayList by index calling index values individually, it is better to use
>> exception otherwise we may need to have a null check before that. Same
>> applies to Maps. If we are going to process each element in a ArrayList we
>> could use Iterator and process. In that case empty ArrayList would do the
>> job. So there is not going to be a one for all cases solution in this
>> argument. It will depend on how we are going to process that returned value
>> and the nature of the application.
>>
> Exceptions are meant to be used for exceptional cases, using them for flow
> control is a bad practice. So I don't think it is a good practice to throw
> Exceptions instead of returning null. In addition using exceptions is
> costly for perfomance.
>
> If you return a  empty object the calling function will invoke functions
> of the object which will result in undesirable state. Some object creating
> initialize some of its members which may be invoked by the calling function
> which we don't intend.
>
> For POJO(I don't have idea about collections) it is OK to return null if
> no data available or simply functions does not have anything to return and
> let the calling function deal with it. You can document return values and
> when it returns null.
>
>>
>>> Regards.
>>>
>>>
>>> On Wed, 

Re: [Dev] [VOTE] Release WSO2 MSF4J 2.0.0 RC3

2016-07-17 Thread Rasika Perera
Hi All,

I have tested MSF4J 2.0.0 RC2 with the following and found no issue.

Correction. It should be MSF4J 2.0.0 RC3.

Thanks

On Sun, Jul 17, 2016 at 11:45 PM, Rasika Perera  wrote:

> Hi All,
>
> I have tested MSF4J 2.0.0 RC2 with the following and found no issue.
>
>- Built and tested a sample for multivalued map of form-params.
>- Built and tested a sample for responding a JSON String as
>application/json contentType
>
> [x] Stable - go ahead and release
>
> Regards,
> Rasika
>
> On Sun, Jul 17, 2016 at 6:39 PM, Ruwan Abeykoon  wrote:
>
>> +1
>>
>> I tested with a utility project [1] and found no issues.
>>
>> [x] Stable - Go ahead and release
>>
>> [1]https://github.com/ruwanta/delaying-proxy
>>
>> Cheers,
>> Ruwan
>>
>> On Fri, Jul 15, 2016 at 9:23 AM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Devs,
>>>
>>> This is the 3rd Release Candidate of the WSO2 MSF4J (Microservices
>>> Framework for Java) 2.0.0.
>>>
>>> Please download, test the framework and vote. Vote will be open for 72
>>> hours or as needed.
>>> Refer to github readme for guides.
>>>
>>> *​Source and binary distribution files:*
>>> *https://github.com/wso2/msf4j/releases/tag/v2.0.0-rc3
>>> *
>>>
>>> *Maven staging repository:*
>>> *https://maven.wso2.org/nexus/content/repositories/orgwso2msf4j-1004
>>> *
>>>
>>> *The tag to be voted upon:*
>>> *https://github.com/wso2/msf4j/tree/v2.0.0-rc3
>>> *
>>>
>>>
>>>
>>> [ ] Broken - Do not release (explain why)
>>> [ ] Stable  - Go ahead and release
>>>
>>> Thank you,
>>> WSO2 MSF4J Team
>>>
>>>
>>> --
>>> Thusitha Dayaratne
>>> Software Engineer
>>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>>
>>> Mobile  +94712756809
>>> Blog  alokayasoya.blogspot.com
>>> Abouthttp://about.me/thusithathilina
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Ruwan Abeykoon*
>> *Associate Director/Architect**,*
>> *WSO2, Inc. http://wso2.com  *
>> *lean.enterprise.middleware.*
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> With Regards,
>
> *Rasika Perera*
> Software Engineer
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> [image: wso2-signature-general.png] 
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>



-- 
With Regards,

*Rasika Perera*
Software Engineer
LinkedIn: http://lk.linkedin.com/in/rasika90

[image: wso2-signature-general.png] 

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC 16] Initial Project Progress

2016-07-17 Thread Imesh Gunaratne
On Sun, Jul 17, 2016 at 8:46 AM, Osura Rathnayake 
wrote:

> Hi Imesh,
>
>  I think it was Isuru who asked this :-)​



> Sure we shall have a meeting on Monday to review the progress. I will send
> a detailed update on the current status by tonight. Sorry for the delay.
>

​+1

>
> Thanks,
>
> On Fri, Jul 15, 2016 at 4:04 PM, Isuru Haththotuwa 
> wrote:
>
>> Hi Osura,
>>
>> Can you send a detailed updated on the current status? Shall we have a
>> meeting on Monday to review the progress.
>>
>> On Tue, Jul 12, 2016 at 2:03 PM, Osura Rathnayake 
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> About dynamically adding members to the load balancer, I will cross
>>> check it with auto-scaling. I couldn't look into that from auto-scaling end
>>> since I couldn't test it yet.
>>>
>>> about monitoring, yes we can do a POC on that.
>>>
>>> thanks,
>>>
>>> On Tue, Jul 12, 2016 at 12:53 PM, Imesh Gunaratne 
>>> wrote:
>>>
 On Tue, Jul 12, 2016 at 12:09 PM, Osura Rathnayake 
 wrote:

> Hi Imesh,
>
> About centralized logging, I'm trying to get logs to the Log Analytics
> using few methods supported in azure. We can either parse logs in to
> syslogs and send to the Log Analytics or create custom logs specifying the
> logs location. As you said, logs shouldn't be in .txt extension, I got it
> clarified from a azure blog. Will update you soon after I could resolve 
> it.
>
> ​Right, thanks for the update!​


> No you can't dynamically add VMs to the load balancer. Backend pool,
> where all the VMs reside, should be predefined.
>

 ​Technically that capability should be there. Otherwise we would not be
 able to autoscale a server cluster dynamically.
 ​


> you can auto-scale using scale sets(I'm still researching about it),
> that's the equivalent of AWS auto scaling group . also you can scale up or
> down a VM if it exceeds a certain parameter like CPU usage, using
> monitoring rules.
>
> *Monitoring *
>
>
> Azure has a native monitoring tool which involves collecting and
> tracking metrics, analyzing log files, defining custom metrics and logging
> generated by specific applications or workloads running in Virtual
> Machines. Azure represents monitored data in a graphical manner using
> charts. Monitoring also facilitates triggering alarms when certain
> conditions are met and also it can be configured to take actions on the 
> met
> conditions. Monitoring is done by the Diagnostic Extension and it has
> following capabilities.
>
> · Collects and uploads the system performance information
> from the Linux VM to the user's storage table, including diagnostic and
> syslog information.
>
> · Enables users to customize the data metrics that will be
> collected and uploaded.
>
> · Enables users to upload specified log files to a designated
> storage table.
>
> Note: Azure storage tables are a non-relational, key-value-pair,
> storage system suitable for storing massive amounts of unstructured data.
>
>
> We can add monitor rules so that when an alert triggers it notifies
> the admins via email. Furthermore we can set to take automated actions.
> Azure automate actions by running runbooks. A runbook is a set of tasks
> that perform some automated process in Azure Automation. We can create our
> own runbooks as well. Available runbooks include,
>
> · Restart VM
>
> · Stop VM
>
> · Remove VM
>
> · Scale up VM
>
> · Scale down VM
>
> When scaling up it sets the virtual machine to the next larger size
> within the size group and when scaling down it sets the virtual machine to
> the next smaller size within the size group.
>
> More about runbooks and automation [1]
>

 ​Sounds good, will us be able to do a POC on this?​


>
> *Auto scaling *
>
>
> Auto-scaling is the process of dynamically allocating the resources
> required by an application to match performance requirements. Virtual
> machine scale sets are an Azure Compute resource you can use to deploy and
> manage a set of identical VMs. With all VMs configured the same, VM scale
> sets are designed to support true auto-scale  no pre-provisioning of VMs 
> is
> required – and as such makes it easier to build large-scale services
> targeting big compute, big data, and containerized workloads [2].
>
>
> Note: I couldn’t practically do this as my azure free account lets me
> have only 4 cores and I have used all of them on my current deployment. 
> I’m
> getting a new azure account from one of my friends in a day so hopefully I
> will do 

[Dev] [DAS] Setting akka Configuration Properties

2016-07-17 Thread Isuru Haththotuwa
Hi all,

When deploying DAS 3.0.1 min HA setup in a containerized environment, its
required for the akka local actor to bind to an IP from one network
interface and advertise another. This is possible via the configurations
[1]. I noted that we do not have a config file for akka RPC system in DAS.
Is it possible to set these properties in DAS?

[1]. http://doc.akka.io/docs/akka/snapshot/additional/faq.html

-- 
Thanks and Regards,

Isuru H.
+94 716 358 048* *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 MSF4J 2.0.0 RC3

2016-07-17 Thread Rasika Perera
Hi All,

I have tested MSF4J 2.0.0 RC2 with the following and found no issue.

   - Built and tested a sample for multivalued map of form-params.
   - Built and tested a sample for responding a JSON String as
   application/json contentType

[x] Stable - go ahead and release

Regards,
Rasika

On Sun, Jul 17, 2016 at 6:39 PM, Ruwan Abeykoon  wrote:

> +1
>
> I tested with a utility project [1] and found no issues.
>
> [x] Stable - Go ahead and release
>
> [1]https://github.com/ruwanta/delaying-proxy
>
> Cheers,
> Ruwan
>
> On Fri, Jul 15, 2016 at 9:23 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Devs,
>>
>> This is the 3rd Release Candidate of the WSO2 MSF4J (Microservices
>> Framework for Java) 2.0.0.
>>
>> Please download, test the framework and vote. Vote will be open for 72
>> hours or as needed.
>> Refer to github readme for guides.
>>
>> *​Source and binary distribution files:*
>> *https://github.com/wso2/msf4j/releases/tag/v2.0.0-rc3
>> *
>>
>> *Maven staging repository:*
>> *https://maven.wso2.org/nexus/content/repositories/orgwso2msf4j-1004
>> *
>>
>> *The tag to be voted upon:*
>> *https://github.com/wso2/msf4j/tree/v2.0.0-rc3
>> *
>>
>>
>>
>> [ ] Broken - Do not release (explain why)
>> [ ] Stable  - Go ahead and release
>>
>> Thank you,
>> WSO2 MSF4J Team
>>
>>
>> --
>> Thusitha Dayaratne
>> Software Engineer
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Ruwan Abeykoon*
> *Associate Director/Architect**,*
> *WSO2, Inc. http://wso2.com  *
> *lean.enterprise.middleware.*
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
With Regards,

*Rasika Perera*
Software Engineer
LinkedIn: http://lk.linkedin.com/in/rasika90

[image: wso2-signature-general.png] 

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] WSO2 App Manager 1.2.0 RC1

2016-07-17 Thread Lakshani Gamage
Hi all,

I tested followings.

   - Business Owner functionalities.
   - App creation and life cycle changing flows.
   - App documentation. (Publisher and Store)
   - Sorting and Searching in Store.
   - Smoke tested with Oracle DB.

Works fine. I didn't encounter any issues.

[+] Stable - go ahead and release
Thanks and Regards,
Lakshani.

On Sat, Jul 16, 2016 at 5:19 PM, Thilini Shanika  wrote:

> Adding Architecture
>
> On Sat, Jul 16, 2016 at 6:36 AM, Thilini Shanika 
> wrote:
>
>> Hi Devs,
>>
>> This is the 1st Release Candidate of the WSO2 App Manager 1.2.0
>>
>> Please download, test the product and vote. Vote will be open for 72
>> hours or as needed.
>> Refer to github readme for guides.
>>
>> The distribution is available to download at [1]
>>
>> [1] :
>> https://github.com/wso2/product-app-manager/releases/download/v1.2.0-RC1/wso2appm-1.2.0.zip
>>
>> Fixed Issue in [2], known issues [3], tag to be vote upon [4]
>>
>> [2] : https://wso2.org/jira/issues/?filter=13104
>> [3] : https://wso2.org/jira/browse/WSFRUBY-72?filter=13140
>> [4] : https://github.com/wso2/carbon-appmgt/tree/v1.2.0-RC1
>>
>> Please vote as follows.
>> [+] Stable - go ahead and release
>> [-]  Broken - do not release (please explain why)
>>
>> Thanks,
>> App Manager Team
>>
>> --
>> Thilini Shanika
>> Senior Software Engineer
>> WSO2, Inc.; http://wso2.com
>> 20, Palmgrove Avenue, Colombo 3
>>
>> E-mail: tgtshan...@gmail.com
>>
>>
>
>
> --
> Thilini Shanika
> Senior Software Engineer
> WSO2, Inc.; http://wso2.com
> 20, Palmgrove Avenue, Colombo 3
>
> E-mail: tgtshan...@gmail.com
>
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Lakshani Gamage

*Software Engineer, WSO2*

*Mobile : +94 71 5478184 <%2B94%20%280%29%20773%20451194>*
*Blog : http://lakshanigamage.blogspot.com/
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 MSF4J 2.0.0 RC3

2016-07-17 Thread Ruwan Abeykoon
+1

I tested with a utility project [1] and found no issues.

[x] Stable - Go ahead and release

[1]https://github.com/ruwanta/delaying-proxy

Cheers,
Ruwan

On Fri, Jul 15, 2016 at 9:23 AM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Devs,
>
> This is the 3rd Release Candidate of the WSO2 MSF4J (Microservices
> Framework for Java) 2.0.0.
>
> Please download, test the framework and vote. Vote will be open for 72
> hours or as needed.
> Refer to github readme for guides.
>
> *​Source and binary distribution files:*
> *https://github.com/wso2/msf4j/releases/tag/v2.0.0-rc3
> *
>
> *Maven staging repository:*
> *https://maven.wso2.org/nexus/content/repositories/orgwso2msf4j-1004
> *
>
> *The tag to be voted upon:*
> *https://github.com/wso2/msf4j/tree/v2.0.0-rc3
> *
>
>
>
> [ ] Broken - Do not release (explain why)
> [ ] Stable  - Go ahead and release
>
> Thank you,
> WSO2 MSF4J Team
>
>
> --
> Thusitha Dayaratne
> Software Engineer
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Ruwan Abeykoon*
*Associate Director/Architect**,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Is it best practice to return null or an empty object from a method in DAO layer?

2016-07-17 Thread Udara Liyanage
On Sun, Jul 17, 2016 at 2:53 PM, Nuwan Pallewela  wrote:

> Hi,
>
> On Wed, Jul 13, 2016 at 10:15 AM, Sabra Ossen  wrote:
>
>> Hi,
>>
>> Thank you all for your prompt responses :)
>>
>> So if it's an ArrayList/Map it's better to return an empty object rather
>> than null. Got it.
>>
>> Regarding a POJO object IMO the usage of null, empty object or exception
>> depends on the scenario being considered.
>>
>> Based on Rasikas' reply since the jaggery level code is using the DAO
>> method (via manager interface) basically if no user is found then the
>> exception thrown should be propagated and in the UI an appropriate message
>> is rendered. Also since anyone else could be using the back end, when an
>> exception is thrown they would not have to be aware of the internal
>> implementation (if null or an empty object is returned, specifically he
>> should be aware if an empty object is returned so that he should write his
>> front end code accordingly).
>>
>> IMO returning an exception is clearer in terms of code but I guess the
>> discussion could continue further until a guideline is specified.
>>
> +1 for throwing an exception in general. If we return a null or empty
> object if data is unavailable, we may have to do a null check or empty
> object check when trying to process it most probably. And that check may
> tend to hide the original problem of unavailability of data and hard to
> debug if we face an error in a different place because of that.IMO throwing
> a custom exception which we could handle and log later or give an error
> message  to user will be more suitable.
> What to use with ArrayList and Maps is also depends on how we are going to
> manipulate the returned value. If we are going to access data in a
> ArrayList by index calling index values individually, it is better to use
> exception otherwise we may need to have a null check before that. Same
> applies to Maps. If we are going to process each element in a ArrayList we
> could use Iterator and process. In that case empty ArrayList would do the
> job. So there is not going to be a one for all cases solution in this
> argument. It will depend on how we are going to process that returned value
> and the nature of the application.
>
Exceptions are meant to be used for exceptional cases, using them for flow
control is a bad practice. So I don't think it is a good practice to throw
Exceptions instead of returning null. In addition using exceptions is
costly for perfomance.

If you return a  empty object the calling function will invoke functions of
the object which will result in undesirable state. Some object creating
initialize some of its members which may be invoked by the calling function
which we don't intend.

For POJO(I don't have idea about collections) it is OK to return null if no
data available or simply functions does not have anything to return and let
the calling function deal with it. You can document return values and when
it returns null.

>
>> Regards.
>>
>>
>> On Wed, Jul 13, 2016 at 6:49 AM, Harsha Thirimanna 
>> wrote:
>>
>>> HI Sabra,
>>>
>>> If there is collection type as a return, then you MUST return empty
>>> collection object of instead of null. But if you expect POJO as a return,
>>> then it would be better to return null instead of empty object. Because if
>>> it returns empty object instead of null, then some one get misunderstand
>>> who is going to use that API and will try to consume that as expected
>>> output. Then there may be more problems. You may not be the only one who
>>> consume your backend api.
>>>
>>>
>>>
>>>
>>> *Harsha Thirimanna*
>>> Associate Tech Lead; WSO2, Inc.; http://wso2.com
>>> * *
>>> *email: **hars...@wso2.com* * cell: +94 71 5186770 *
>>> *twitter: **http://twitter.com/ *
>>> *harshathirimannlinked-in: **http:
>>> **//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122
>>> *
>>>
>>> *Lean . Enterprise . Middleware*
>>>
>>>
>>> On Wed, Jul 13, 2016 at 12:42 AM, Rasika Perera 
>>> wrote:
>>>
 ​Hi Sabra
 ​
 ​,

 I think you need to handle this error at jaggery level.​

 Considering a method returning a user object the client code should not
> be able to proceed further if there is no user.

 ​In this case, -1 for returning NULL. When there is an error,
 unless
 ​ it is recoverable locally you ​
 *should*
 ​ convey ​it to the upper layers. In your case, If you cannot return a
 user object it is more intuitive to return an exception such as
 UserManagerException.

 By returning NULL, you cannot make it mandatory to handle exception.
 Your client code will not be aware of NULL unless the developer reads your
 implementation class OR the documentation. Try to avoid
 

Re: [Dev] Controlling access to jaggery pages by permissions

2016-07-17 Thread Rajkumar Rajaratnam
Hi Thanuja,

I had a look at the way IS dashboard jaggery app restricts access to
features by permissions.

   - It uses "*getUserInfo*" method of "*LoggedUserInfoAdmin*" admin
   service to retrieve all the permissions of the loggedin user and put them
   in the session.
   - Since it retrieves all the permissions of the loggedin user only once
   (at login time) and holds them in the session, it reduces the number of
   network calls and improves the performance.
   - It uses session cookie to invoke admin services

Hence, I thought of following the same approach because it gives better
performance than my previous approach.

In order to call "*getUserInfo*" method of "*LoggedUserInfoAdmin*" admin
service, the loggedin user should have "*/permission/admin/login*"
permission. Is there any issue with assigning this permission to all the
users?
Thanks,
Raj.

On Sun, Jul 17, 2016 at 5:19 AM, Rajkumar Rajaratnam 
wrote:

> Thanks Thanuja for the response. Will follow the current approach.
>
> On Fri, Jul 15, 2016 at 7:35 PM, Thanuja Jayasinghe 
> wrote:
>
>>
>>
>> On Fri, Jul 15, 2016 at 3:56 PM, Rajkumar Rajaratnam 
>> wrote:
>>
>>> Hi,
>>>
>>> I have a jaggery app with some pages and secured them via SAML SSO with
>>> WSO2 IS. So the authentication is implemented, now I have to implement the
>>> authorization. I need to control access to these jaggery pages by
>>> roles/permissions of the loggedin user. Here is the approach I have
>>> followed and I need to validate whether it is okay or there are better
>>> ways.
>>>
>>>1. Created custom permissions under my application service provider
>>>(one permission per one feature in my jaggery app)
>>>2. When a user access a feature in the jaggery app, I am calling "
>>>*isUserAuthorized*" method of "*RemoteAuthorizationManagerService*"
>>>admin service to check whether the logged in user is authorized to access
>>>the page. I think "isUserAuthorized" method checks whether the given user
>>>has any roles with the given permission. So, if it returns true, then I
>>>allow the user to access the page.
>>>3. I am calling the admin service with basic authentication. Is
>>>there any issues with this approach? Do I need to obtain a session cookie
>>>and call the admin service using session cookie instead of
>>>username/password? What is the recommended approach?
>>>
>>> Any issues with this approach?
>>>
>> Since "isUserAuthorized" method of "RemoteAuthorizationManagerService"
>> requires "/permission/admin/configure/security" permission, a user
>> without this permission will not able to access this service using his
>> session cookie. So your current approach is correct.
>>
>>> Thanks,
>>> Raj.
>>>
>>> --
>>> Rajkumar Rajaratnam
>>> Committer & PMC Member, Apache Stratos
>>> Senior Software Engineer, WSO2
>>>
>>> Mobile : +94777568639
>>>
>>
>> Thanks,
>>
>> --
>> *Thanuja Lakmal*
>> Senior Software Engineer
>> WSO2 Inc. http://wso2.com/
>> *lean.enterprise.middleware*
>> Mobile: +94715979891 +94758009992
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Senior Software Engineer, WSO2
>
> Mobile : +94777568639
>



-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Senior Software Engineer, WSO2

Mobile : +94777568639
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Is it best practice to return null or an empty object from a method in DAO layer?

2016-07-17 Thread Nuwan Pallewela
Hi,

On Wed, Jul 13, 2016 at 10:15 AM, Sabra Ossen  wrote:

> Hi,
>
> Thank you all for your prompt responses :)
>
> So if it's an ArrayList/Map it's better to return an empty object rather
> than null. Got it.
>
> Regarding a POJO object IMO the usage of null, empty object or exception
> depends on the scenario being considered.
>
> Based on Rasikas' reply since the jaggery level code is using the DAO
> method (via manager interface) basically if no user is found then the
> exception thrown should be propagated and in the UI an appropriate message
> is rendered. Also since anyone else could be using the back end, when an
> exception is thrown they would not have to be aware of the internal
> implementation (if null or an empty object is returned, specifically he
> should be aware if an empty object is returned so that he should write his
> front end code accordingly).
>
> IMO returning an exception is clearer in terms of code but I guess the
> discussion could continue further until a guideline is specified.
>
+1 for throwing an exception in general. If we return a null or empty
object if data is unavailable, we may have to do a null check or empty
object check when trying to process it most probably. And that check may
tend to hide the original problem of unavailability of data and hard to
debug if we face an error in a different place because of that.IMO throwing
a custom exception which we could handle and log later or give an error
message  to user will be more suitable.
What to use with ArrayList and Maps is also depends on how we are going to
manipulate the returned value. If we are going to access data in a
ArrayList by index calling index values individually, it is better to use
exception otherwise we may need to have a null check before that. Same
applies to Maps. If we are going to process each element in a ArrayList we
could use Iterator and process. In that case empty ArrayList would do the
job. So there is not going to be a one for all cases solution in this
argument. It will depend on how we are going to process that returned value
and the nature of the application.

>
> Regards.
>
>
> On Wed, Jul 13, 2016 at 6:49 AM, Harsha Thirimanna 
> wrote:
>
>> HI Sabra,
>>
>> If there is collection type as a return, then you MUST return empty
>> collection object of instead of null. But if you expect POJO as a return,
>> then it would be better to return null instead of empty object. Because if
>> it returns empty object instead of null, then some one get misunderstand
>> who is going to use that API and will try to consume that as expected
>> output. Then there may be more problems. You may not be the only one who
>> consume your backend api.
>>
>>
>>
>>
>> *Harsha Thirimanna*
>> Associate Tech Lead; WSO2, Inc.; http://wso2.com
>> * *
>> *email: **hars...@wso2.com* * cell: +94 71 5186770 *
>> *twitter: **http://twitter.com/ *
>> *harshathirimannlinked-in: **http:
>> **//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122
>> *
>>
>> *Lean . Enterprise . Middleware*
>>
>>
>> On Wed, Jul 13, 2016 at 12:42 AM, Rasika Perera  wrote:
>>
>>> ​Hi Sabra
>>> ​
>>> ​,
>>>
>>> I think you need to handle this error at jaggery level.​
>>>
>>> Considering a method returning a user object the client code should not
 be able to proceed further if there is no user.
>>>
>>> ​In this case, -1 for returning NULL. When there is an error,
>>> unless
>>> ​ it is recoverable locally you ​
>>> *should*
>>> ​ convey ​it to the upper layers. In your case, If you cannot return a
>>> user object it is more intuitive to return an exception such as
>>> UserManagerException.
>>>
>>> By returning NULL, you cannot make it mandatory to handle exception.
>>> Your client code will not be aware of NULL unless the developer reads your
>>> implementation class OR the documentation. Try to avoid
>>> NullPointerException
>>> ​ as much as possible.​
>>>
>>> In your client code(Jaggery) you can catch this error with try{ }
>>> catch(error){ }. Found this blogpost [1] which discusses on jaggery error
>>> handling.
>>> AFAIK Jaggery will wrap java exceptions with ScriptException object.
>>>
>>> Regards,
>>> Rasika
>>>
>>> [1]
>>> http://ruchirawageesha.blogspot.com/2013/04/error-handling-in-jaggery.html
>>>
>>> On Tue, Jul 12, 2016 at 2:17 PM, Abimaran Kugathasan 
>>> wrote:
>>>
 There are good enough discussion in Stackoverflow [1], [2] and [3]. You
 could return null, empty object or throw exception in the case of data not
 available.

 It's also depends on the type of the Object you are supposed to return,
 if it's a ArrayList/Map, then returning empty ArrayList/Map is better than
 returning null, but, in case of Model object, I think, returning null is
 better than 

Re: [Dev] [ESB] Unable to aggregate the XML messages by using Aggregate mediator

2016-07-17 Thread Nuwan Pallewela
Hi Pubudu,

What you have mentioned in the [1] is not an valid SOAP message. It do not
have the name space specified. That may be the case.

Thanks,
Nuwan

On Thu, Jul 14, 2016 at 7:21 AM, Shafreen Anfar  wrote:

> Hi Pubudu,
>
> It seems for some reason back-end response does not have a SOAP message
> but some other. Can you check the wire log and make sure back-end is
> sending a proper SOAP response.
>
> On Wed, Jul 13, 2016 at 10:12 PM, Pubudu Priyashan 
> wrote:
>
>>
>> Hi ESB team,
>>
>> I have a simple proxy service with a clone mediator and within that, I
>> call three different endpoints where each endpoint returns an XML body [1].
>> I would like to aggregate those three XML bodies into one message using
>> the aggregate mediator.
>>
>> But in my config, I am getting the error message [2]. Can someone please
>> advise if something is missing in this config [3]? You can directly add [3]
>> into an ESB proxy and see the error message.
>>
>> *[1] XML Message from the endpoint:-*
>>
>> 
>> 
>>
>> USD
>>
>>
>> *[2] Error Message:-*
>>
>> [2016-07-13 21:53:04,821] ERROR - SequenceMediator Expecting an
>> implementation of SOAP Envelope as the parent. But received some other
>> implementation
>> org.apache.axiom.soap.SOAPProcessingException: Expecting an
>> implementation of SOAP Envelope as the parent. But received some other
>> implementation
>> at
>> org.apache.axiom.soap.impl.llom.SOAPHeaderImpl.checkParent(SOAPHeaderImpl.java:408)
>> at
>> org.apache.axiom.soap.impl.llom.SOAPElement.setParent(SOAPElement.java:81)
>> at
>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
>> at
>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
>> at
>> org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
>> at
>> org.apache.synapse.mediators.eip.EIPUtils.addChildren(EIPUtils.java:171)
>> at
>> org.apache.synapse.mediators.eip.EIPUtils.enrichEnvelope(EIPUtils.java:135)
>> at
>> org.apache.synapse.mediators.eip.aggregator.AggregateMediator.getAggregatedMessage(AggregateMediator.java:498)
>> at
>> org.apache.synapse.mediators.eip.aggregator.AggregateMediator.completeAggregate(AggregateMediator.java:416)
>> at
>> org.apache.synapse.mediators.eip.aggregator.AggregateMediator.mediate(AggregateMediator.java:330)
>> at
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
>> at
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:57)
>> at
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
>> at
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:333)
>> at
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
>> at
>> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>> at
>> org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:255)
>> at
>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> at java.lang.Thread.run(Thread.java:745)
>>
>>
>>
>> *[3] ESB  Proxy config:-*
>>
>> 
>> http://ws.apache.org/ns/synapse;
>>name="CloneProxy1"
>>transports="http,https"
>>statistics="disable"
>>trace="disable"
>>startOnLoad="true">
>>
>>   
>>  
>> 
>>  
>>  
>> 
>>
>>   
>>  >value="=== message
>> 1==="/>
>>   
>>   
>>  
>> http://www.mocky.io/v2/5786694b0f740aa58487"/>
>>  
>>   
>>
>> 
>> 
>>
>>   
>>  >
>>  value="=message
>> 2="/>
>>   
>>   
>>  
>> http://www.mocky.io/v2/578669550f740aa58488"/>
>>  
>>   
>>
>> 
>> 
>>
>>   
>>  >value="=== message
>> 3==="/>
>>   
>>   
>>  
>> http://www.mocky.io/v2/5786695f0f740aa58489"/>
>>  
>>   
>>
>> 
>>

[Dev] Changes applicable for BAM Mediator from ESB 5.0.0 onwards

2016-07-17 Thread Buddhima Wijeweera
Hi All,

In ESB 5.0.0 (at the moment it's in beta stage), we have planned to
deprecate BAM Mediator. As the alternative we have introduced Publish Event
mediator from ESB 4.9.0, which has more customization.

Also due to internal changes, the configuration of BAM Mediator is also
changed, which will not affect migration. So the document linked with [1]
explains the way you can configure BAM Mediator from ESB 5.0.0 - Beta 2
onward. At the end of [1], you'll find the full-stream definition
describing in the document.

We'll add these information to respective documentation as well.


[1]
https://drive.google.com/file/d/0B18pu0AnookwWllqTWRJMV9tVjg/view?usp=sharing


Thank you,
-- 
Buddhima Wijeweera
Software Engineer; WSO2 Inc.; http://wso2.com ,

Mobile: +94 71 427 9966
Email: buddh...@wso2.com
Blog:   https://buddhimawijeweera.wordpress.com
GitHub Profile: https://github.com/Buddhima


stream6_1.0.0.json
Description: application/json
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev