+1 to remove the cluster created event from the Topology. As we have implemented in a way to listen for all the clusters to be created at once, it may add more complexity now, if we change to cluster created event.
I think that cartridge agent and others can use the ClusterInstanceCreated in order to take any necessary action for now. Thanks, Reka On Sat, Feb 7, 2015 at 6:39 PM, Imesh Gunaratne <im...@apache.org> wrote: > Hi Reka, > > Thanks for the detailed explanation! > > I understand your concern on aggregating cluster created events together > and sending one event, but I still prefer to send separate events for each > cluster, because there might be listeners who are interested on this event > to take actions (cartridge extensions, etc). > > Anyway if we are going forward with Application Clusters Created event, we > may need to remove Cluster Cretated event related classes and logic from > the codebase. > > Thanks > > On Sat, Feb 7, 2015 at 11:47 PM, Reka Thirunavukkarasu <r...@wso2.com> > wrote: > >> Hi Imesh, >> >> Since we have introduced the Composite Application model where more than >> one clusters present, we are no longer using cluster created event in order >> to avoid unnecessary complication when registering the ApplicationMonitor. >> >> Let me explain the flow little bit here, >> >> 1. Deploy application >> 2. Create all necessary clusters of those application >> 3. In the All clusters created event, application monitor getting >> registered. >> 4. ApplicationMonitor will recursively go through the children by >> comparing the Dependency behaviour and start the first set of dependencies. >> Eventually, ApplicationMonitor/GroupMonitor will start the leave node as >> the clusterMonitor. When we are starting the ClusterMonitor, if the cluster >> is not there in the Topology, then this clusterMonitor has to wait. As we >> made sure before starting the AppMonitor that all there clusters are there >> in the Autoscaler Topology, ClusterMonitor can continue to register the >> drools without any issue. This is why we had introduced >> ApplicationClustersCreatedEvent to recieve all the application clusters at >> once. >> >> I'm glad to do a hangout on the flow of the logic implemented. So that i >> can explain the whole flow and it will help us to improve the code/logic >> more robust. >> >> Thanks, >> Reka >> >> On Sat, Feb 7, 2015 at 5:10 AM, Imesh Gunaratne <im...@apache.org> wrote: >> >>> Hi Reka, >>> >>> I just noticed that we are no longer using Cluster Created event, rather >>> we have introduced a new event called Application Clusters Created and >>> aggregating all the clusters of an application in that. >>> >>> What was the reason for this? >>> >>> Thanks >>> >>> >>> -- >>> Imesh Gunaratne >>> >>> Technical Lead, WSO2 >>> Committer & PMC Member, Apache Stratos >>> >> >> >> >> -- >> Reka Thirunavukkarasu >> Senior Software Engineer, >> WSO2, Inc.:http://wso2.com, >> Mobile: +94776442007 >> >> >> > > > -- > Imesh Gunaratne > > Technical Lead, WSO2 > Committer & PMC Member, Apache Stratos > -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007