Hi all,

We have implemented a similar scenario for gps stream calculations in a
custom function, where we process a single attribute in a stream over a
certain period by passing only that attribute to the function. you can send
your data to your custom function and keep only the attribute you need in a
map or a list. then do the processing and return a value.

 I am not much aware of the processing cost comparison for custom window
and custom extension though. Yet, going through the documentation it seems
like the custom window keeps the event in the window.

thanks
Awanthika

On Fri, Oct 17, 2014 at 6:53 PM, Asok Perera <as...@wso2.com> wrote:

> Hi Shashika/Mohan,
>
> Just for my knowledge,
> Wouldn't a custom window keep a set of complete events when only a set of
> attributes (eg: set of 'bookID's from events) is need to be considered ?
> So won't this be unnecessary overhead ?
>
> If we can create a custom function such that is keeps the BookID
> attributes only in an instance variable (say List), and keep doing the
> calculation on that List, would there be any issue with such a design ?
>
> BR
>
> *Asok Aravinda Perera*
> Software Engineer
> WSO2, Inc.;http://wso2.com/
> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com%2F&sa=D&sntz=1&usg=AFQjCNGJuLRux6KkJwXKVUCYOtEsNCmIAQ>
> lean.enterprise.middleware
>
> Mobile: +94722241032
>
> On Thu, Oct 16, 2014 at 6:42 PM, Shashika Karunatilaka <shashi...@wso2.com
> > wrote:
>
>> Hi Mohanadarshan,
>> Thanks for the info, yes i have to go with the custom window.
>>
>> On Wed, Oct 15, 2014 at 6:03 PM, Mohanadarshan Vivekanandalingam <
>> mo...@wso2.com> wrote:
>>
>>>
>>>
>>> On Wed, Oct 15, 2014 at 5:52 PM, Shashika Karunatilaka <
>>> shashi...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>
>>> Hi Shashika,
>>>
>>>
>>>>
>>>>
>>> I'm in the process of creating siddhi custom function, its like an
>>>> aggregate function which inputs a set of data returns a single value.
>>>> Is there a way  i can send data array to my custom function or else can
>>>> i handle that inside my custom function?
>>>> As an example there is a stream called "A", stream "A" has attribute
>>>> called "bookID", i need to pass all the bookID's in that stream to the
>>>> aggregate function and return a single value.
>>>>
>>>>
>>> Based on my understanding, i don't believe siddhi function is
>>> appropriate for your usecase.. You may need to use transform processor or
>>> window..
>>>
>>> Thanks,
>>> Mohan
>>>
>>>
>>>
>>>> Thank you.
>>>>
>>>> --
>>>> Shashika Prabath Karunatilaka,
>>>> Software Engineer,
>>>> WSO2, Inc: http://wso2.com/
>>>> mobile : +94 77 7487792
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *V. Mohanadarshan*
>>> *Software Engineer,*
>>> *Data Technologies Team,*
>>> *WSO2, Inc. http://wso2.com <http://wso2.com> *
>>> *lean.enterprise.middleware.*
>>>
>>> email: mo...@wso2.com
>>> phone:(+94) 771117673
>>>
>>
>>
>>
>> --
>> Shashika Prabath Karunatilaka,
>> Software Engineer,
>> WSO2, Inc: http://wso2.com/
>> mobile : +94 77 7487792
>>
>> _______________________________________________
>> 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
>
>


-- 
Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to