You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Udara Liyanage <ud...@wso2.com> on 2014/10/24 07:38:17 UTC

Rename event names to easily figurable names.

Hi,

We have events with the same name different packages which are confusing to
figure out by looking at the event name.

For instance we have in ApplicationActivatedEvent in
both org.apache.stratos.messaging.event.application.status package
and org.apache.stratos.messaging.event.topology package.

Shall we rename so it is easy to figure out with the name of the event


Suggestes names:

ApplicationStatusApplicationActivatedEvent
TopologyApplicationActivatedEvent

-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Rename event names to easily figurable names.

Posted by Isuru Haththotuwa <is...@apache.org>.
+1.

On Fri, Oct 24, 2014 at 11:14 AM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> +1..This will be a better solution to avoid naming issues when using
> listeners/processors from different topics.
>
> On Fri, Oct 24, 2014 at 11:08 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> We have events with the same name different packages which are confusing
>> to figure out by looking at the event name.
>>
>> For instance we have in ApplicationActivatedEvent in
>> both org.apache.stratos.messaging.event.application.status package
>> and org.apache.stratos.messaging.event.topology package.
>>
>> Shall we rename so it is easy to figure out with the name of the event
>>
>>
>> Suggestes names:
>>
>> ApplicationStatusApplicationActivatedEvent
>> TopologyApplicationActivatedEvent
>>
> IMHO, we should keep the Topology related information as it it, and change
Application Status related ones only.

>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
> --
> <%2B94776442007>
> Thanks and Regards,
>
> Isuru H.
> <%2B94776442007>
> +94 716 358 048 <%2B94776442007>* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Rename event names to easily figurable names.

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
+1..This will be a better solution to avoid naming issues when using
listeners/processors from different topics.

On Fri, Oct 24, 2014 at 11:08 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> We have events with the same name different packages which are confusing
> to figure out by looking at the event name.
>
> For instance we have in ApplicationActivatedEvent in
> both org.apache.stratos.messaging.event.application.status package
> and org.apache.stratos.messaging.event.topology package.
>
> Shall we rename so it is easy to figure out with the name of the event
>
>
> Suggestes names:
>
> ApplicationStatusApplicationActivatedEvent
> TopologyApplicationActivatedEvent
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Rename event names to easily figurable names.

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi Imesh,

We had to have a communication from Autoscaler to Topology on the status
changes of cluster, group and application which can be decided only by
autoscaler as it maintains the dependency information. Once autoscaler
decides on the status of cluster/group/application, it can't just publish
it to Topology, since CC is the only publisher to Topology. That's why
Autoscaler is sending these status changes via application status topic to
CC as Isuru mentioned. Then CC will publish those to Topology again. So
that autoscaler/anyone can take the necessary actions based on Topology
events. In that way, IMO it is more consistent.

Thanks,
Reka

On Fri, Oct 24, 2014 at 12:47 PM, Isuru Haththotuwa <is...@apache.org>
wrote:

> Hi Imesh,
>
> This situation is similar to the Instance Status events (sent by CA) and
> Member* events (sent by CC). Since CC updates the topology, we need to
> first send the application status events to the relevant topic by AS, so
> that CC can update the Topology and send the relevant Topology event.
> Therefore we have these two topics, and IMHO using the same name for these
> two types of events are confusing. We should use different conventions, as
> we do currently for Instance* and Member* events.
>
> On Fri, Oct 24, 2014 at 12:33 PM, Imesh Gunaratne <im...@apache.org>
> wrote:
>
>> What's the reason for having ApplicationActivated event in two topics?
>>
>> On Fri, Oct 24, 2014 at 11:23 AM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> On Fri, Oct 24, 2014 at 11:08 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> We have events with the same name different packages which are
>>>> confusing to figure out by looking at the event name.
>>>>
>>>> For instance we have in ApplicationActivatedEvent in
>>>> both org.apache.stratos.messaging.event.application.status package
>>>> and org.apache.stratos.messaging.event.topology package.
>>>>
>>>> Shall we rename so it is easy to figure out with the name of the event
>>>>
>>>>
>>>> Suggestes names:
>>>>
>>>> ApplicationStatusApplicationActivatedEvent
>>>> TopologyApplicationActivatedEvent
>>>>
>>>
>>> +1. May be we should follow similar naming convention for all the events
>>> of particular packages.
>>>
>>> E.g. All the application status event should be start with "
>>> ApplicationStatus..."
>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com cell: (+94) 773 325 954
>>> blog: http://lahiruwrites.blogspot.com/
>>> twitter: http://twitter.com/lahirus
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Rename event names to easily figurable names.

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi Imesh,

This situation is similar to the Instance Status events (sent by CA) and
Member* events (sent by CC). Since CC updates the topology, we need to
first send the application status events to the relevant topic by AS, so
that CC can update the Topology and send the relevant Topology event.
Therefore we have these two topics, and IMHO using the same name for these
two types of events are confusing. We should use different conventions, as
we do currently for Instance* and Member* events.

On Fri, Oct 24, 2014 at 12:33 PM, Imesh Gunaratne <im...@apache.org> wrote:

> What's the reason for having ApplicationActivated event in two topics?
>
> On Fri, Oct 24, 2014 at 11:23 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>>
>>
>> On Fri, Oct 24, 2014 at 11:08 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> We have events with the same name different packages which are confusing
>>> to figure out by looking at the event name.
>>>
>>> For instance we have in ApplicationActivatedEvent in
>>> both org.apache.stratos.messaging.event.application.status package
>>> and org.apache.stratos.messaging.event.topology package.
>>>
>>> Shall we rename so it is easy to figure out with the name of the event
>>>
>>>
>>> Suggestes names:
>>>
>>> ApplicationStatusApplicationActivatedEvent
>>> TopologyApplicationActivatedEvent
>>>
>>
>> +1. May be we should follow similar naming convention for all the events
>> of particular packages.
>>
>> E.g. All the application status event should be start with "
>> ApplicationStatus..."
>>
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com cell: (+94) 773 325 954
>> blog: http://lahiruwrites.blogspot.com/
>> twitter: http://twitter.com/lahirus
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Rename event names to easily figurable names.

Posted by Imesh Gunaratne <im...@apache.org>.
What's the reason for having ApplicationActivated event in two topics?

On Fri, Oct 24, 2014 at 11:23 AM, Lahiru Sandaruwan <la...@wso2.com>
wrote:

>
>
> On Fri, Oct 24, 2014 at 11:08 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> We have events with the same name different packages which are confusing
>> to figure out by looking at the event name.
>>
>> For instance we have in ApplicationActivatedEvent in
>> both org.apache.stratos.messaging.event.application.status package
>> and org.apache.stratos.messaging.event.topology package.
>>
>> Shall we rename so it is easy to figure out with the name of the event
>>
>>
>> Suggestes names:
>>
>> ApplicationStatusApplicationActivatedEvent
>> TopologyApplicationActivatedEvent
>>
>
> +1. May be we should follow similar naming convention for all the events
> of particular packages.
>
> E.g. All the application status event should be start with "
> ApplicationStatus..."
>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com cell: (+94) 773 325 954
> blog: http://lahiruwrites.blogspot.com/
> twitter: http://twitter.com/lahirus
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Rename event names to easily figurable names.

Posted by Imesh Gunaratne <im...@apache.org>.
Hi,

Thanks Isuru & Reka for the clarification, yes I think that's the best
approach. Will try to figure out a better naming convention for these
events.

Thanks

On Fri, Oct 24, 2014 at 1:11 PM, Chamila De Alwis <ch...@wso2.com> wrote:

>
> On Fri, Oct 24, 2014 at 11:23 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> May be we should follow similar naming convention for all the events of
>> particular packages.
>>
>> E.g. All the application status event should be start with "
>> ApplicationStatus..."
>>
>
> +1
>
> I think this is the more pragmatic approach.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Rename event names to easily figurable names.

Posted by Chamila De Alwis <ch...@wso2.com>.
On Fri, Oct 24, 2014 at 11:23 AM, Lahiru Sandaruwan <la...@wso2.com>
wrote:

> May be we should follow similar naming convention for all the events of
> particular packages.
>
> E.g. All the application status event should be start with "
> ApplicationStatus..."
>

+1

I think this is the more pragmatic approach.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Rename event names to easily figurable names.

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Fri, Oct 24, 2014 at 11:08 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> We have events with the same name different packages which are confusing
> to figure out by looking at the event name.
>
> For instance we have in ApplicationActivatedEvent in
> both org.apache.stratos.messaging.event.application.status package
> and org.apache.stratos.messaging.event.topology package.
>
> Shall we rename so it is easy to figure out with the name of the event
>
>
> Suggestes names:
>
> ApplicationStatusApplicationActivatedEvent
> TopologyApplicationActivatedEvent
>

+1. May be we should follow similar naming convention for all the events of
particular packages.

E.g. All the application status event should be start with "
ApplicationStatus..."

>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com cell: (+94) 773 325 954
blog: http://lahiruwrites.blogspot.com/
twitter: http://twitter.com/lahirus
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146