Great work Akila! Please do a thorough test and make sure everything is covered before pushing this change to the current code base. If not I would like to suggest to push this to the next major release.
Thanks On Sun, Nov 8, 2015 at 10:35 PM, Akila Ravihansa Perera <raviha...@wso2.com> wrote: > Hi all, > > I took the liberty of implementing topology init optimization since that > will speed of lot of things that we're trying to do :) > > Here is my approach; > > - Introduce a new topic called "initialization" topic > - Introduce a new event called "CompleteTopologyRequestEvent" > - Create a message receiver, processor, listener for this event > - In CC component, create a message receiver object and listen to this > CompleteTopologyRequestEvent > - Once an event of this type is received, publish the CompleteTopologyEvent > > *** Update the TopologyReceiver class to publish this > CompleteTopologyRequestEvent so that once you start listening to topology > events, the underlying messaging component will initialize the topology in > an on-demand fashion. > > I've created a PR [1] for this and still doing further testing. Please go > through it and let me know your thoughts. I'm planning on writing an > integration test to verify the functionality. I ran a complete build and > all test cases are passing. > > Also Stratos startup time improved very noticeably since other components > will not wait for CC to publish the CompleteTopology but rather it will be > requested on-demand via messaging component. Once this is stable I'll move > on to updating Python agent to use it. > > [1] https://github.com/apache/stratos/pull/487 > > Thanks. > > On Thu, Sep 10, 2015 at 10:27 AM, Pubudu Gunatilaka <pubu...@wso2.com> > wrote: > >> +1 for this approach. I hope PCA plugins will be able to use this. >> >> On Thu, Sep 10, 2015 at 10:17 AM, Udara Liyanage <ud...@wso2.com> wrote: >> >>> +1 >>> >>> On Thu, Sep 10, 2015 at 10:16 AM, Reka Thirunavukkarasu <r...@wso2.com> >>> wrote: >>> >>>> +1. Great thought. It would increase the startup time of the components >>>> those who listens to CompleteTopology and PCA. >>>> >>>> Thanks, >>>> Reka >>>> >>>> On Thu, Sep 10, 2015 at 1:09 AM, Imesh Gunaratne <im...@apache.org> >>>> wrote: >>>> >>>>> Hi Devs, >>>>> >>>>> I would like to propose $subject. >>>>> >>>>> Currently we do this with a one minute interval and its causing the >>>>> cartridge agent and the servers to wait for around two minutes (in the >>>>> worst case) to start. In Docker this is a considerable amount of delay. >>>>> >>>>> I think we can implement $subject by introducing another topic (say >>>>> topology-init) and asking the clients to request Complete Topology event >>>>> via the new topic. This can be done in messaging component without >>>>> affecting the main modules (AS, CC, SM, CEP, JCA). PCA needs to be updated >>>>> accordingly. WDYT? >>>>> >>>>> Thanks >>>>> >>>>> -- >>>>> Imesh Gunaratne >>>>> >>>>> Senior Technical Lead, WSO2 >>>>> Committer & PMC Member, Apache Stratos >>>>> >>>> >>>> >>>> >>>> -- >>>> Reka Thirunavukkarasu >>>> Senior Software Engineer, >>>> WSO2, Inc.:http://wso2.com, >>>> Mobile: +94776442007 >>>> >>>> >>>> >>> >>> >>> -- >>> >>> Udara Liyanage >>> Software Engineer >>> WSO2, Inc.: http://wso2.com >>> lean. enterprise. middleware >>> >>> web: http://udaraliyanage.wordpress.com >>> phone: +94 71 443 6897 >>> >> >> >> >> -- >> >> *Pubudu Gunatilaka* >> Software Engineer >> WSO2, Inc.: http://wso2.com >> lean.enterprise.middleware >> mobile: +94 77 4078049 >> > > > > -- > Akila Ravihansa Perera > WSO2 Inc.; http://wso2.com/ > > Blog: http://ravihansa3000.blogspot.com > -- Imesh Gunaratne Senior Technical Lead, WSO2 Committer & PMC Member, Apache Stratos