+1 from me. If everyone are OK, we can get this done soon so other
toolboxes can be build on top of this.


On Tue, Jul 22, 2014 at 5:55 PM, Chamil Jeewantha <[email protected]> wrote:

> +1 for optimization concern.
>
> In general annotation based systems uses a cache to avoid processing
> annotations again and again. First time when publish receives the Event, It
> process the annotations and put them into a cache. The cache key is the
> class name. Next time onwards no need to process annotations. just read the
> values from POJO and send to BAM.
>
>
>
> On Tue, Jul 22, 2014 at 5:16 PM, Sriskandarajah Suhothayan <[email protected]>
> wrote:
>
>> +1 it looks clean,
>> we might need to do some optimisation at the publisher when converting
>> the annotated class to the stream and Databridge Event.
>>
>> Suho
>>
>>
>>
>> On Tue, Jul 22, 2014 at 3:15 PM, Maninda Edirisooriya <[email protected]>
>> wrote:
>>
>>> +1. This is very clean to write a publisher.
>>> We have to generalize this annotations to become compatible with other
>>> publishers. How do we get the BAM/CEP server connection details?
>>>  Where are we setting the loadbalancing URLs and other Async Publisher
>>> related settings? May be we can set them globally per product. (In this
>>> case specific for each AS cluster) WDYT?
>>>
>>>
>>> *Maninda Edirisooriya*
>>> Senior Software Engineer
>>>
>>> *WSO2, Inc. *lean.enterprise.middleware.
>>>
>>> *Blog* : http://maninda.blogspot.com/
>>> *E-mail* : [email protected]
>>> *Skype* : @manindae
>>> *Twitter* : @maninda
>>>
>>>
>>> On Tue, Jul 22, 2014 at 2:43 PM, Chamil Jeewantha <[email protected]>
>>> wrote:
>>>
>>>> This is a proposal to develop an easy to use, readable Anootation based
>>>> Data publisher for BAM.
>>>>
>>>> When using the AsyncDataPublisher / LoadBalancingDataPublisher, the
>>>> programmer must do a significant amount of boilerplate work before he
>>>> publish data to the stream. See [1].
>>>>
>>>> This will be really easy if we can have annotation based data publisher
>>>> which can be used in the following way.
>>>>
>>>> We write a POJO, annotated with Some Stream Meta Data.
>>>>
>>>> *Example:*
>>>>
>>>> @DataStream(name="stat.data.stream", version="1.0.0", nickName="nick
>>>> name", description="the description")
>>>> public class StatDataStreamEvent{
>>>>
>>>>     @Column(name="serverName", order=2)
>>>>     private String serverName;
>>>>
>>>>     @Column(order = 1)       // no column name defined. so the name
>>>> will be timestamp
>>>>     private long timestamp;
>>>>
>>>>     @Column(name="id", type=DataType.STRING, order = 3)  // the column
>>>> data type is String though the field is int. (example only)
>>>>     private int statId;
>>>>
>>>>    // getters and setters
>>>>    ....
>>>>    ....
>>>> }
>>>>
>>>> *Publishing:*
>>>>
>>>> StatDataStreamEvent event = new StatDataStreamEvent();
>>>>
>>>> event.setServerName("The server Name");
>>>> event.setTimestamp(System.currentTimeMillis());
>>>> event.setStatId(5000);
>>>>
>>>> DataPublisher.publish(event);
>>>>
>>>> Please improve this with your valuable ideas.
>>>>
>>>> [1] 
>>>> http://wso2.com/library/articles/2012/07/creating-custom-agents-publish-events-bamcep/
>>>>
>>>>  --
>>>> K.D. Chamil Jeewantha
>>>> Associate Technical Lead
>>>> WSO2, Inc.;  http://wso2.com
>>>> Mobile: +94716813892
>>>>
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> [email protected]
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>>
>> *S. Suhothayan *
>> Technical Lead & Team Lead of WSO2 Complex Event Processor
>>  *WSO2 Inc. *http://wso2.com
>> * <http://wso2.com/>*
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
>> http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/> twitter:
>> http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in:
>> http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> K.D. Chamil Jeewantha
> Associate Technical Lead
> WSO2, Inc.;  http://wso2.com
> Mobile: +94716813892
>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
============================
Srinath Perera, Ph.D.
   http://people.apache.org/~hemapani/
   http://srinathsview.blogspot.com/
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to