stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imesh Gunaratne <im...@apache.org>
Subject Re: Why aren't we simply send the corresponding POJO wrapped in an Event?
Date Thu, 05 Dec 2013 10:13:52 GMT
Sorry I didn't get that point earlier. Yes definitely, we could send
complete objects in "Created" events.

Thanks
Imesh


On Thu, Dec 5, 2013 at 12:33 PM, Reka Thirunavukkarasu <reka@wso2.com>wrote:

> Hi
>
> As Nirmal explained atleast for all the *.CreatedEvent, we need to wrap
> the object into the Event. Because for all *.CreatedEvent in cloud
> controller side, we have to build the pojo to update the complete Topology
> as well as create another *.CreatedEvent to publish the events. So, this is
> bit of a pain. Since we have the pojo with us, we can just re-use it when
> creating the event.
>
> Thanks,
> Reka
>
>
>
> On Thu, Dec 5, 2013 at 11:33 AM, Reka Thirunavukkarasu <reka@wso2.com>wrote:
>
>> Isn't it something like we build the whole xxx Pojo by aggregating all
>> the events to xxx<some action>Event. But in this case, minimally we have to
>> modify at least one event whenever we introduce a new field to or remove
>> from the Pojo.
>>
>> Thanks,
>> Reka
>>
>>
>> On Thu, Dec 5, 2013 at 11:18 AM, Nirmal Fernando <nirmal070125@gmail.com>wrote:
>>
>>>
>>>
>>>
>>> On Thu, Dec 5, 2013 at 11:02 AM, Imesh Gunaratne <imesh@apache.org>wrote:
>>>
>>>> I'm sorry I tend to disagree. The reasons for only including the
>>>> properties were:
>>>>
>>>> 1. It reduces the size of the message sent on the network.
>>>> 2. It reduces the time it takes to de-serialize the message.
>>>> 3. Its simple and easier to understand.
>>>>
>>>> Examples:
>>>>
>>>> Event: Member Activated Event
>>>> Properties sent: Member Keys, Member Status = Active
>>>>
>>>> Event: Cluster Removed Event
>>>> Properties sent: Cluster Keys
>>>>
>>>> For an instance, in Cluster Removed Event is there any point sending
>>>> the complete Cluster object with hundreds of child objects in it, just to
>>>> say the subscriber to remove the given cluster object from its service?
>>>>
>>>
>>> Imesh, yes agree. But as I said in my second reply,
>>>
>>> *Isn't this at least make sense, at the *CreatedEvents?*
>>> Currently, you have to change everywhere, if you just add a new
>>> attribute to a POJO.
>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>> On Thu, Dec 5, 2013 at 9:43 AM, Udara Liyanage <udara@wso2.com> wrote:
>>>>
>>>>> +1
>>>>>
>>>>>
>>>>> On Wed, Dec 4, 2013 at 11:07 PM, Nirmal Fernando <
>>>>> nirmal070125@gmail.com> wrote:
>>>>>
>>>>>> Isn't this at least make sense, at the *CreatedEvents? Currently,
if
>>>>>> I do some change to a bean of the topology, I've to duplicate this
change
>>>>>> inside the event too. Which is very error probing.
>>>>>>
>>>>>> If everyone agrees, I could fix this.
>>>>>>
>>>>>>
>>>>>> On Sun, Nov 24, 2013 at 3:22 PM, Nirmal Fernando <
>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>
>>>>>>> All,
>>>>>>>
>>>>>>> AFAIS currently we maintain the same information in a POJO (say
>>>>>>> Cluster) and also in its corresponding event (ClusterCreatedEvent)
>>>>>>> separately. What's the reason behind this? I feel this is an
unnecessary
>>>>>>> work and this doesn't scale.
>>>>>>>
>>>>>>> For me, what makes sense is to send the corresponding POJO wrapped
>>>>>>> via an Event. This way we need to maintain information only at
the POJO and
>>>>>>> makes programming the events much much easy.
>>>>>>>
>>>>>>> WDYT?
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Udara Liyanage
>>>>> Software Engineer
>>>>>  WSO2, Inc.: http://wso2.com
>>>>> lean. enterprise. middleware
>>>>>
>>>>> web: http://udaraliyanage.wordpress.com
>>>>> phone: +94 71 443 6897
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Reka Thirunavukkarasu
>> Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>
>
>
> --
> Reka Thirunavukkarasu
> Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>

Mime
View raw message