Re: [Dev] no viable alternative at input @import

2016-06-17 Thread Yashothara Shanmugarajah
Hi,

You have only two streams ('bro.in.ssh.log:1.0.0 and bro.out.ssh.log:1.0.0).
In this case you are using attribute name as "id.orig_h". In Siddhi
definition we can't give attribute name as like that. You can not use .
(full stop) in our attribute definition. You can use _ (underscore).

Thanks.

Best Regards,
Yashothara.S

Software Engineer
WSO2


On Fri, Jun 17, 2016 at 11:34 AM, Aneela Safdar  wrote:

> Hi,
>
> I am a newbie here and trying to write a simple siddhi query by simply
> importing a custom mapped stream. But as soon as I import it and validate
> query, it gives above error.
>
> My complete query however is
>
> @Import('bro.in.ssh.log:1.0.0')
> define stream inStream (ts string, uid string, id.orig_h string, id.orig_p
> int, id.resp_h string, id.resp_p int, version int, client string, server
> string, cipher_alg string, mac_alg string, compression_alg string, kex_alg
> string, host_key_alg string, host_key string);
>
> @Export('bro.out.ssh.log:1.0.0')
> define stream outStream (ts string, ssh_logins int);
>
> from inStream
> select dateFormat (ts,'-MM-dd HH:mm') as formatedTs, count
> group by formatedTs
> insert into outStream;
>
> All I want to do is to count number of records in a log for a single
> minute and export that time and count to an output Stream. But I am getting
> errors even at the very first line.
>
> Regards, Aneela Safdar
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] no viable alternative at input @import

2016-06-17 Thread Charini Nanayakkara
Hi,

Apart from what Yashothara pointed out, change how you have used dateFormat
extension in the query. time:dateFormat (ts,'-MM-dd HH:mm')  is the
proper way of using the function

Thanks
Charini

On Fri, Jun 17, 2016 at 12:34 PM, Yashothara Shanmugarajah <
yashoth...@wso2.com> wrote:

> Hi,
>
> You have only two streams ('bro.in.ssh.log:1.0.0 and bro.out.ssh.log:1.0.0).
> In this case you are using attribute name as "id.orig_h". In Siddhi
> definition we can't give attribute name as like that. You can not use .
> (full stop) in our attribute definition. You can use _ (underscore).
>
> Thanks.
>
> Best Regards,
> Yashothara.S
>
> Software Engineer
> WSO2
>
>
> On Fri, Jun 17, 2016 at 11:34 AM, Aneela Safdar 
> wrote:
>
>> Hi,
>>
>> I am a newbie here and trying to write a simple siddhi query by simply
>> importing a custom mapped stream. But as soon as I import it and validate
>> query, it gives above error.
>>
>> My complete query however is
>>
>> @Import('bro.in.ssh.log:1.0.0')
>> define stream inStream (ts string, uid string, id.orig_h string,
>> id.orig_p int, id.resp_h string, id.resp_p int, version int, client string,
>> server string, cipher_alg string, mac_alg string, compression_alg string,
>> kex_alg string, host_key_alg string, host_key string);
>>
>> @Export('bro.out.ssh.log:1.0.0')
>> define stream outStream (ts string, ssh_logins int);
>>
>> from inStream
>> select dateFormat (ts,'-MM-dd HH:mm') as formatedTs, count
>> group by formatedTs
>> insert into outStream;
>>
>> All I want to do is to count number of records in a log for a single
>> minute and export that time and count to an output Stream. But I am getting
>> errors even at the very first line.
>>
>> Regards, Aneela Safdar
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Charini Vimansha Nanayakkara
Software Engineer at WSO2
Mobile: 0714126293
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Clarification on closing database connections when using DAO Manager

2016-06-17 Thread Sabra Ossen
Hi All,

What is the best practice for closing database connections when we are
using the DAO Pattern with DAO Manager?

According to [1] the suggestion is to create a DAO Manager and include the
database connection object within the DAO Manager. Each DAO Object is
instantiated by passing the database connection and the connection is
closed from the DAO Manager after execution of the query.

I went through a lot of WSO2 product related code but was not able to see
the usage of a DAO Manager and I saw that the database connections were
closed in the DAO class itself.

What is the suggested practice? Any clarification on this issue is
appreciated.

[1] http://tutorials.jenkov.com/java-persistence/dao-manager.html

Thanks and Regards.

-- 
*Sabra Ossen*
*Software Engineer*
Email: sa...@wso2.com
Mobile: +94 767 837356
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-17 Thread Sabra Ossen
Hi Kasun,

The issue arises when we try to create a new app or version from the ui or
rest api, specifically at the point of accessing the tier api. But since
this issue occurs intermittently by including proper logging in the tier
api and returning proper json responses we will be able to identify the
real reason when such an issue occurs.

Thanks and Regards.


On Sat, Jun 11, 2016 at 2:35 AM, Kasun De Silva  wrote:

> ​Did you try create version from rest api? Can we do a load test to the
> rest api and see?
>



-- 
*Sabra Ossen*
*Software Engineer*
Email: sa...@wso2.com
Mobile: +94 767 837356
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MB] [C5] Integration tests with PAX Exam.

2016-06-17 Thread Hemika Kodikara
Hi Sameera,

I was under the impression that pax exam tests are integration tests as we
are creating an osgi environment with bundles to run the tests. In that
case how can I proceed ?

Hi Aruna/Chanaka,

I went through the links. Having the tests annotated with pax will make the
client code run in an osgi environment. I will have to add the client jars
also to the pax exam osgi environment configurations. Not sure whether its
possible to run the tests using testng and have the osgi environment built
with pax exam.

Regards,
Hemika

Hemika Kodikara
Software Engineer
WSO2 Inc.
lean . enterprise . middleware
http://wso2.com

Mobile : +9477762

On Wed, Jun 15, 2016 at 2:44 PM, Sameera Jayasoma  wrote:

> Hi Hemika,
>
> I think we should not use PAX exam to implement your test case. I think
> this falls under the category of integration tests. PAX Exam should be used
> only to test in-container tests which you cannot test using unit tests.
>
> Thanks,
> Sameera.
>
> On Wed, Jun 15, 2016 at 1:11 PM, Hemika Kodikara  wrote:
>
>> Hi All,
>>
>> In C4, We had integration tests running in a way that the server is
>> started up by the test framework and the MB test cases were done through a
>> JMS client. This JMS client is completely independent from MB(has no
>> dependencies from MB other than the andes client jar).
>>
>> For C5, How can I achieve this ? IMO, running the JMS client in an OSGi
>> environment is not required. Is it possible to start and stop the server
>> using pax exam per testng suite ?
>>
>> Is there an example on how to achieve this ? As far I see, the only task
>> that needs to be done through pax exam is to start and stop the MB server
>> environment.
>>
>> Any advice on this ?
>>
>> Regards,
>> Hemika
>>
>> Hemika Kodikara
>> Software Engineer
>> WSO2 Inc.
>> lean . enterprise . middleware
>> http://wso2.com
>>
>> Mobile : +9477762
>>
>
>
>
> --
> Sameera Jayasoma,
> Software Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://blog.sameera.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
> Mobile: 0094776364456
>
> Lean . Enterprise . Middleware
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] ESB Analytics for MT scenarios?

2016-06-17 Thread Kasun Indrasiri
How about the $subject? I don't think there's no any limitation from the
mediation engine side on collecting these stats. We need to have this for
ESB 5.

-- 
Kasun Indrasiri
Software Architect
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

cell: +94 77 556 5206
Blog : http://kasunpanorama.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [MSF4J] Possible Memory Leak When Streaming

2016-06-17 Thread Thusitha Thilina Dayaratne
Hi Isuru,

I've tested the msf4j fileserver and formparam samples with the
carbon-transport 2.1.1-SNAPSHOTS.
The memory leak issue is now fixed.

Thanks
Thusitha

On Tue, Jun 14, 2016 at 2:29 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Isuru,
>
> Thank for the clarification.
>
> Best Regards
> Thusitha
>
> On Tue, Jun 14, 2016 at 2:24 PM, Isuru Ranawaka  wrote:
>
>> Hi Thusitha,
>>
>> Need to release Netty ByteBuf after consuming it. Netty ByteBuf
>> internally keep reference count and if it does not actually has a
>> reference  then GC runs  and try to remove the object from heap  but if
>> Netty level  reference count >= 1 at that time this Error will be thrown.
>> we will check how to eliminate this error from transport level.
>>
>> thanks
>>
>> On Tue, Jun 14, 2016 at 12:35 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> When I'm trying to stream a large request  (about 500mb file) I'm
>>> getting below error.
>>>
>>> ERROR ResourceLeakDetector:171 - LEAK: ByteBuf.release() was not called
 before it's garbage-collected. See
 http://netty.io/wiki/reference-counted-objects.html for more
 information.
>>>
>>>
>>> When I run with *-Dio.netty.leakDetectionLevel=advanced *I can see the
>>> below stacktrace
>>>
 Recent access records: 5

 #5:

 io.netty.buffer.AdvancedLeakAwareByteBuf.nioBuffer(AdvancedLeakAwareByteBuf.java:667)

 org.wso2.carbon.transport.http.netty.NettyCarbonMessage.getMessageBody(NettyCarbonMessage.java:62)
 org.wso2.msf4j.Request.getMessageBody(Request.java:56)

 org.wso2.msf4j.io.MSF4JRequestInputStream.read(MSF4JRequestInputStream.java:41)
 java.io.InputStream.read(InputStream.java:179)

 org.wso2.msf4j.formparam.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:814)

 org.wso2.msf4j.formparam.MultipartStream$ItemInputStream.read(MultipartStream.java:718)
 java.io.InputStream.read(InputStream.java:101)
 java.nio.file.Files.copy(Files.java:2908)
 java.nio.file.Files.copy(Files.java:3027)

 org.wso2.msf4j.example.FormService.simpleFormStreaming(FormService.java:79)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 java.lang.reflect.Method.invoke(Method.java:497)

 org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(HttpMethodInfo.java:106)

 org.wso2.msf4j.internal.MSF4JMessageProcessor.dispatchMethod(MSF4JMessageProcessor.java:126)

 org.wso2.msf4j.internal.MSF4JMessageProcessor.receive(MSF4JMessageProcessor.java:73)

 org.wso2.carbon.transport.http.netty.listener.WorkerPoolDispatchingSourceHandler$1.run(WorkerPoolDispatchingSourceHandler.java:125)

 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 java.lang.Thread.run(Thread.java:745)
 #4:

 io.netty.buffer.AdvancedLeakAwareByteBuf.release(AdvancedLeakAwareByteBuf.java:45)

 io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:237)

 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)

 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)

 io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)

 io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)

 io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)

 io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)

 io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
 io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)

 io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)

 io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
 java.lang.Thread.run(Thread.java:745)
 #3:

 io.netty.buffer.AdvancedLeakAwareByteBuf.retain(AdvancedLeakAwareByteBuf.java:709)

 io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:294)

 io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:327)

 io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)

 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)

 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)

 io.netty

[Dev] IS Analytics Issue in showing overall Authentication count when followed multiple step authentication

2016-06-17 Thread Damith Wickramasinghe
Hi All,

According to our design for authentication dashboard we have two views
which are the federated view and resident view. Both view has a gadget
which shows overall authentication success and failure count.

Issue arises when a user logs in using multi step authentication which
comprise of both resident and federated authenticators. Previously we
identified overall authentication success using the event sent by the
framework IF all the step authenticators are success.

Eg:- If user authenticates with two step authenticators which are type of
local then for the DAS side we are receiving three events from the
corresponding authenticator and the framework. To identify that this is a
not a federated authentication scenario from IS side a boolean attribute is
sent as isFederated which is false for above scenario.

So in the resident view we will have overall authentication count as 1.

But if user authenticates with two authenticators which are of local and
federated then again we receive three events but for the event which is
sent from framework , the isFederated value is *False*. So we have a issue
of showing overall authentication count for federated view because of this.

So the proposing solution is to check if a certain authentication attempt
involves federated authenticators and if its the case send  a String value
of "ALL" for isFederated attribute or True or False respectively.

So following above if the user authenticates with two step authentication
of federated and local(Success scenario) we show in both views that in
overall, user has one authentication success attempt.

Please raise any concerns on this.

Regards,
Damith.


-- 
Software Engineer
WSO2 Inc.; http://wso2.com

lean.enterprise.middleware

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


Re: [Dev] [App Cloud] Reproduce the intermittent Malformed JSON Exception when calling tier api

2016-06-17 Thread Kasun De Silva
Better add some debug logs to the tier and print this Malformed Json too,
in such cases. SO that you can Identify whats going on.

On Fri, Jun 17, 2016 at 3:45 AM, Sabra Ossen  wrote:

> Hi Kasun,
>
> The issue arises when we try to create a new app or version from the ui or
> rest api, specifically at the point of accessing the tier api. But since
> this issue occurs intermittently by including proper logging in the tier
> api and returning proper json responses we will be able to identify the
> real reason when such an issue occurs.
>
> Thanks and Regards.
>
>
> On Sat, Jun 11, 2016 at 2:35 AM, Kasun De Silva  wrote:
>
>> ​Did you try create version from rest api? Can we do a load test to the
>> rest api and see?
>>
>
>
>
> --
> *Sabra Ossen*
> *Software Engineer*
> Email: sa...@wso2.com
> Mobile: +94 767 837356
>



-- 
*Kasun de Silva*
Senior Software Engineer

WSO2 Inc *. *|* E*mail : kas...@wso2.com | Mobile: +94 77
794 4260
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] APIM 2.0.0-SNAPSHOT Nightly build - 17/06/2016

2016-06-17 Thread Bhathiya Jayasekara
Hi all,

Please find today's nightly builds.

APIM 2.0.0 SNAPSHOT[1], P2 repo[2] and IS 5.2.0 SNAPSHOT[3].

[1]
https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/wso2am-2.0.0-SNAPSHOT-17-06-2016.zip
[2]
https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/p2-repos/17-06-2016/p2-repo.zip
[3]
http://maven.wso2.org/nexus/content/repositories/snapshots/org/wso2/is/wso2is/5.2.0-SNAPSHOT/wso2is-5.2.0-20160617.023441-125.zip

Thanks,

-- 
*Bhathiya Jayasekara*
*Senior Software Engineer,*
*WSO2 inc., http://wso2.com *

*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
*
*Twitter: https://twitter.com/bhathiyax *
*Blog: http://movingaheadblog.blogspot.com
*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 ESB tests

2016-06-17 Thread Abhishek Tiwari
Hi All,

My name is Abhishek, and I am a GSoC student,  working on the test
framework for WSO2 Dockerfiles. As part of that, I am writing tests for
individual products once they have been deployed using Docker container.
Currently I am writing tests for ESB. I plan to write tests for
- Creating and testing proxy service
- Creating and testing APIs
- Applying WS-Security to proxy services and testing the applied security

Are there existing smoke tests in ESB which I can use as reference? Where
can I get the details around creating proxies, APIs programmatically?

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


Re: [Dev] APIM 2.0.0-SNAPSHOT Nightly build - 17/06/2016

2016-06-17 Thread Nirmal Fernando
Please find the API-M analytics pack
https://wso2.org/jenkins/job/analytics-apim/173/org.wso2.analytics.apim$wso2analytics-apim/artifact/org.wso2.analytics.apim/wso2analytics-apim/1.0.0-SNAPSHOT/wso2analytics-apim-1.0.0-SNAPSHOT.zip

On Fri, Jun 17, 2016 at 10:07 PM, Bhathiya Jayasekara 
wrote:

>
> Hi all,
>
> Please find today's nightly builds.
>
> APIM 2.0.0 SNAPSHOT[1], P2 repo[2] and IS 5.2.0 SNAPSHOT[3].
>
> [1]
> https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/wso2am-2.0.0-SNAPSHOT-17-06-2016.zip
> [2]
> https://svn.wso2.org/repos/wso2/scratch/2016/apim-2.0.0/p2-repos/17-06-2016/p2-repo.zip
> [3]
> http://maven.wso2.org/nexus/content/repositories/snapshots/org/wso2/is/wso2is/5.2.0-SNAPSHOT/wso2is-5.2.0-20160617.023441-125.zip
>
> Thanks,
>
> --
> *Bhathiya Jayasekara*
> *Senior Software Engineer,*
> *WSO2 inc., http://wso2.com *
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> *
> *Twitter: https://twitter.com/bhathiyax *
> *Blog: http://movingaheadblog.blogspot.com
> *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB tests

2016-06-17 Thread Nuwan Pallewela
Hi Abhishek,

You can find the existing test cases from the product-esb source[1].
What you may basically have to do is save proxy or API configs as files and
then deploy them in ESB server and test by sending requests. By referring
to already written test cases you can easily understand.

[1]
https://github.com/wso2/product-esb/tree/master/modules/integration/tests-integration

Thanks,
Nuwan

On Fri, Jun 17, 2016 at 10:12 PM, Abhishek Tiwari <
abhishek.tiwari0...@gmail.com> wrote:

> Hi All,
>
> My name is Abhishek, and I am a GSoC student,  working on the test
> framework for WSO2 Dockerfiles. As part of that, I am writing tests for
> individual products once they have been deployed using Docker container.
> Currently I am writing tests for ESB. I plan to write tests for
> - Creating and testing proxy service
> - Creating and testing APIs
> - Applying WS-Security to proxy services and testing the applied security
>
> Are there existing smoke tests in ESB which I can use as reference? Where
> can I get the details around creating proxies, APIs programmatically?
>
> Thanks
> Abhishek
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
--

*Nuwan Chamara Pallewela*


*Software Engineer*

*WSO2, Inc. *http://wso2.com
*lean . enterprise . middleware*

Email   *nuw...@wso2.com *
Mobile  *+94719079739@*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Issue while using Conditional Group

2016-06-17 Thread Vanjikumaran Sivajothy
The decision should be made at CEP level however, AFAIU GW has the some
kind filter before reaching to target destination. So isnt that the place
correctly match and evaluate ?

On Thu, Jun 16, 2016 at 5:50 PM, Amila De Silva  wrote:

> Hi Uvindra, Harsha,
>
> I don't think it's possible to get CEP do this. If we'd been calling CEP
> and waiting on its decision to let the request through, it would have been
> possible. Then for each request, CEP would evaluate the query and tell
> which conditions are applicable for that incoming request, and if the
> throttling quota defined by that policy has exceeded.
>
> With the current approach, what CEP does is, determining which counters
> should be incremented based on the published message and sending a message
> when any of the conditions have been throttled out. Gateway only have a
> bunch of throttled out keys, so it should have  a means of finding which
> keys are to be checked with each request.
>
> Rather than evaluating all the conditions for each request, we can
> optimise it (like first checking if any throttled out records are present
> for that API and then only evaluate the conditions), but the check needed
> to be done at the GW seems to be inevitable.
>
> On Thu, Jun 16, 2016 at 10:46 PM, Harsha Kumara  wrote:
>
>> Hi Amila,
>>
>> Are we going to evaluate the condition from the GW side? We will need to
>> check the possibility of doing this in CEP.  Otherwise it will performance
>> may degrade drastically. Again I'm doubt whether we can do it from the CEP
>> side as we publish set of data and take decisions based on the data coming
>> on the stream. It's independent of the request. Unless we have specific key
>> combination or identification pattern we won't be able to do it in the CEP
>> side as well.
>>
>> We will need to have a way to identify which condition group triggered
>> based on the data coming. Asynchronous behavior of data processing make it
>> harder to identify it from the CEP and transfer it to the gateway.
>>
>> Thanks,
>> Harsha
>>
>> On Sun, Jun 12, 2016 at 9:13 PM, Uvindra Dias Jayasinha > > wrote:
>>
>>> Hi Amila,
>>>
>>> I think it defeats the purpose if we need to evaluate conditions again
>>> on the GW side(GW starts to do part of the decision manager role), is it
>>> possible to fix this by asking CEP to provide the aggregate result of all
>>> the available conditions?
>>>
>>>
>>>
>>> On 11 June 2016 at 12:12, Amila De Silva  wrote:
>>>
 Hi All,

 This is related to the discussion had with Harsha on a particular
 behaviour observed when having Conditional Groups.

 Suppose we have a throttling policy like below;

 *default* - 1000 req/min

 *Condition* - 50 req/min if IP is 10.100.0.5


 The expected behaviour is, if requests are coming from 10.100.0.5, only
 to allow 50 req/min, but if coming from a different destination, allow 
 1000.

 But we observed that, when requests coming from 10.100.0.5 have been
 throttled out after utilising it’s full quota (50 req/min) , GW won’t
 accept any requests even from a different destination.


 While investigating the issue found that it was due to the way we
 enforce throttling at the GW.

 If we consider creating the above condition, then;

 1. Two Condition elements gets created (one for the default and the
 other for the actual condition) and get saved in the DB.

 2. Two execution plans are created to handle the conditions and are
 deployed in the CEP.


 As APIs are invoked

 1. CEP runs the queries and correctly evaluates which condition has
 been fulfilled .Say that we are invoking with the specified IP, then CEP
 will keep incrementing the counter related to IP based condition.

 2. Once the limit has reached, CEP publishes the condition which has
 been throttled out.

 3. When GW start to enforce throttling, it simply gets all the
 throttling conditions attached with the resource. So now the resource has
 two conditions attached - the default one and the ip based one.

 4. GW doesn’t determine which condition should be checked (If a request
 is made from a different destination GW should look at the default
 condition, but with the current implementation it doesn’t) . It simply
 checks if any of the conditions attached with the resource have been
 throttled out.


 Due to this, if one of the conditions engaged with the request gets
 throttled out, no additional request can make through the GW, until time
 duration elapses.


 This is a bug and we have to fix this, but we also have to be aware of
 the downsides of fixing this;

 If we are to correctly fix this,

 1. First at the GW, we have to determine which condition is applicable
 for the incoming request.

 2. To do this, some additional data has to be sent fr

Re: [Dev] [DEV] Need to know and contribute

2016-06-17 Thread Vivekananthan Sivanayagam
Hi Mayuran,

Nice to hear that you guys like to contribute to our ESB connector store.
You can also refer Creating a Third Party Connector[1].

@Malaka
Shall we suggest a connector ?

[1]
https://docs.wso2.com/display/ESBCONNECTORS/Creating+a+Third+Party+Connector+and+Publishing+in+WSO2+Store

Refer following links for more details of creating the new connector.

[2] https://docs.wso2.com/display/ESBCONNECTORS/Writing+a+Connector
[3] http://wso2.com/library/articles/2014/02/how-to-write-a-esb-connector/







*Thank youVivekananthan Sivanayagam*

*Associate Software Engineer | WSO2*

*E:vivekanant...@wso2.com *
*M:+94752786138*

On Tue, Jun 14, 2016 at 12:16 AM, Hariprasath Thanarajah <
haripras...@wso2.com> wrote:

> Hi Mayuran,
>
> Really nice to hear about your interest in WSO2. You will get some idea
> about connectors[1] and WSO2-ESB[2].  You may getting help from your
> seniors since they were already did this.
>
> [1] - https://docs.wso2.com/display/ESBCONNECTORS/WSO2+ESB+Connectors
> [2] -
> https://docs.wso2.com/display/ESB490/WSO2+Enterprise+Service+Bus+Documentation
>
> On Tue, Jun 14, 2016 at 12:08 AM, Tharmalingam Mayuran <
> tmayura...@gmail.com> wrote:
>
>> Hi All,
>>
>> I'm Mayuran doing computer science at Department of Computer Science,
>> University of Jaffna. I was participate the Jaffna meetup last month. I got
>> some idea about How to contribute to WSO2 and about WSO2 extensions and
>> their usages. I would like to contribute to WSO2(wso2-extension). Some of
>> my colleagues were already done this and some are working on this. Could
>> you please share some useful documentation to understand the basic about
>> ESB and wso2-extension. I and my friend would like to create an
>> ESB-Connector. Can anyone suggest a useful connector as well to create?
>>
>> Thanks and Regards
>> Mayuran T
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
>
> *Thank you and Regards**Hariprasath Thanarajah*
> Associate Software Engineer | WSO2
> E: haripras...@wso2.com
> M: +94752806528, 0777216903
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev