Re: [Dev] GSOC 2017 - Native inbound and connector for FTP/SFTP operations

2017-03-18 Thread Chanaka Lakmal
Hi Malaka,

I researched for the Java NIO FTP library that you suggested for me [1].
What I found was that this is a code base with a very short history and the
most recent commit was over 13 years ago by Torvald Riegel who was the only
contributor to this [2]. I feel like this is not an ongoing project and not
supported by the author. What do you think?

And I couldn't find any documentation regarding that library. Although I
went through each and every Java class of this library, I couldn't find a
way to get the use of this library without a API reference or documentation.

I would be glad if you could share some additional materials if you have or
any suggestions to get a better approach to this project.

[1] http://java-nio-ftp-library.soft112.com/
[2] https://www.openhub.net/p/javanioftp

Thanks.

Best Regards.

*Chanaka Lakmal,*
Undergraduate B.Sc.Eng.(Hons.)
Department of Computer Science & Engineering,
University of Moratuwa,
Sri Lanka.

[image: LinkedIn] 

On Tue, Mar 14, 2017 at 6:29 PM, Chanaka Lakmal  wrote:

> Hi Malaka,
>
> Sure. Thanks for the suggestion. I will see to it and get back to you.
>
> Thanks.
>
> Best Regards.
>
> *Chanaka Lakmal,*
> Undergraduate B.Sc.Eng.(Hons.)
> Department of Computer Science & Engineering,
> University of Moratuwa,
> Sri Lanka.
>
> [image: LinkedIn] 
>
> On Tue, Mar 14, 2017 at 1:41 PM, Malaka Silva  wrote:
>
>> Hi Chanaka,
>>
>> Can we also try the following? This is more optimized.
>>
>> [1] http://java-nio-ftp-library.soft112.com/
>>
>> On Mon, Mar 13, 2017 at 5:04 PM, Chanaka Lakmal 
>> wrote:
>>
>>> Hi Malaka,
>>>
>>> I researched for the libraries that we can use for FTP/SFTP operations
>>> in addition to using Apache Commons VFS. I found out about some widely used
>>> libraries such as SSHJ [1] and JSch [2] and did a comparison among them.
>>> With the use of those findings I created a comparison on SSHJ, Apache
>>> Commons VFS and JSch and published on my blog [3].
>>>
>>> Also, I have experience in JSch since I had previously worked on
>>> developing a SCP transport using JSch [4] [5]. I believe its ability to
>>> execute shell commands with the help of the library is a great feature in
>>> JSch. According to the comparison and my experiences, JSch looks like the
>>> best candidate among them and I hope to hear others' thoughts about this.
>>>
>>> Please share your recommendations and suggestions to get a better
>>> approach to this project.
>>>
>>> [1] SSHJ - https://github.com/hierynomus/sshj
>>> [2] JSch - http://www.jcraft.com/jsch/
>>> [3] SSHJ, Apache Commons VFS and JSch comparison (blog post) -
>>> https://medium.com/@ldclakmal/comparison-of-commons-vfs-sshj
>>> -and-jsch-libraries-for-sftp-support-cd5a0db2fbce#.d6bux0q0f
>>> [4] My SCP project (blog post) - https://medium.com/@ldclakmal/
>>> scp-with-java-b7b7dbcdbc85#.b05pinv1o
>>> [5] My SCP project (git) - https://github.com/ldclakmal/SCPTransport
>>>
>>> Thanks.
>>>
>>>
>>> Best Regards.
>>>
>>> *Chanaka Lakmal,*
>>> Undergraduate B.Sc.Eng.(Hons.)
>>> Department of Computer Science & Engineering,
>>> University of Moratuwa,
>>> Sri Lanka.
>>>
>>> [image: LinkedIn] 
>>>
>>> On Fri, Mar 3, 2017 at 8:57 AM, Malaka Silva  wrote:
>>>
 Hi Chanaka,

 Sounds good. Looking forward to hear from you soon.

 On Thu, Mar 2, 2017 at 6:54 PM, Chanaka Lakmal 
 wrote:

> Hi Malaka,
>
> Thank you for your response.
>
> As you mentioned, you have done a similar development to optimize and
> manage local file system using Java NIO [1] instead of Commons-vfs. [2] So
> my goal is to find such mechanism which is more unique to ftp/sftp
> protocol, in order to support file operations via ftp/sftp protocol.
>
> So, I will come up with my suggestions with best mechanism that is to
> be used for file operations via ftp/sftp protocol rather than Commons-vfs.
> Please share if you have any recommended methods or suggestions to
> get a better approach to this project.
>
> Also I do confirm that I am a full time student and eligible to
> participate GSoC.
>
> [1] https://store.wso2.com/store/assets/esbconnector/details
> /9ac7accf-6535-46c2-853e-9ca75c23cdef
> [2] http://commons.apache.org/proper/commons-vfs/index.html
>
> Thanks.
>
> Best Regards.
>
> *Chanaka Lakmal,*
> Undergraduate B.Sc.Eng.(Hons.)
> Department of Computer Science & Engineering,
> University of Moratuwa,
> Sri Lanka.
>
> [image: LinkedIn] 
>
> On Tue, Feb 28, 2017 at 10:29 PM, Malaka Silva 
> wrote:
>
>> Hi Chanaka,
>>
>> Thank you for sending the mail.
>>
>> Currently we have 

Re: [Dev] GSOC : OAuth 2.0 Dynamic Client Registration Management Protocol Support

2017-03-18 Thread Maduranga Siriwardena
Hi Abishalani,

The components are in /repository/components/plugins folder.
There you will find org.wso2.carbon.identity.oauth.dcr_5.3.4.jar.

You can checkout the tag v5.3.4 of the repository and then work through the
changes to the component. If you are going to apply the changes to the
product, you can build the jar and then create folder patch0001 (format of
the folder name should be "patch" and then a four digit number. Patches are
applied in the order of the number) in
/repository/components/patches and place the newly built jar
inside that. After this you have to restart the server. Please note that
the for jars you are going patch name should be equal to the original jar
in dropins folder.

If you successfully installed the changes, you will be able to notice a log
like below at the next start up.

[2017-01-31 21:07:39,035]  INFO
{org.wso2.carbon.server.extensions.PatchInstaller} -  Patch changes
detected  {org.wso2.carbon.server.extensions.PatchInstaller}
[2017-01-31 21:07:39,513]  INFO
{org.wso2.carbon.server.util.PatchUtils.console} -  Backed up plugins to
patch {org.wso2.carbon.server.util.PatchUtils.console}
[2017-01-31 21:07:39,525]  INFO
{org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification
started {org.wso2.carbon.server.util.PatchUtils.console}
[2017-01-31 21:07:39,530]  INFO
{org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification
successfully completed. {org.wso2.carbon.server.util.PatchUtils.console}

Thanks,

On Sat, Mar 18, 2017 at 7:26 AM, Abilashini Thiyagarajah <
abilashini...@cse.mrt.ac.lk> wrote:

> Hi,
>
> I have worked to understand the specifications and code base related to
> OAuth 2.0 DCR protocol management. Now I am trying to fix some of the
> issues that you have shared with me. Can I know the location of dcr
> component in the server? Or else the way to try my code changes in the dcr
> component?
>
> Thanks in advance,
> Abilashini
>
> *Thiyagarajah Abilashini*
> Student
> Department of Computer Science and Engineering
> University of Moratuwa, Sri Lanka
>
> On 15 March 2017 at 10:26, Abilashini Thiyagarajah <
> abilashini...@cse.mrt.ac.lk> wrote:
>
>> Hi Maduranga,
>>
>> Thank you so much for your reply and references. I will work on to
>> understand the code and fix jira as you said.
>>
>> Best Regards,
>> Abilashini
>>
>> *Thiyagarajah Abilashini*
>> Student
>> Department of Computer Science and Engineering
>> University of Moratuwa, Sri Lanka
>>
>> On 15 March 2017 at 01:52, Maduranga Siriwardena 
>> wrote:
>>
>>> Hi Abilashini,
>>>
>>> We are glad to see your interest in doing GSoC with WSO2.
>>>
>>> The requirement of the project is to fully implement the Dynamic Client
>>> Registration Management Protocol [1]. The current implementation of Dynamic
>>> Client Registration is in repo [2] and particularly component in [3].
>>> Documentation for OpenID Connect Dynamic Client Registration is in [4].
>>>
>>> If you need to get familiarize with the code, you can fix jira already
>>> reported regarding dcr implementation which are in [5] (or you can fix any
>>> jira in Identity Server project as a start).
>>>
>>> [1] https://tools.ietf.org/html/rfc7592
>>> [2] https://github.com/wso2-extensions/identity-inbound-auth-oauth
>>> [3] https://github.com/wso2-extensions/identity-inbound-auth
>>> -oauth/tree/master/components/org.wso2.carbon.identity.oauth.dcr
>>> [4] https://docs.wso2.com/display/IS530/OpenID+Connect+Dynam
>>> ic+Client+Registration
>>> [5] https://goo.gl/ghqqgE
>>>
>>> Thanks,
>>>
>>> On Tue, Mar 14, 2017 at 1:06 AM, Abilashini Thiyagarajah <
>>> abilashini...@cse.mrt.ac.lk> wrote:
>>>
 Hi,

 I am Abilashini from Department of Computer Science and Engineering,
 University of Moratuwa. I have done my internship at WSO2 last year (July -
 December) and worked in the implementation of tomcat extension of OpenID
 Connect [1]. So I am a little bit familiar with OAuth 2.0 and OpenID
 Connect protocols. I found the project 'OAuth 2.0 Dynamic Client
 Registration Management Protocol Support' as interesting to work on.
 Can I have some assistance to understand the details and requirements more
 clearly behind this project idea?
 Also can I have the locations of documentation and code base related to
 dynamic client registration?

 [1] https://github.com/wso2-extensions/tomcat-extension-openidsso

 Thanks and Regards
 Abilashini

 *Thiyagarajah Abilashini*
 Student
 Department of Computer Science and Engineering
 University of Moratuwa, Sri Lanka

>>>
>>>
>>>
>>> --
>>> Maduranga Siriwardena
>>> Software Engineer
>>> WSO2 Inc; http://wso2.com/
>>>
>>> Email: madura...@wso2.com
>>> Mobile: +94718990591 <+94%2071%20899%200591>
>>> Blog: *https://madurangasiriwardena.wordpress.com/
>>> *
>>> 
>>>
>>
>>
>


-- 
Maduranga Siriwardena
Software Engineer
WSO2 

Re: [Dev] [GSoC 2017][ESB]Native inbound and connector for IBM MQ 8.0

2017-03-18 Thread Malaka Silva
Hi Chanaka,

This looks good so far.

Can we check if it is possible to have an alternative way to set SSL
details other than system properties with IBM MQ client libraries.

The reason for that is we are limiting our self to one set of properties
per JVM.

eg: System.setProperty(

On Sat, Mar 18, 2017 at 11:41 PM, Chanaka Balasooriya 
wrote:

> Hi Malaka,
>
> After some effort I could upgrade MQ-Client [1] that I created earlier, to
> establish SSL connections with IBM WebSphere MQ.
> Please have a look.
>
> Here I used SSL_RSA_WITH_3DES_EDE_CBC_SHA Cipher Suit and IBM MQ self
> signed certificate.
> During that implementation I could realized that even though IBM MQ
> supports a long list of cipher suits only few cipher suits are supported for
> Oracal Java JVM. So I will list down all possible ciper-suits in near
> future.
>
> Now I believe that I have a solid background of the project idea and am
> looking forward to do this in GSoC.
>
> [1]https://github.com/chanakadinesh/MQ-Client
>
> Thanks,
>
> On Mon, Mar 13, 2017 at 6:15 PM, Malaka Silva  wrote:
>
>> Hi Chanaka,
>>
>> Also better to think about how to secure the connections with credentials
>> and SSL.
>>
>> On Mon, Mar 13, 2017 at 11:04 AM, Chanaka Balasooriya <
>> chanaka...@gmail.com> wrote:
>>
>>> Hi Malaka,
>>>
>>> I've been studying specifications of using native IBM MQ jars with the
>>> help of resources you sent and I could understand that It gives more
>>> flexibility on configuring
>>> connections and some binding options.
>>>
>>> I tried to implement sample MQ-Client [1] that can connect to IBM MQ
>>> without .binding file and we can improve that to implement inbound endpoint
>>> and the connector. please have a look.
>>> I am going to improve that MQ-Client to support more ibm specific
>>> options such as SSL connections within next few days.
>>>
>>> [1]https://github.com/chanakadinesh/MQ-Client
>>>
>>> Thanks,
>>>
>>> On Thu, Mar 2, 2017 at 4:51 PM, Malaka Silva  wrote:
>>>
 Hi Chanaka,

 Following will help.

 [1] http://mrmalakasilva.blogspot.com/2013/10/connecting-mechani
 sms-other-than.html
 [2] http://www-01.ibm.com/support/docview.wss?uid=swg24037500
 [3] http://stackoverflow.com/questions/2692070/connecting-to
 -a-websphere-mq-in-java-with-ssl-keystore
 [4] http://www.kevinboone.net/simplewmqclient.html

 On Wed, Mar 1, 2017 at 3:04 PM, Chanaka Balasooriya <
 chanaka...@gmail.com> wrote:

> Hi Malaka,
>
> Thank you for your response.
>
> As you mentioned, to understand the advantage of using native IBM MQ
> jars I will need to compare the current ESB IBM MQ support with native IBM
> MQ.
> So please share if you have any recommended reading materials to know
> more about IBM MQ other than [1] and it will be really helpful to get a
> better approach to this project.
>
> (I do confirm that I am a full time student and eligible to
> participate GSoC. )
>
> [1] https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0
> /com.ibm.mq.helphome.v80.doc/WelcomePagev8r0.html
>
> Thanks,
>
> On Tue, Feb 28, 2017 at 9:39 PM, Malaka Silva  wrote:
>
>> Hi Chanaka,
>>
>> Thank you for your interest in this project.
>>
>> Currently with WSO2 ESB there is a generic JMS inbound endpoint that
>> can be used to consume messages from different brokers. [1]
>>
>> However there are complexities when configuring WSO2 ESB with IBM MQ.
>> This is mainly due to class loading issues. Also IBM provides more
>> customized options that are written on top of JMS transport.
>>
>> Part of this project is to identify those and develop a new Inbound
>> Endpoint to support this integration.
>>
>> Also please confirm that you are a full time student and currently
>> not employed since it is against GSoC rules.
>>
>> [1] https://docs.wso2.com/display/ESB500/JMS+Inbound+Protocol
>>
>> On Tue, Feb 28, 2017 at 4:47 PM, Chanaka Balasooriya <
>> chanaka...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am Chanaka Balasooriya, final year undergraduate at Computer
>>> Science and Engineering Department, University of Moratuwa. I am highly
>>> interested in distributed computing and Java related things and it led 
>>> me
>>> to select and find more about this project. I was an intern at WSO2 and 
>>> I
>>> have a keen knowledge about WSO2ESB, inbound endpoints and transports 
>>> since
>>> my internship project was related to them.
>>>
>>> Regarding this project, I have already started to follow the WSO2
>>> doc about current implementation of  WSO2 ESB for IBM WebSphere MQ 
>>> through
>>> JMS transport. I would be grateful if you can give me some suggestions 
>>> and
>>> materials to understand the project more.

Re: [Dev] [GSoC 2017][ESB]Native inbound and connector for IBM MQ 8.0

2017-03-18 Thread Chanaka Balasooriya
Hi Malaka,

After some effort I could upgrade MQ-Client [1] that I created earlier, to
establish SSL connections with IBM WebSphere MQ.
Please have a look.

Here I used SSL_RSA_WITH_3DES_EDE_CBC_SHA Cipher Suit and IBM MQ self
signed certificate.
During that implementation I could realized that even though IBM MQ
supports a long list of cipher suits only few cipher suits are supported for
Oracal Java JVM. So I will list down all possible ciper-suits in near
future.

Now I believe that I have a solid background of the project idea and am
looking forward to do this in GSoC.

[1]https://github.com/chanakadinesh/MQ-Client

Thanks,

On Mon, Mar 13, 2017 at 6:15 PM, Malaka Silva  wrote:

> Hi Chanaka,
>
> Also better to think about how to secure the connections with credentials
> and SSL.
>
> On Mon, Mar 13, 2017 at 11:04 AM, Chanaka Balasooriya <
> chanaka...@gmail.com> wrote:
>
>> Hi Malaka,
>>
>> I've been studying specifications of using native IBM MQ jars with the
>> help of resources you sent and I could understand that It gives more
>> flexibility on configuring
>> connections and some binding options.
>>
>> I tried to implement sample MQ-Client [1] that can connect to IBM MQ
>> without .binding file and we can improve that to implement inbound endpoint
>> and the connector. please have a look.
>> I am going to improve that MQ-Client to support more ibm specific options
>> such as SSL connections within next few days.
>>
>> [1]https://github.com/chanakadinesh/MQ-Client
>>
>> Thanks,
>>
>> On Thu, Mar 2, 2017 at 4:51 PM, Malaka Silva  wrote:
>>
>>> Hi Chanaka,
>>>
>>> Following will help.
>>>
>>> [1] http://mrmalakasilva.blogspot.com/2013/10/connecting-mechani
>>> sms-other-than.html
>>> [2] http://www-01.ibm.com/support/docview.wss?uid=swg24037500
>>> [3] http://stackoverflow.com/questions/2692070/connecting-to
>>> -a-websphere-mq-in-java-with-ssl-keystore
>>> [4] http://www.kevinboone.net/simplewmqclient.html
>>>
>>> On Wed, Mar 1, 2017 at 3:04 PM, Chanaka Balasooriya <
>>> chanaka...@gmail.com> wrote:
>>>
 Hi Malaka,

 Thank you for your response.

 As you mentioned, to understand the advantage of using native IBM MQ
 jars I will need to compare the current ESB IBM MQ support with native IBM
 MQ.
 So please share if you have any recommended reading materials to know
 more about IBM MQ other than [1] and it will be really helpful to get a
 better approach to this project.

 (I do confirm that I am a full time student and eligible to participate
 GSoC. )

 [1] https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0
 /com.ibm.mq.helphome.v80.doc/WelcomePagev8r0.html

 Thanks,

 On Tue, Feb 28, 2017 at 9:39 PM, Malaka Silva  wrote:

> Hi Chanaka,
>
> Thank you for your interest in this project.
>
> Currently with WSO2 ESB there is a generic JMS inbound endpoint that
> can be used to consume messages from different brokers. [1]
>
> However there are complexities when configuring WSO2 ESB with IBM MQ.
> This is mainly due to class loading issues. Also IBM provides more
> customized options that are written on top of JMS transport.
>
> Part of this project is to identify those and develop a new Inbound
> Endpoint to support this integration.
>
> Also please confirm that you are a full time student and currently not
> employed since it is against GSoC rules.
>
> [1] https://docs.wso2.com/display/ESB500/JMS+Inbound+Protocol
>
> On Tue, Feb 28, 2017 at 4:47 PM, Chanaka Balasooriya <
> chanaka...@gmail.com> wrote:
>
>> Hi,
>>
>> I am Chanaka Balasooriya, final year undergraduate at Computer
>> Science and Engineering Department, University of Moratuwa. I am highly
>> interested in distributed computing and Java related things and it led me
>> to select and find more about this project. I was an intern at WSO2 and I
>> have a keen knowledge about WSO2ESB, inbound endpoints and transports 
>> since
>> my internship project was related to them.
>>
>> Regarding this project, I have already started to follow the WSO2 doc
>> about current implementation of  WSO2 ESB for IBM WebSphere MQ through 
>> JMS
>> transport. I would be grateful if you can give me some suggestions and
>> materials to understand the project more.
>>
>> Thanks,
>> --
>> Chanaka Balasooriya
>> Undergraduate
>> Department of Computer Science and Engineering
>> University of Moratuwa
>> +9471 294 7898 <071%20294%207898>
>>
>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Associate Director / Architect
> M: +94 777 219 791 <+94%2077%20721%209791>
> Tel : 94 11 214 5345
> Fax :94 11 2145300 <011%202%20145300>
> Skype : malaka.sampath.silva
> LinkedIn : 

Re: [Dev] GSoC 2017 : Python API for Siddhi CEP

2017-03-18 Thread Sriskandarajah Suhothayan
The idea is to use native python calls as much as posible. In worsecase
we'll use the service calls.

On Sat, Mar 18, 2017 at 8:48 PM, Roshan Alwis 
wrote:

> Hi,
>
> In H2O.ai they are running a backend server (.jar file) and python API
> just initiate service calls. In that case, it is not necessary to use
> PyJnius kind of libraries. But for further implemetation it is required to
> consider performance factors as well. Since JAVA is much faster than Python
> it is better to reduce python execution load from the system. But , I want
> to make sure that CEP provides the relevant services to the outside.
>
> Best Regards,
>
> Roshan Madhushanka
>
> Batch Representative (CSE 13),
> Department of Computer Science and Engineering
> University of Moratuwa.
>
> alwisroshan...@cse.mrt.ac.lk | 0715894672 <071%20589%204672>
> [image: Facebook]
>
> On 9 March 2017 at 21:23, Roshan Alwis 
> wrote:
>
>> Hi all,
>>
>> I am Roshan from University of Moratuwa. I did my internship at WSO2 in
>> Research Team under the supervision of Dr. Srinath Perera.
>>
>> I am very much familiar with Python and implemented an extension for WSO2
>> CEP for real-time prediction with H2O.ai  while I was
>> working there.
>>
>> I think I fit best in $subject and would like to know more about the
>> scope of the project.
>>
>> Thanks & Regards,
>>
>> Roshan Madhushanka
>>
>> Batch Representative (CSE 13),
>> Department of Computer Science and Engineering
>> University of Moratuwa.
>>
>> alwisroshan...@cse.mrt.ac.lk | 0715894672 <071%20589%204672>
>> [image: Facebook]
>>
>
>


-- 

*S. Suhothayan*
Associate Director / Architect & Team Lead of WSO2 Complex Event Processor
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] GSoC 2017 : Real-Time Machine Learning Toolkit for Siddhi

2017-03-18 Thread Viraj Gamage
Hi,

I'm Viraj Salaka, a 3rd year undergraduate from Department of Computer
Science and Engineering, University of Moratuwa. I would like to do a
project for WSO2 for GSoC 2017.

Considering my interests and capabilities, I have chosen Proposal-24
(Real-Time Machine Learning Toolkit for Siddhi). I am currently following
the machine learning course in  which is conducted by Andrew Ng,  Stanford
University (www.coursera.org/learn/machine-learning).

By the way, I have few questions to ask.
1.)Are we supposed to provide a complete functionality with machine
learning algorithms or provide a library containing machine learning
algorithms?
2.) If we are supposed to build a complete functionality,are there any
 pre-identified use-cases or requirements regarding the toolkit?

Thank you
-- 
Viraj Salaka Gamage
Undergraduate | Department of Computer Science and Engineering,University
of Moratuwa, Sri Lanka
mobile : +94 710 618 178
Linked In : https://www.linkedin.com/in/virajsalaka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC][CEP][DEV] Python API for Siddhi CEP

2017-03-18 Thread Sriskandarajah Suhothayan
For the initial cut this looks good, please go ahead with the proposal.
Let's check some other alternatives and start the development.

Regards
Suho

On Sat, Mar 18, 2017 at 1:01 PM, Madhawa Vidanapathirana <
madhawavidanapathir...@gmail.com> wrote:

> Hi Suho,
>
> You can find the python version of test case written using Pyjnius in
> below link.
> https://github.com/madhawav/CEP-Python-Wraps/tree/master/
> Pyjnius%20Prototype%20Wrap
> Instructions on building the code is also given their.
>
> During development, I noticed following disadvantages of Pyjnius API
>
>- Not compatible with Python 3.x.
>- There are no stable releases. However, the code available in master
>branch is relatively stable.
>- Difficult to configure. It is required to develop the library from
>source. This would make it difficult to distribute an API developed on
>Pyjnius.
>- There are no evidence that a proper release would be done soon.
>
> However, Pyjnius supports callback of events from Java to Python.
> Additionally, it is easier to develop using Pyjnius ones it is configured.
>
> So, I had a looked at some of the other options as well.
>
> Java Bridge
>
> *Advantages*
>
>- Has stable releases available through Python Package Index. (pip)
>
> *Disadvantages*
>
>- No direct call-back mechanism to receive events from Java side. It
>is possible to execute Python scripts in Java  but those scripts would not
>be in same context as Python Host App.
>- Comparatively harder to develop on but it is manageable.
>
> Py4J
>
> The main difference in Py4J is that it uses socket connections to
> communicate with JVM instead of JNI. (secured socket connections are
> possible).
>
> *Advantages*
>
>- Stable release available through Python Package Index (pip). Easy to
>configure.
>- Can connect to an already running Java application (with Py4J) and
>communicate with it. (Thus, can be used to communicate with a running
>instance of WSO2 CEP)
>- Supports callback events.
>- Well maintained documentation. Active project.
>
> *Disadvantages*
>
>- Would require a work-around to avoid clashing between socket
>connection ports when concurrent applications use the API.
>
> As of now, I feel Py4J is the most suitable option. However, I am yet to
> look at some other options available such as JPy and JCC.
>
> Regards,
>
> Madhawa
>
> On Wed, Mar 15, 2017 at 11:10 PM, Sriskandarajah Suhothayan  > wrote:
>
>> Great, do also start working on writing the project proposal.
>>
>> Regards
>> Suho
>>
>> On Wed, Mar 15, 2017 at 10:58 PM, Madhawa Vidanapathirana <
>> madhawavidanapathir...@gmail.com> wrote:
>>
>>> Hi Suho,
>>> Progress made so far is managed to write a python version of test case
>>> you suggested using Pyjnius [1] [2].
>>> Pyjnius is capable of handling method calls and callbacks to/from JAVA
>>> via JNI.
>>>
>>> I will send the code here after I properly arrange it into a prototype
>>> API.
>>>
>>> [1] - https://pyjnius.readthedocs.io/en/latest/index.html
>>> [2] - https://github.com/kivy/pyjnius/blob/master/docs/source/index.rst
>>>
>>> Regards,
>>> Madhawa
>>>
>>> On Wed, Mar 15, 2017 at 1:11 AM, Sriskandarajah Suhothayan <
>>> s...@wso2.com> wrote:
>>>
 As the first step focus on building APIs such that we can write the
 following test case[1] in python.

 [1]https://github.com/wso2/siddhi/blob/master/modules/siddhi
 -samples/quick-start-samples/src/main/java/org/wso2/siddhi/s
 ample/SimpleFilterSample.java

 Regards
 Suho

 On Tue, Mar 14, 2017 at 9:55 AM, Madhawa Vidanapathirana <
 madhawavidanapathir...@gmail.com> wrote:

> Hi,
> Thank you for your quick reply.
>
> Since directly using Siddhi Library is the more general case, I'll
> first focus on it.
>
> 1) I am thinking about following the same structure in JAVA API,
> centered around Siddhi Manager. Any opinions on this?
> 2) Any idea on extent to which lower level/internal components should
> be exposed? (e.g. - Exposing "StreamDefinition" class in addition to
> creating stream via Siddhi query using 
> "siddhiManager.createExecutionPlanRuntime").
> I have heard that it is usually discouraged to use lower level components
> instead of the query approach.
>
> Will try to send you a prototype covering basic functionality through
> Siddhi Java API, before making the proposal for entire project.
>
> Madhawa
>
> On Mon, Mar 13, 2017 at 9:53 PM, Sriskandarajah Suhothayan <
> s...@wso2.com> wrote:
>
>>
>>
>> On Sun, Mar 12, 2017 at 12:37 PM, Madhawa Vidanapathirana <
>> madhawavidanapathir...@gmail.com> wrote:
>>
>>> Hi.
>>>
>>> I am an undergraduate from Department of Computer Science and
>>> Engineering, University of Moratuwa. I recently completed my internship 
>>> at
>>> WSO2 working with the Support 

Re: [Dev] GSoC 2017 : Python API for Siddhi CEP

2017-03-18 Thread Roshan Alwis
Hi,

In H2O.ai they are running a backend server (.jar file) and python API just
initiate service calls. In that case, it is not necessary to use PyJnius
kind of libraries. But for further implemetation it is required to consider
performance factors as well. Since JAVA is much faster than Python it is
better to reduce python execution load from the system. But , I want to
make sure that CEP provides the relevant services to the outside.

Best Regards,

Roshan Madhushanka

Batch Representative (CSE 13),
Department of Computer Science and Engineering
University of Moratuwa.

alwisroshan...@cse.mrt.ac.lk | 0715894672
[image: Facebook]

On 9 March 2017 at 21:23, Roshan Alwis  wrote:

> Hi all,
>
> I am Roshan from University of Moratuwa. I did my internship at WSO2 in
> Research Team under the supervision of Dr. Srinath Perera.
>
> I am very much familiar with Python and implemented an extension for WSO2
> CEP for real-time prediction with H2O.ai  while I was
> working there.
>
> I think I fit best in $subject and would like to know more about the scope
> of the project.
>
> Thanks & Regards,
>
> Roshan Madhushanka
>
> Batch Representative (CSE 13),
> Department of Computer Science and Engineering
> University of Moratuwa.
>
> alwisroshan...@cse.mrt.ac.lk | 0715894672
> [image: Facebook]
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] GSoC 2017 : Real-Time Machine Learning Toolkit for Siddhi

2017-03-18 Thread Sriskandarajah Suhothayan
On Sat, Mar 18, 2017 at 8:18 PM, Nadheesh Jihan  wrote:

> Hi,
>
> I am an undergraduate from Department of Computer Science and Engineering
> at University of Moratuwa. I recently completed my internship period at
> WSO2. While I was working at WSO2, I was exposed to machine learning and
> real-time event processing using Siddhi. I am interested about Proposal-24
> (Real-Time Machine Learning Toolkit for Siddhi) since it is more aligned
> with my skills and the new passion that I have developed at WSO2. However,
> I have few questions regarding the proposal. 1)How many ML algorithms are
> expected to be implemented during this project?
>
@Upul can you give insights on this.

> 2)Are we going to implement the streaming ML algorithms from the scratch?
>
Yes

> --
> Best regards,
> *Nadheesh Jihan*
> Undergraduate | Department of Computer Science and Engineering
> Faculty of Engineering
> University of Moratuwa
>



-- 

*S. Suhothayan*
Associate Director / Architect & Team Lead of WSO2 Complex Event Processor
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] GSoC 2017 : Real-Time Machine Learning Toolkit for Siddhi

2017-03-18 Thread Nadheesh Jihan
Hi,

I am an undergraduate from Department of Computer Science and Engineering
at University of Moratuwa. I recently completed my internship period at
WSO2. While I was working at WSO2, I was exposed to machine learning and
real-time event processing using Siddhi. I am interested about Proposal-24
(Real-Time Machine Learning Toolkit for Siddhi) since it is more aligned
with my skills and the new passion that I have developed at WSO2. However,
I have few questions regarding the proposal. 1)How many ML algorithms are
expected to be implemented during this project? 2)Are we going to implement
the streaming ML algorithms from the scratch?
-- 
Best regards,
*Nadheesh Jihan*
Undergraduate | Department of Computer Science and Engineering
Faculty of Engineering
University of Moratuwa
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF]Handling events of fragments

2017-03-18 Thread Denuwanthi De Silva
Hi,

As Rajith mentioned when using the short hand form of document ready
function [1] it works as expected.
When using [2] only it does not execute the public js of the fragment.




[1]$(function(){});
[2]

$(document).ready(function () {});

Thanks,


On Sat, Mar 18, 2017 at 4:06 PM, Rajith Roshan  wrote:

> Hi,
>
> I have used button register event on document ready[1] of the front end js
> which is inside the fragment(public/js) folder. This works fine for me. I
> haven't used success call back for event register.
>
>
> [1] - $(function () {
>
> $('#addThrottleBtn').on('click', addPolicyToBackend);
> });
>
> I think this should work for all fragments. If it's not working then its a
> bug right?
>
> Thanks!
> Rajith
>
> On Sat, Mar 18, 2017 at 3:48 PM, Manuranga Perera  wrote:
>
>> Why does someone has to use a seccuess event? Can't they just put it in
>> public/js and get the same result ?
>>
>> On 18 Mar 2017 10:06, "Chandana Napagoda"  wrote:
>>
>> Hi Manu,
>>
>> This is not a bug in uuf client. Once js is dynamically loaded, they can
>> bind events from that javascript. You can verify it by modifying the sample
>> I have mentioned in my previous mail.
>>
>> BTW, could you please elaborate more on what you meant by "special"
>> fragments?
>>
>> Regards,
>> Chandana
>>
>> On Thu, Mar 16, 2017 at 5:12 PM, Manuranga Perera  wrote:
>>
>>> Hi Denuwanthi, Rajith,
>>>
 onCLick()
>>>
>>> Please don't do this, What I meant is to put in public/js dir inside the
>>> fragment, not in fragment hbs. No JS in HBS please, don't mix logic and
>>> pretension.
>>>
>>> Hi Napa, Sajith,
>>>
 you should bind/initialize javascript events using the success event of
 the renderFragment method.
>>>
>>> I don't think this is a good constraint, that means people have to write
>>> "spacial" fragments if they want to work with client side. UUF client
>>> should attach the script after it attaches the HBS, if not it's bug in UUF
>>> client.
>>>
>>> On Thu, Mar 16, 2017 at 4:22 AM, Denuwanthi De Silva <
>>> denuwan...@wso2.com> wrote:
>>>
 Hi Chandana,

 Thank you, it works .


 Thanks,

 On Thu, Mar 16, 2017 at 9:46 AM, Chandana Napagoda 
 wrote:

> Hi Denuwathi,
>
> As I explained offline, you should bind/initialize javascript events
> using the success event of the renderFragment method. As mentioned, please
> refer client-side fragment sample in the uuf-common sample app.
>
>
> Regards,
> Chandana
>
> On Thu, Mar 16, 2017 at 8:41 AM, Denuwanthi De Silva <
> denuwan...@wso2.com> wrote:
>
>> Thanks all for valuable suggestions.
>>
>> When rendering fragment via UUFClient, what we noticed is the
>> corresponding front-end js did not pickup.
>>
>> Therefore, as Rajith mentioned used the onCLick() in the button html
>> tag.
>> But it would be more easier if we can do the front-end js logic of
>> the fragment inside the fragment public js itself when using
>> UUFclient.renderFragment() method to load the fragment
>>
>> Thanks
>>
>>
>> On Tue, Mar 14, 2017 at 10:31 PM, Manuranga Perera 
>> wrote:
>>
>>> Fragment is a self contained re usable component. I think its better
 to  have the all the front end logic related to the fragment inside 
 that
 fragment.

>>> +1
>>>
>>> On Tue, Mar 14, 2017 at 4:36 PM, Rajith Roshan 
>>> wrote:
>>>
 Hi

 On Tue, Mar 14, 2017 at 7:32 PM, Denuwanthi De Silva <
 denuwan...@wso2.com> wrote:

> Hi,
>
> I'm currently rendering a fragment inside a page using
> 'UUFClient.renderFragment' method.
> Then I display it in the page using "{{#defineZone}} helper.
>
> This fragment contains a button.
> When I click that button I need to do an ajax call to a micro
> service.
>
> I make the ajax call inside the front-end js of the current page.
> This seems not to be working, as the button is in the fragment.
>
 This is may be due to, by the time you are registering the on click
 event for button the dom does not actually have the button element, 
 since
 uufrender client works asynchronously.
 If you use onclick attribute on the button element itself and write
 your logic in the current page then this should work. No need to move 
 it to
 the fragment.

>
> So, is it ok to define a front-end js in the fragment and do the
> ajax call from it, instead of the front-end js of the current page .?
>

 Fragment is a self contained re usable component. I think its
 better to  have the all the front end logic 

[Dev] [GSOC 2017] WS-Trust Implementation for IS 6.0.0

2017-03-18 Thread Nadun Akalanka
Hi All

I'm Nadun Akalanka third year undergraduate at Informatics Institute of
Technoloy. I'm really interested in [1] .

Apart from developing the STS can you describe the scope of this project

[1]
https://docs.wso2.com/display/GSoC/Project+Proposals+for+2017#ProjectProposalsfor2017-Proposal23:[IS]WS-TrustImplementationforIS6.0.0usingApacheCXFLibrary

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


Re: [Dev] GSOC : OAuth 2.0 Dynamic Client Registration Management Protocol Support

2017-03-18 Thread Abilashini Thiyagarajah
Hi,

I have worked to understand the specifications and code base related to
OAuth 2.0 DCR protocol management. Now I am trying to fix some of the
issues that you have shared with me. Can I know the location of dcr
component in the server? Or else the way to try my code changes in the dcr
component?

Thanks in advance,
Abilashini

*Thiyagarajah Abilashini*
Student
Department of Computer Science and Engineering
University of Moratuwa, Sri Lanka

On 15 March 2017 at 10:26, Abilashini Thiyagarajah <
abilashini...@cse.mrt.ac.lk> wrote:

> Hi Maduranga,
>
> Thank you so much for your reply and references. I will work on to
> understand the code and fix jira as you said.
>
> Best Regards,
> Abilashini
>
> *Thiyagarajah Abilashini*
> Student
> Department of Computer Science and Engineering
> University of Moratuwa, Sri Lanka
>
> On 15 March 2017 at 01:52, Maduranga Siriwardena 
> wrote:
>
>> Hi Abilashini,
>>
>> We are glad to see your interest in doing GSoC with WSO2.
>>
>> The requirement of the project is to fully implement the Dynamic Client
>> Registration Management Protocol [1]. The current implementation of Dynamic
>> Client Registration is in repo [2] and particularly component in [3].
>> Documentation for OpenID Connect Dynamic Client Registration is in [4].
>>
>> If you need to get familiarize with the code, you can fix jira already
>> reported regarding dcr implementation which are in [5] (or you can fix any
>> jira in Identity Server project as a start).
>>
>> [1] https://tools.ietf.org/html/rfc7592
>> [2] https://github.com/wso2-extensions/identity-inbound-auth-oauth
>> [3] https://github.com/wso2-extensions/identity-inbound-auth
>> -oauth/tree/master/components/org.wso2.carbon.identity.oauth.dcr
>> [4] https://docs.wso2.com/display/IS530/OpenID+Connect+Dynam
>> ic+Client+Registration
>> [5] https://goo.gl/ghqqgE
>>
>> Thanks,
>>
>> On Tue, Mar 14, 2017 at 1:06 AM, Abilashini Thiyagarajah <
>> abilashini...@cse.mrt.ac.lk> wrote:
>>
>>> Hi,
>>>
>>> I am Abilashini from Department of Computer Science and Engineering,
>>> University of Moratuwa. I have done my internship at WSO2 last year (July -
>>> December) and worked in the implementation of tomcat extension of OpenID
>>> Connect [1]. So I am a little bit familiar with OAuth 2.0 and OpenID
>>> Connect protocols. I found the project 'OAuth 2.0 Dynamic Client
>>> Registration Management Protocol Support' as interesting to work on.
>>> Can I have some assistance to understand the details and requirements more
>>> clearly behind this project idea?
>>> Also can I have the locations of documentation and code base related to
>>> dynamic client registration?
>>>
>>> [1] https://github.com/wso2-extensions/tomcat-extension-openidsso
>>>
>>> Thanks and Regards
>>> Abilashini
>>>
>>> *Thiyagarajah Abilashini*
>>> Student
>>> Department of Computer Science and Engineering
>>> University of Moratuwa, Sri Lanka
>>>
>>
>>
>>
>> --
>> Maduranga Siriwardena
>> Software Engineer
>> WSO2 Inc; http://wso2.com/
>>
>> Email: madura...@wso2.com
>> Mobile: +94718990591 <+94%2071%20899%200591>
>> Blog: *https://madurangasiriwardena.wordpress.com/
>> *
>> 
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF]Handling events of fragments

2017-03-18 Thread Rajith Roshan
Hi,

I have used button register event on document ready[1] of the front end js
which is inside the fragment(public/js) folder. This works fine for me. I
haven't used success call back for event register.


[1] - $(function () {

$('#addThrottleBtn').on('click', addPolicyToBackend);
});

I think this should work for all fragments. If it's not working then its a
bug right?

Thanks!
Rajith

On Sat, Mar 18, 2017 at 3:48 PM, Manuranga Perera  wrote:

> Why does someone has to use a seccuess event? Can't they just put it in
> public/js and get the same result ?
>
> On 18 Mar 2017 10:06, "Chandana Napagoda"  wrote:
>
> Hi Manu,
>
> This is not a bug in uuf client. Once js is dynamically loaded, they can
> bind events from that javascript. You can verify it by modifying the sample
> I have mentioned in my previous mail.
>
> BTW, could you please elaborate more on what you meant by "special"
> fragments?
>
> Regards,
> Chandana
>
> On Thu, Mar 16, 2017 at 5:12 PM, Manuranga Perera  wrote:
>
>> Hi Denuwanthi, Rajith,
>>
>>> onCLick()
>>
>> Please don't do this, What I meant is to put in public/js dir inside the
>> fragment, not in fragment hbs. No JS in HBS please, don't mix logic and
>> pretension.
>>
>> Hi Napa, Sajith,
>>
>>> you should bind/initialize javascript events using the success event of
>>> the renderFragment method.
>>
>> I don't think this is a good constraint, that means people have to write
>> "spacial" fragments if they want to work with client side. UUF client
>> should attach the script after it attaches the HBS, if not it's bug in UUF
>> client.
>>
>> On Thu, Mar 16, 2017 at 4:22 AM, Denuwanthi De Silva > > wrote:
>>
>>> Hi Chandana,
>>>
>>> Thank you, it works .
>>>
>>>
>>> Thanks,
>>>
>>> On Thu, Mar 16, 2017 at 9:46 AM, Chandana Napagoda 
>>> wrote:
>>>
 Hi Denuwathi,

 As I explained offline, you should bind/initialize javascript events
 using the success event of the renderFragment method. As mentioned, please
 refer client-side fragment sample in the uuf-common sample app.


 Regards,
 Chandana

 On Thu, Mar 16, 2017 at 8:41 AM, Denuwanthi De Silva <
 denuwan...@wso2.com> wrote:

> Thanks all for valuable suggestions.
>
> When rendering fragment via UUFClient, what we noticed is the
> corresponding front-end js did not pickup.
>
> Therefore, as Rajith mentioned used the onCLick() in the button html
> tag.
> But it would be more easier if we can do the front-end js logic of the
> fragment inside the fragment public js itself when using
> UUFclient.renderFragment() method to load the fragment
>
> Thanks
>
>
> On Tue, Mar 14, 2017 at 10:31 PM, Manuranga Perera 
> wrote:
>
>> Fragment is a self contained re usable component. I think its better
>>> to  have the all the front end logic related to the fragment inside that
>>> fragment.
>>>
>> +1
>>
>> On Tue, Mar 14, 2017 at 4:36 PM, Rajith Roshan 
>> wrote:
>>
>>> Hi
>>>
>>> On Tue, Mar 14, 2017 at 7:32 PM, Denuwanthi De Silva <
>>> denuwan...@wso2.com> wrote:
>>>
 Hi,

 I'm currently rendering a fragment inside a page using
 'UUFClient.renderFragment' method.
 Then I display it in the page using "{{#defineZone}} helper.

 This fragment contains a button.
 When I click that button I need to do an ajax call to a micro
 service.

 I make the ajax call inside the front-end js of the current page.
 This seems not to be working, as the button is in the fragment.

>>> This is may be due to, by the time you are registering the on click
>>> event for button the dom does not actually have the button element, 
>>> since
>>> uufrender client works asynchronously.
>>> If you use onclick attribute on the button element itself and write
>>> your logic in the current page then this should work. No need to move 
>>> it to
>>> the fragment.
>>>

 So, is it ok to define a front-end js in the fragment and do the
 ajax call from it, instead of the front-end js of the current page .?

>>>
>>> Fragment is a self contained re usable component. I think its better
>>> to  have the all the front end logic related to the fragment inside that
>>> fragment.
>>>


 Thanks

 --
 Denuwanthi De Silva
 Senior Software Engineer;
 WSO2 Inc.; http://wso2.com,
 Email: denuwan...@wso2.com
 Blog: https://denuwanthi.wordpress.com/

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



Re: [Dev] [UUF]Handling events of fragments

2017-03-18 Thread Manuranga Perera
Why does someone has to use a seccuess event? Can't they just put it in
public/js and get the same result ?

On 18 Mar 2017 10:06, "Chandana Napagoda"  wrote:

Hi Manu,

This is not a bug in uuf client. Once js is dynamically loaded, they can
bind events from that javascript. You can verify it by modifying the sample
I have mentioned in my previous mail.

BTW, could you please elaborate more on what you meant by "special"
fragments?

Regards,
Chandana

On Thu, Mar 16, 2017 at 5:12 PM, Manuranga Perera  wrote:

> Hi Denuwanthi, Rajith,
>
>> onCLick()
>
> Please don't do this, What I meant is to put in public/js dir inside the
> fragment, not in fragment hbs. No JS in HBS please, don't mix logic and
> pretension.
>
> Hi Napa, Sajith,
>
>> you should bind/initialize javascript events using the success event of
>> the renderFragment method.
>
> I don't think this is a good constraint, that means people have to write
> "spacial" fragments if they want to work with client side. UUF client
> should attach the script after it attaches the HBS, if not it's bug in UUF
> client.
>
> On Thu, Mar 16, 2017 at 4:22 AM, Denuwanthi De Silva 
> wrote:
>
>> Hi Chandana,
>>
>> Thank you, it works .
>>
>>
>> Thanks,
>>
>> On Thu, Mar 16, 2017 at 9:46 AM, Chandana Napagoda 
>> wrote:
>>
>>> Hi Denuwathi,
>>>
>>> As I explained offline, you should bind/initialize javascript events
>>> using the success event of the renderFragment method. As mentioned, please
>>> refer client-side fragment sample in the uuf-common sample app.
>>>
>>>
>>> Regards,
>>> Chandana
>>>
>>> On Thu, Mar 16, 2017 at 8:41 AM, Denuwanthi De Silva <
>>> denuwan...@wso2.com> wrote:
>>>
 Thanks all for valuable suggestions.

 When rendering fragment via UUFClient, what we noticed is the
 corresponding front-end js did not pickup.

 Therefore, as Rajith mentioned used the onCLick() in the button html
 tag.
 But it would be more easier if we can do the front-end js logic of the
 fragment inside the fragment public js itself when using
 UUFclient.renderFragment() method to load the fragment

 Thanks


 On Tue, Mar 14, 2017 at 10:31 PM, Manuranga Perera 
 wrote:

> Fragment is a self contained re usable component. I think its better
>> to  have the all the front end logic related to the fragment inside that
>> fragment.
>>
> +1
>
> On Tue, Mar 14, 2017 at 4:36 PM, Rajith Roshan 
> wrote:
>
>> Hi
>>
>> On Tue, Mar 14, 2017 at 7:32 PM, Denuwanthi De Silva <
>> denuwan...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I'm currently rendering a fragment inside a page using
>>> 'UUFClient.renderFragment' method.
>>> Then I display it in the page using "{{#defineZone}} helper.
>>>
>>> This fragment contains a button.
>>> When I click that button I need to do an ajax call to a micro
>>> service.
>>>
>>> I make the ajax call inside the front-end js of the current page.
>>> This seems not to be working, as the button is in the fragment.
>>>
>> This is may be due to, by the time you are registering the on click
>> event for button the dom does not actually have the button element, since
>> uufrender client works asynchronously.
>> If you use onclick attribute on the button element itself and write
>> your logic in the current page then this should work. No need to move it 
>> to
>> the fragment.
>>
>>>
>>> So, is it ok to define a front-end js in the fragment and do the
>>> ajax call from it, instead of the front-end js of the current page .?
>>>
>>
>> Fragment is a self contained re usable component. I think its better
>> to  have the all the front end logic related to the fragment inside that
>> fragment.
>>
>>>
>>>
>>> Thanks
>>>
>>> --
>>> Denuwanthi De Silva
>>> Senior Software Engineer;
>>> WSO2 Inc.; http://wso2.com,
>>> Email: denuwan...@wso2.com
>>> Blog: https://denuwanthi.wordpress.com/
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



 --
 Denuwanthi De Silva
 Senior Software Engineer;
 WSO2 Inc.; http://wso2.com,
 Email: denuwan...@wso2.com
 Blog: https://denuwanthi.wordpress.com/

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


>>>
>>>
>>> 

Re: [Dev] [UUF]Handling events of fragments

2017-03-18 Thread Chandana Napagoda
Hi Manu,

This is not a bug in uuf client. Once js is dynamically loaded, they can
bind events from that javascript. You can verify it by modifying the sample
I have mentioned in my previous mail.

BTW, could you please elaborate more on what you meant by "special"
fragments?

Regards,
Chandana

On Thu, Mar 16, 2017 at 5:12 PM, Manuranga Perera  wrote:

> Hi Denuwanthi, Rajith,
>
>> onCLick()
>
> Please don't do this, What I meant is to put in public/js dir inside the
> fragment, not in fragment hbs. No JS in HBS please, don't mix logic and
> pretension.
>
> Hi Napa, Sajith,
>
>> you should bind/initialize javascript events using the success event of
>> the renderFragment method.
>
> I don't think this is a good constraint, that means people have to write
> "spacial" fragments if they want to work with client side. UUF client
> should attach the script after it attaches the HBS, if not it's bug in UUF
> client.
>
> On Thu, Mar 16, 2017 at 4:22 AM, Denuwanthi De Silva 
> wrote:
>
>> Hi Chandana,
>>
>> Thank you, it works .
>>
>>
>> Thanks,
>>
>> On Thu, Mar 16, 2017 at 9:46 AM, Chandana Napagoda 
>> wrote:
>>
>>> Hi Denuwathi,
>>>
>>> As I explained offline, you should bind/initialize javascript events
>>> using the success event of the renderFragment method. As mentioned, please
>>> refer client-side fragment sample in the uuf-common sample app.
>>>
>>>
>>> Regards,
>>> Chandana
>>>
>>> On Thu, Mar 16, 2017 at 8:41 AM, Denuwanthi De Silva <
>>> denuwan...@wso2.com> wrote:
>>>
 Thanks all for valuable suggestions.

 When rendering fragment via UUFClient, what we noticed is the
 corresponding front-end js did not pickup.

 Therefore, as Rajith mentioned used the onCLick() in the button html
 tag.
 But it would be more easier if we can do the front-end js logic of the
 fragment inside the fragment public js itself when using
 UUFclient.renderFragment() method to load the fragment

 Thanks


 On Tue, Mar 14, 2017 at 10:31 PM, Manuranga Perera 
 wrote:

> Fragment is a self contained re usable component. I think its better
>> to  have the all the front end logic related to the fragment inside that
>> fragment.
>>
> +1
>
> On Tue, Mar 14, 2017 at 4:36 PM, Rajith Roshan 
> wrote:
>
>> Hi
>>
>> On Tue, Mar 14, 2017 at 7:32 PM, Denuwanthi De Silva <
>> denuwan...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I'm currently rendering a fragment inside a page using
>>> 'UUFClient.renderFragment' method.
>>> Then I display it in the page using "{{#defineZone}} helper.
>>>
>>> This fragment contains a button.
>>> When I click that button I need to do an ajax call to a micro
>>> service.
>>>
>>> I make the ajax call inside the front-end js of the current page.
>>> This seems not to be working, as the button is in the fragment.
>>>
>> This is may be due to, by the time you are registering the on click
>> event for button the dom does not actually have the button element, since
>> uufrender client works asynchronously.
>> If you use onclick attribute on the button element itself and write
>> your logic in the current page then this should work. No need to move it 
>> to
>> the fragment.
>>
>>>
>>> So, is it ok to define a front-end js in the fragment and do the
>>> ajax call from it, instead of the front-end js of the current page .?
>>>
>>
>> Fragment is a self contained re usable component. I think its better
>> to  have the all the front end logic related to the fragment inside that
>> fragment.
>>
>>>
>>>
>>> Thanks
>>>
>>> --
>>> Denuwanthi De Silva
>>> Senior Software Engineer;
>>> WSO2 Inc.; http://wso2.com,
>>> Email: denuwan...@wso2.com
>>> Blog: https://denuwanthi.wordpress.com/
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



 --
 Denuwanthi De Silva
 Senior Software Engineer;
 WSO2 Inc.; http://wso2.com,
 Email: denuwan...@wso2.com
 Blog: https://denuwanthi.wordpress.com/

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


>>>
>>>
>>> --
>>> *Chandana Napagoda*
>>> Associate Technical Lead
>>> WSO2 Inc. - http://wso2.org
>>>
>>> *Email  :  chand...@wso2.com **Mobile : +94718169299
>>> 

Re: [Dev] [GSOC][CEP][DEV] Python API for Siddhi CEP

2017-03-18 Thread Madhawa Vidanapathirana
Hi Suho,

You can find the python version of test case written using Pyjnius in below
link.
https://github.com/madhawav/CEP-Python-Wraps/tree/master/Pyjnius%20Prototype%20Wrap
Instructions on building the code is also given their.

During development, I noticed following disadvantages of Pyjnius API

   - Not compatible with Python 3.x.
   - There are no stable releases. However, the code available in master
   branch is relatively stable.
   - Difficult to configure. It is required to develop the library from
   source. This would make it difficult to distribute an API developed on
   Pyjnius.
   - There are no evidence that a proper release would be done soon.

However, Pyjnius supports callback of events from Java to Python.
Additionally, it is easier to develop using Pyjnius ones it is configured.

So, I had a looked at some of the other options as well.

Java Bridge

*Advantages*

   - Has stable releases available through Python Package Index. (pip)

*Disadvantages*

   - No direct call-back mechanism to receive events from Java side. It is
   possible to execute Python scripts in Java  but those scripts would not be
   in same context as Python Host App.
   - Comparatively harder to develop on but it is manageable.

Py4J

The main difference in Py4J is that it uses socket connections to
communicate with JVM instead of JNI. (secured socket connections are
possible).

*Advantages*

   - Stable release available through Python Package Index (pip). Easy to
   configure.
   - Can connect to an already running Java application (with Py4J) and
   communicate with it. (Thus, can be used to communicate with a running
   instance of WSO2 CEP)
   - Supports callback events.
   - Well maintained documentation. Active project.

*Disadvantages*

   - Would require a work-around to avoid clashing between socket
   connection ports when concurrent applications use the API.

As of now, I feel Py4J is the most suitable option. However, I am yet to
look at some other options available such as JPy and JCC.

Regards,

Madhawa

On Wed, Mar 15, 2017 at 11:10 PM, Sriskandarajah Suhothayan 
wrote:

> Great, do also start working on writing the project proposal.
>
> Regards
> Suho
>
> On Wed, Mar 15, 2017 at 10:58 PM, Madhawa Vidanapathirana <
> madhawavidanapathir...@gmail.com> wrote:
>
>> Hi Suho,
>> Progress made so far is managed to write a python version of test case
>> you suggested using Pyjnius [1] [2].
>> Pyjnius is capable of handling method calls and callbacks to/from JAVA
>> via JNI.
>>
>> I will send the code here after I properly arrange it into a prototype
>> API.
>>
>> [1] - https://pyjnius.readthedocs.io/en/latest/index.html
>> [2] - https://github.com/kivy/pyjnius/blob/master/docs/source/index.rst
>>
>> Regards,
>> Madhawa
>>
>> On Wed, Mar 15, 2017 at 1:11 AM, Sriskandarajah Suhothayan > > wrote:
>>
>>> As the first step focus on building APIs such that we can write the
>>> following test case[1] in python.
>>>
>>> [1]https://github.com/wso2/siddhi/blob/master/modules/siddhi
>>> -samples/quick-start-samples/src/main/java/org/wso2/siddhi/s
>>> ample/SimpleFilterSample.java
>>>
>>> Regards
>>> Suho
>>>
>>> On Tue, Mar 14, 2017 at 9:55 AM, Madhawa Vidanapathirana <
>>> madhawavidanapathir...@gmail.com> wrote:
>>>
 Hi,
 Thank you for your quick reply.

 Since directly using Siddhi Library is the more general case, I'll
 first focus on it.

 1) I am thinking about following the same structure in JAVA API,
 centered around Siddhi Manager. Any opinions on this?
 2) Any idea on extent to which lower level/internal components should
 be exposed? (e.g. - Exposing "StreamDefinition" class in addition to
 creating stream via Siddhi query using 
 "siddhiManager.createExecutionPlanRuntime").
 I have heard that it is usually discouraged to use lower level components
 instead of the query approach.

 Will try to send you a prototype covering basic functionality through
 Siddhi Java API, before making the proposal for entire project.

 Madhawa

 On Mon, Mar 13, 2017 at 9:53 PM, Sriskandarajah Suhothayan <
 s...@wso2.com> wrote:

>
>
> On Sun, Mar 12, 2017 at 12:37 PM, Madhawa Vidanapathirana <
> madhawavidanapathir...@gmail.com> wrote:
>
>> Hi.
>>
>> I am an undergraduate from Department of Computer Science and
>> Engineering, University of Moratuwa. I recently completed my internship 
>> at
>> WSO2 working with the Support Team on the project WSO2 Support Knowledge
>> Base.
>>
>> I am interested on GSOC Project* "Proposal 16: Python API for Siddhi
>> CEP"*. My internship project at WSO2 was almost entirely done using
>> Python. Additionally, I used Py4J Framework to interface certain parts of
>> the project to JAVA APIs. Furthermore, I have a certain amount of 
>> exposure
>> with Siddhi/CEP through the WHACK project I took