If you use a flag, you don't need a leader to send the notification. Everyone will do it based on the flag. But, there may be situations of concurrent reads of the flag resulting in multiple updates.
Regarding the DB calls, it is somewhat true if there about 30-40 concurrent app deployments. But more than that, registry caching will be a problem because you need latest info in this scenario. On Tue, Jul 22, 2014 at 12:12 PM, Ramith Jayasinghe <[email protected]> wrote: > Hi Amila, > We also considered having a flag in the registry for the purpose, BUT it > seems heavy weight (involves lots of database call through registry etc > etc) compared to listening to topology service. > besides its difficult to figure-out/elect whose going to send > notifications next (in the cluster) when current message sending node > crashes/stopped due to scale down if we use a flag. > > regards > Ramith > > > > On Tue, Jul 22, 2014 at 12:01 PM, Amila Maha Arachchi <[email protected]> > wrote: > >> Danushka, >> >> >> On Mon, Jul 21, 2014 at 6:13 PM, Danushka Fernando <[email protected]> >> wrote: >> >>> I think Paul's point is valid. And also in that case we don't have to >>> handle the scenario that the web app is deployed in one appserver >>> successfully and didn't in second appserver. We can let users know that its >>> deployed correctly in this server and another message saying its not >>> deployed successfully in this server. But somehow we need to say the server >>> name in a abstract way like wso2 appserver 1 and wso2 appserver 2 not in >>> this IP and that IP. >>> Dimuthu / Anuruddha WDYT? >>> >> >> This is not valid. User does not and should not have any idea about how >> many AppServers are there. >> >> BTW, I was just wondering whether we can use the registry to maintain a >> flag. So, the listener can check the flag before sending the notification. >> >> >>> Thanks & Regards >>> Danushka Fernando >>> Software Engineer >>> WSO2 inc. http://wso2.com/ >>> Mobile : +94716332729 >>> >>> >>> On Mon, Jul 21, 2014 at 6:02 PM, Paul Fremantle <[email protected]> wrote: >>> >>>> Isn't it better to send all the messages and then keep track of who has >>>> successfully deployed or undeployed? In other words, don't we want all the >>>> information rather than just getting one server's info? >>>> >>>> Paul >>>> >>>> >>>> On 21 July 2014 12:58, Anuruddha Premalal <[email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> *Problem:* >>>>> >>>>> In the current appfactory setup all the application containers (AS) >>>>> notifies on application life cycle events (deployment, undeployment); this >>>>> is because the deployment event listeners directly send messages to >>>>> appfactory . This approach works well for a single node deployment . But >>>>> it >>>>> will cause unwanted noise (which will ultimately be several copies of the >>>>> same message on the notification wall) in a clustered environment, also >>>>> this will cause unwanted traffic towards appfactory. So it is important to >>>>> limit notifications from the container level. >>>>> >>>>> *Solution:* >>>>> >>>>> Requirement is to send notifications only from a single appserver node >>>>> in the cluster. >>>>> >>>>> For this we have to choose a single candidate from the cluster, and >>>>> make him as the notifier node. >>>>> >>>>> Candidate selection method: >>>>> >>>>> This can be achieved using Stratos topology information. >>>>> Topology(which is published every 60secs) have information about currently >>>>> active cluster nodes. >>>>> >>>>> Application notifiers will subscribe to this topology topic and choose >>>>> to be the notifier based on the following criteria. >>>>> >>>>> 1.) If the topology contains the IP of the node. >>>>> Note : This is important because there might be cases where IP >>>>> is not in the topology but the instance is active. >>>>> >>>>> 2.) If the IP is the highest IP in the available topology. >>>>> >>>>> >>>>> Related Jira : https://wso2.org/jira/browse/APPFAC-2271 >>>>> >>>>> >>>>> Regards, >>>>> >>>>> -- >>>>> *Anuruddha Premalal* >>>>> Software Eng. | WSO2 Inc. >>>>> Mobile : +94710461070 >>>>> Web site : www.regilandvalley.com >>>>> >>>>> "Advances of technology should not leave behind the developing world" >>>>> >>>>> _______________________________________________ >>>>> Architecture mailing list >>>>> [email protected] >>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>> >>>>> >>>> >>>> >>>> -- >>>> Paul Fremantle >>>> CTO and Co-Founder, WSO2 >>>> OASIS WS-RX TC Co-chair, Apache Member >>>> >>>> UK: +44 207 096 0336 >>>> US: +1 646 595 7614 >>>> >>>> blog: http://pzf.fremantle.org >>>> twitter.com/pzfreo >>>> [email protected] >>>> >>>> wso2.com Lean Enterprise Middleware >>>> >>>> Disclaimer: This communication may contain privileged or other >>>> confidential information and is intended exclusively for the addressee/s. >>>> If you are not the intended recipient/s, or believe that you may have >>>> received this communication in error, please reply to the sender indicating >>>> that fact and delete the copy you received and in addition, you should not >>>> print, copy, retransmit, disseminate, or otherwise use the information >>>> contained in this communication. Internet communications cannot be >>>> guaranteed to be timely, secure, error or virus-free. The sender does not >>>> accept liability for any errors or omissions. >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >> >> >> -- >> *Amila Maharachchi* >> Senior Technical Lead >> WSO2, Inc.; http://wso2.com >> >> Blog: http://maharachchi.blogspot.com >> Mobile: +94719371446 >> >> >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > Ramith Jayasinghe > Technical Lead > WSO2 Inc., http://wso2.com > lean.enterprise.middleware > > E: [email protected] > P: +94 777542851 > > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- *Amila Maharachchi* Senior Technical Lead WSO2, Inc.; http://wso2.com Blog: http://maharachchi.blogspot.com Mobile: +94719371446
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
