Hi Nirmal,
On 11 October 2013 15:35, Nirmal Fernando <[email protected]> wrote: > Lasantha, > > Yes, that was the issue. Thanks. > Great to hear that!.. > > Just for my information, why don't you guys clone events and give them to > the different execution plans? Is it a performance hit? Wouldn't keeping a > reference harms the mutual exclusiveness? > I think probably the concern is memory rather than performance itself. If we consider events as read-only, sending the reference would save a lot of memory and a bit of processing as well IMHO. Thanks, Lasantha > > > On Fri, Oct 11, 2013 at 3:25 PM, Nirmal Fernando <[email protected]> wrote: > >> >> >> >> On Fri, Oct 11, 2013 at 3:18 PM, Lasantha Fernando <[email protected]>wrote: >> >>> >>> >>> >>> On 11 October 2013 15:10, Nirmal Fernando <[email protected]> wrote: >>> >>>> Rajeev, >>>> >>>> >>>> On Fri, Oct 11, 2013 at 2:12 PM, Rajeev Sampath <[email protected]>wrote: >>>> >>>>> >>>>> Hi Nirmal, >>>>> >>>>> This happens when the window porcessor modifies incoming events >>>>> instead of creating new ones and emitting them. In CEP, same event is >>>>> dispatched to multiple execution plans without cloning. >>>>> >>>> >>>> In fact I'm creating a new event: >>>> >>>> InEvent gradientEvent = >>>> new InEvent(firstInEvent.getStreamId(), >>>> System.currentTimeMillis(), >>>> data); >>>> >>> >>> Hi Nirmal, >>> >>> Can you verify if 'data' is the object array reference from the original >>> event? Or are you copying the values inside the object array into a new >>> array (Array copy)? >>> >> >> Thanks Lasantha. I think you asked the correct question. Yes, I was >> directly using the data object and modify only the one I required and now I >> see the problem (you keep a references to data objects). >> >> Let me use a clone and see. >> >> >> >>> >>> Thanks, >>> Lasantha >>> >>> >>>>> So modifying the custom window processor to create a new event with >>>>> modified data will solve the problem. >>>>> >>>>> >>>>> Thanks >>>>> Rajeev >>>>> >>>>> >>>>> On Fri, Oct 11, 2013 at 10:42 AM, Nirmal Fernando <[email protected]>wrote: >>>>> >>>>>> I've provided my configs to the team. >>>>>> >>>>>> >>>>>> >>>>>> On Fri, Oct 11, 2013 at 10:37 AM, Srinath Perera <[email protected]>wrote: >>>>>> >>>>>>> Ah then it should not get to other execution plans. Pls chat with >>>>>>> Mohan a bit. >>>>>>> >>>>>>> >>>>>>> On Fri, Oct 11, 2013 at 10:34 AM, Nirmal Fernando >>>>>>> <[email protected]>wrote: >>>>>>> >>>>>>>> Well, I'm sending this event from within an execution plan (I'm >>>>>>>> generating a new event), and event's stream id is set to my alias. >>>>>>>> >>>>>>>> >>>>>>>> On Fri, Oct 11, 2013 at 10:30 AM, Srinath Perera >>>>>>>> <[email protected]>wrote: >>>>>>>> >>>>>>>>> But if you send a event via the network to a stream, all alias >>>>>>>>> registered against the stream receives the event. >>>>>>>>> >>>>>>>>> --Srinath >>>>>>>>> >>>>>>>>> >>>>>>>>> On Fri, Oct 11, 2013 at 10:26 AM, Nirmal Fernando <[email protected] >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Hi Srinath, >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Fri, Oct 11, 2013 at 10:21 AM, Srinath Perera < >>>>>>>>>> [email protected]> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Nirmal, >>>>>>>>>>> >>>>>>>>>>> I think we create an Siddhi engine per execution plan >>>>>>>>>>> >>>>>>>>>>> But incoming and outgoing streams are shared. If you send an >>>>>>>>>>> event to a stream from outside, all execution plans that use the >>>>>>>>>>> same >>>>>>>>>>> stream receives the event. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> My understanding is by aliasing a stream, my execution plan would >>>>>>>>>> get a new stream not a reference. Am I wrong? >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> Srinath >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Fri, Oct 11, 2013 at 10:02 AM, Nirmal Fernando < >>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>> >>>>>>>>>>>> I know this is a somewhat serious claim and I'll be more than >>>>>>>>>>>> happy, if someone can prove me wrong :) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Fri, Oct 11, 2013 at 9:52 AM, Nirmal Fernando < >>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi All, >>>>>>>>>>>>> >>>>>>>>>>>>> I expected them to be mutually exclusive in the sense one >>>>>>>>>>>>> change done by one execution plan, should not affect any other >>>>>>>>>>>>> execution >>>>>>>>>>>>> plan (If they are not intentionally doing that - eg: acting based >>>>>>>>>>>>> on a >>>>>>>>>>>>> stream, updated by one execution plan is an example for >>>>>>>>>>>>> intentionally >>>>>>>>>>>>> having some correlation). >>>>>>>>>>>>> >>>>>>>>>>>>> In my scenario, I have two execution plans and both are using >>>>>>>>>>>>> the same input stream with different aliases (eg: inputstream as >>>>>>>>>>>>> A and >>>>>>>>>>>>> inputStream as B). In one of my execution plans, I've added some >>>>>>>>>>>>> data that >>>>>>>>>>>>> is not compliance with original input stream definition (add a >>>>>>>>>>>>> double >>>>>>>>>>>>> instead of int) and I happened to see that my other execution >>>>>>>>>>>>> plan get >>>>>>>>>>>>> triggered and started to parse this malformed stream and failed >>>>>>>>>>>>> (query has >>>>>>>>>>>>> avg operation, and since AvgOutputAggregator is expecting an >>>>>>>>>>>>> integer but >>>>>>>>>>>>> receiving a double). >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & regards, >>>>>>>>>>>>> Nirmal >>>>>>>>>>>>> >>>>>>>>>>>>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc. >>>>>>>>>>>>> Mobile: +94715779733 >>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> Thanks & regards, >>>>>>>>>>>> Nirmal >>>>>>>>>>>> >>>>>>>>>>>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc. >>>>>>>>>>>> Mobile: +94715779733 >>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> ============================ >>>>>>>>>>> Srinath Perera, Ph.D. >>>>>>>>>>> Director, Research, WSO2 Inc. >>>>>>>>>>> Visiting Faculty, University of Moratuwa >>>>>>>>>>> Member, Apache Software Foundation >>>>>>>>>>> Research Scientist, Lanka Software Foundation >>>>>>>>>>> Blog: http://srinathsview.blogspot.com/ >>>>>>>>>>> Photos: http://www.flickr.com/photos/hemapani/ >>>>>>>>>>> Phone: 0772360902 >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> Thanks & regards, >>>>>>>>>> Nirmal >>>>>>>>>> >>>>>>>>>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc. >>>>>>>>>> Mobile: +94715779733 >>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ============================ >>>>>>>>> Srinath Perera, Ph.D. >>>>>>>>> Director, Research, WSO2 Inc. >>>>>>>>> Visiting Faculty, University of Moratuwa >>>>>>>>> Member, Apache Software Foundation >>>>>>>>> Research Scientist, Lanka Software Foundation >>>>>>>>> Blog: http://srinathsview.blogspot.com/ >>>>>>>>> Photos: http://www.flickr.com/photos/hemapani/ >>>>>>>>> Phone: 0772360902 >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> Thanks & regards, >>>>>>>> Nirmal >>>>>>>> >>>>>>>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc. >>>>>>>> Mobile: +94715779733 >>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ============================ >>>>>>> Srinath Perera, Ph.D. >>>>>>> Director, Research, WSO2 Inc. >>>>>>> Visiting Faculty, University of Moratuwa >>>>>>> Member, Apache Software Foundation >>>>>>> Research Scientist, Lanka Software Foundation >>>>>>> Blog: http://srinathsview.blogspot.com/ >>>>>>> Photos: http://www.flickr.com/photos/hemapani/ >>>>>>> Phone: 0772360902 >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Thanks & regards, >>>>>> Nirmal >>>>>> >>>>>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc. >>>>>> Mobile: +94715779733 >>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Rajeev Sampath >>>>> Senior Software Engineer >>>>> WSO2, Inc.; http://www.wso2.com. >>>>> >>>>> Mobile:* +94716265766 >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Thanks & regards, >>>> Nirmal >>>> >>>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc. >>>> Mobile: +94715779733 >>>> Blog: http://nirmalfdo.blogspot.com/ >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> *Lasantha Fernando* >>> Software Engineer - Data Technologies Team >>> WSO2 Inc. http://wso2.com >>> >>> email: [email protected] >>> mobile: (+94) 71 5247551 >>> >> >> >> >> -- >> >> Thanks & regards, >> Nirmal >> >> Senior Software Engineer- Platform Technologies Team, WSO2 Inc. >> Mobile: +94715779733 >> Blog: http://nirmalfdo.blogspot.com/ >> >> > > > -- > > Thanks & regards, > Nirmal > > Senior Software Engineer- Platform Technologies Team, WSO2 Inc. > Mobile: +94715779733 > Blog: http://nirmalfdo.blogspot.com/ > > -- *Lasantha Fernando* Software Engineer - Data Technologies Team WSO2 Inc. http://wso2.com email: [email protected] mobile: (+94) 71 5247551
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
