stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tharindu Munasinghe <munasinghethari...@gmail.com>
Subject Re: Problem with init() Method of Window Processors in Apache Stratos CEP Extension
Date Thu, 28 Jan 2016 12:19:42 GMT
Hi Mohan,

Thanks a lot  for the information. We saw some strange behavior that
repeats the creation of window processors. According to your
explanation, it should be due to some other reason. we will check and
update.

Thanks,
Tharindu.
Tharindu Munasinghe.
Undergraduate ,Department of Computer Science and Engineering
University of Moratuwa.
Contact no. +94770460887





On Thu, Jan 28, 2016 at 4:39 PM, Mohanadarshan Vivekanandalingam
<mohan@wso2.com> wrote:
>
>
> On Thu, Jan 28, 2016 at 1:59 PM, Tharindu Munasinghe
> <tharindu.11@cse.mrt.ac.lk> wrote:
>>
>> Hi all,
>>
>> We have written a custom window processor [1] following the same code
>> structure as in [2], and invoked it via [3], as part of a project for
>> improving Apache Stratos prediction techniques. Previously we had assumed
>> that window processors are instantiated one-time when the corresponding
>> execution plan is deployed, so we thought we can maintain the history of
>> health stat information inside the window processors.
>>
>> However, when testing our implementation on AWS infrastructure with an
>> external CEP instance (v3.1.0) we noticed that the init() method of window
>> processors attached to the same stream is invoked multiple times. It appears
>> that the invocation happens periodically. As a result, the Stratos
>> autoscaler receives multiple health stat events of the same type within a
>> given time interval. We investigated the problem with an existing window
>> processor [2] and observed the same phenomenon.
>>
>> At which stage(s) could the init() method be getting invoked, under our
>> current implementation? Also, it is possible that multiple window processor
>> instances could be getting instantiated in case of exceptions occurring in
>> the window processor?
>
>
> Yes, It is a known behavior of Siddhi where init method is called twice (not
> many times).. AFAIR it called in validation flow and actual flow.. In latest
> Siddhi this was implemented differently by introducing new functions which
> called only once..
>
> Thanks,
> Mohan
>
>>
>>
>>
>> [1]
>> https://github.com/ridwannaruto/stratos/blob/fyp/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/src/main/java/org/apache/stratos/cep/extension/PredictorWindowProcessor.java
>>
>> [2]
>> https://github.com/ridwannaruto/stratos/blob/fyp/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/src/main/java/org/apache/stratos/cep/extension/GradientFinderWindowProcessor.java
>>
>> [3]
>> https://github.com/ridwannaruto/stratos/blob/fyp/extensions/cep/modules/artifacts/wso2cep-3.1.0/executionplans/PredictorOfHealthRequest.xml
>>
>> Thanks,
>> Tharindu
>> --
>> Tharindu Munasinghe.
>> Undergraduate ,Department of Computer Science and Engineering
>> University of Moratuwa.
>> Contact no. +94770460887
>
>
>
>
> --
> V. Mohanadarshan
> Senior Software Engineer,
> Data Technologies Team,
> WSO2, Inc. http://wso2.com
> lean.enterprise.middleware.
>
> email: mohan@wso2.com
> phone:(+94) 771117673

Mime
View raw message