Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FB03101D7 for ; Sun, 20 Oct 2013 12:26:36 +0000 (UTC) Received: (qmail 8944 invoked by uid 500); 20 Oct 2013 12:26:35 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 8878 invoked by uid 500); 20 Oct 2013 12:26:34 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 8866 invoked by uid 99); 20 Oct 2013 12:26:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Oct 2013 12:26:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [77.238.189.58] (HELO nm1.bullet.mail.ird.yahoo.com) (77.238.189.58) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 20 Oct 2013 12:26:25 +0000 Received: from [77.238.189.48] by nm1.bullet.mail.ird.yahoo.com with NNFMP; 20 Oct 2013 12:26:04 -0000 Received: from [212.82.108.251] by tm1.bullet.mail.ird.yahoo.com with NNFMP; 20 Oct 2013 12:26:04 -0000 Received: from [127.0.0.1] by omp1016.mail.ird.yahoo.com with NNFMP; 20 Oct 2013 12:26:04 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 408155.40150.bm@omp1016.mail.ird.yahoo.com Received: (qmail 31489 invoked by uid 60001); 20 Oct 2013 12:26:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1382271964; bh=voVVqpU5g+FE9w/SZmgzEOWUPhWl+PV4JWDwyK/IsC0=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=aEVqlTGPx8YteFw9HnC3qD9CvpVmpdOD4sYIOuwvv/hXwXA/p6p+08SXYokyOcXYAEUhstPEY4huSy9YyvBk32sHWjZ+jjTS6doRVyNvOUhq5fjaY5YDmdImCHO63jpfgSFpzfcMNOLR6PbfweUup6bRSIvb6pk49zzALivtCs0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nc8LqWy50dVNhvFazxmHBOwlmfOOoo2JojheoCVJBXwwt0QOv7TVGUq0q3D8Q+mNi5B2KpZAp4yFpdaBMJPCGAPeT/NLo5gVOAhCK27M98MYHAUNdahtnNSG6uwRFvR+vip+tQd2TkjsIiXd/a7isGrNN7lMnbXON97N0LLBNs8=; X-YMail-OSG: Tr26rDoVM1lxEDGGhinGu4uHB.flMSYI29m45.9hhTXapyT cwPXtNREOqRNlJNhxWLYqUIojacTF6pxqXo.lq_8frbf3GH2T3gA.i65pkfm IRij73HEM_fHxWNoRtaJfXlczMlX0g6VcyHGgZg9AApnholsbnMbfJ7yJwTZ 0aZ2hL100euu2qZ0I6cUXAsnjDz.ie77D7LZpYE6BGFdoagdMAyMtUMsJpkz xs9_N02dEP3hloyjv9oBoRk2T7aIFbrrzqXXvhlc2OPq_QiH70mkQoowSMn1 rOvsA5tYeid3VqBxCp5nB99DG.r5481OTbhfekfgthRjTPHEsjiYp1BAVUF5 rdIvD9jS9uombdf8EBZyE9rkc0xXyKyF5Tl7CAxuX5sTZ_jPNdId60Kw3I0P e2.DMkbsO6jYNY0E7oiBZK0.S0tPgDf3WjYtbGUPVI0SDqOEFRGXUToH46KW BFbTpI.EFKaL.DdfVw0Ym1_2DJpShqn2IeC80C53HudBUHZoyfEm_hfpX82u Cd_QwYUce9VsDlFD0oqUPZ0CnCiakMx_7FywDIZb04LTIs5ZNxWqRiiIET1p hXrILE3oBDrw0lTV2f_xyIW93toGOQ_NMVErT200hj_jl8_unTssf9kcwZWF 8ewbAPTX1..uugjbChzUOmrrxH5iFZx3hjSeXUJGF2KIcQ1h2sckyuiPjm29 Xe5sIdElKQcretSYQTeuDj9MGaQnYAg5IVRpuPfF75aFCdqB_uQ86A0V8.xE t6quJPiCTv0kjd7wdSZNdAadxK8qxfGDrjEWE6eJyhGNJ04v1nz8cpKMA4BZ 03iTHMtO2UFRjVVk9aYHc6_explxEkVeNqplG6Vs4Q2T6Mh4OlnJBY917sef ut1pnedQScH_azw-- Received: from [84.113.120.125] by web28901.mail.ir2.yahoo.com via HTTP; Sun, 20 Oct 2013 13:26:04 BST X-Rocket-MIMEInfo: 002.001,VHJ5IHRvIGF2b2lkIGFueSByZW1vdGluZy4gUmVnYXJkbGVzcyB3aGV0aGVyIHJlbW90ZSBFSkIgb3IgZXZlbiB3b3JzZSBTT0FQLiBUaGUgcG93ZXIgaXQgdGFrZXMgdG8gdHJhbnNmZXIgYWxsIHlvdXIgc3RhdGUgdG8gYSBkaWZmZXJlbnQgbm9kZSBpcyB1c3VhbGx5IG1vcmUgdGhhbiBpdCB0YWtlcyB0byByZW5kZXIgeW91ciBKU0YgcGFnZXMuIElmIHlvdSBoYXZlIHBlcmZvcm1hbmNlIGlzc3VlcyB0aGVuIHJhdGhlciBzY2FsZS1vdXQgYnkgYWRkaW5nIGFub3RoZXIgbm9kZSBhbmQgaGF2ZSBhIGhhcHIBMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: Message-ID: <1382271964.21407.YahooMailNeo@web28901.mail.ir2.yahoo.com> Date: Sun, 20 Oct 2013 13:26:04 +0100 (BST) From: Mark Struberg Reply-To: Mark Struberg Subject: Re: [OT but still JSF]: Clustering, session replication, and database, too To: MyFaces Discussion In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Try to avoid any remoting. Regardless whether remote EJB or even worse SOAP= . The power it takes to transfer all your state to a different node is usua= lly more than it takes to render your JSF pages. If you have performance is= sues then rather scale-out by adding another node and have a haproxy or any= other load balancer with sticky session in front of it. =0A=0ALieGrue,=0As= trub=0A=0A=0A=0A=0A----- Original Message -----=0A> From: "Howard W. Smith,= Jr." =0A> To: MyFaces Discussion =0A> Cc: =0A> Sent: Sunday, 20 October 2013, 13:07=0A> Subject: Re= : [OT but still JSF]: Clustering, session replication, and database, too=0A= > =0A> interesting response, Jose', thanks!=0A> =0A> for some time, I thoug= ht that it might be best to have separate server=0A> (tomee + @EJB/DTO's + = tomcat's jdbc + database) which is/becomes the=0A> database tier. I guess I= need to learn how to do/make remote calls to EJB=0A> server from JSF web l= ayer like you are doing.=0A> =0A> i wonder if this is the typical/common/mo= st-recommended-and-preferred=0A> solution.=0A> =0A> hmmm, avoid database re= plication.=0A> =0A> i have even seen tomcat committer (mark thomas slidesho= w/document on=0A> people.apache.org) mention that clustering your app shoul= d be avoided, if=0A> possible (or only used, if necessary). :)=0A> =0A> =0A= > =0A> =0A> On Sun, Oct 20, 2013 at 1:30 AM, Jos=E9 Luis Cetina =0A> wrote:=0A> =0A>> I have a early experience with a "mini cl= uster" 2 servers using =0A> tomee +=0A>> memcached for session replication= + sticky session but using 1 only server=0A>> for database (i mean i dont = use db replication). My jsf apps (ear) are=0A>> running in this mini clust= er everithyng works fine except when i shutdown=0A>> tomee for do a re dep= loy i always see an xhtml parser error. I could never=0A>> configure it se= ssion replication with tomcat.=0A>> =0A>> In your web apps just use distri= butable tag in web.xml and all other are=0A>> configuration. You can use m= emcached to not only session replication even=0A>> thougth for savr inform= ation of your app and with this you can share=0A>> information between you= r nodes and with this you dont persist information=0A>> that could be "tra= nsient".=0A>> The result is incredible.=0A>> =0A>> As i sayed i could nev= er configure session replication with tomcat,=A0 the=0A>> only way i could= do it is using memcached session replication.=0A>> =0A>> I dont know if a= nybody here have any experience with this.=0A>> =0A>> Regards Howard.=0A>>= =A0 El 19/10/2013 22:49, "Howard W. Smith, Jr." =0A> =0A>> escribi=F3:=0A>> =0A>> > I had a question or two, since I have b= een reading "Java Summit -=0A>> Pitfalls=0A>> > in EE"[1] provided by Mar= k Struberg while having a discussion on =0A> tomee=0A>> user=0A>> > list.= =0A>> >=0A>> > The following page stated the following:=0A>> >=0A>> > P= age 134=0A>> > Clustering=0A>> >=0A>> > * We use 'asymmetric clustering'= =0A>> > * use sticky sessions=0A>> > * backup away the session to a memca= ched after each=0A>> > request=0A>> > * do not replicate the session over= to other nodes!=0A>> > * Session-Replication always in node pairs.=0A>> = > * only restore the session from the memcached if a failover=0A>> > happe= ned=0A>> > * msm can be integrated into OWB:=0A>> > http://code.google.co= m/p/memcached-session-manager/=0A>> >=0A>> > Since it says, 'We use asymm= etric clustering' and other =0A> suggestions were=0A>> > made, I found it = appropriate to direct my question(s) to MyFaces =0A> 'JSF'=0A>> user=0A>> = > list and committers.=0A>> >=0A>> > is there some type of blog (or two = or three) available that discuss =0A> how=0A>> to=0A>> > properly cluster= a tomcat/tomee/openwebbeans/myfaces JSF web app? =0A> also,=0A>> how=0A>>= > is the database replicated? I don't ever see database =0A> cluster/repl= ication=0A>> > discussed by JSF developers; i recently had to search for d= atabase=0A>> cluster=0A>> > and saw 'replication', which is something i h= ave not had to =0A> worry about=0A>> > since my previous work involved dat= abase teams while i was doing=0A>> > front-end/GUI software.=0A>> >=0A>> = > now that i am doing java ee and jsf, i would love to know how to do=0A>>= > database clustering and/or replicating database while clustering JSF=0A= >> > webapp. Of course, right now, i only have one=A0 tomee which referenc= es=0A>> > 'apache' derby (which is performing well, but I would love to = =0A> get my feet=0A>> > wet and cluster my web app + database). i did sear= ch derby's mail =0A> list=0A>> > archives and i learned about sequioa and = HA-JDBC (High-Availability=0A>> JDBC).=0A>> >=0A>> > i was hoping to get= an answer from MyFaces 'JSF' =0A> users/committers...based=0A>> > on thei= r experience. I think someone told me that they use mysql=0A>> > (clusteri= ng); my preference is still 'apache' derby (smile). =0A> please=0A>> > rem= ember, i'm wondering if any blogs are available that discuss=0A>> clusteri= ng=0A>> > tomcat (preference =3D tomee) + JSF web app (with database) + me= mcached=0A>> > session manager.=0A>> >=0A>> > Thomas has already started= writing a blog[2] about this. I'm =0A> looking=0A>> > forward to seeing s= ample config for it all (if available). :)=0A>> >=0A>> > [1]=0A>> >=0A>>= >=0A>> =0A> http://people.apache.org/~struberg/eesummit2013/Java%20EE%20S= ummit%20-%20pitfalls%20in%20EE.pdf=0A>> >=0A>> > [2]=0A>> >=0A>> >=0A>>= =0A> http://tandraschko.blogspot.com/2013/09/session-replication-clusterin= g-failover.html=0A>> >=0A>> =0A>