stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohanadarshan Vivekanandalingam <>
Subject Re: Problem with init() Method of Window Processors in Apache Stratos CEP Extension
Date Thu, 28 Jan 2016 11:09:24 GMT
On Thu, Jan 28, 2016 at 1:59 PM, Tharindu Munasinghe <> 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..


> [1]
> [2]
> [3]
> Thanks,
> Tharindu
> --
> *Th**a**rindu Munasin**ghe.*
> *Undergraduate ,Department of Computer **S**cience and Engineering*
> *University of Moratuwa.*
> *Contact no. +94770460887*

*V. Mohanadarshan*
*Senior Software Engineer,*
*Data Technologies Team,*
*WSO2, Inc. <> *

phone:(+94) 771117673

View raw message