myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: [OT but still JSF]: Clustering, session replication, and database, too
Date Sun, 20 Oct 2013 12:26:04 GMT
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 usually more than it takes to render your
JSF pages. If you have performance issues then rather scale-out by adding another node and
have a haproxy or any other load balancer with sticky session in front of it. 

LieGrue,
strub




----- Original Message -----
> From: "Howard W. Smith, Jr." <smithh032772@gmail.com>
> To: MyFaces Discussion <users@myfaces.apache.org>
> Cc: 
> Sent: Sunday, 20 October 2013, 13:07
> Subject: Re: [OT but still JSF]: Clustering, session replication, and database, too
> 
> interesting response, Jose', thanks!
> 
> for some time, I thought that it might be best to have separate server
> (tomee + @EJB/DTO's + tomcat's jdbc + database) which is/becomes the
> database tier. I guess I need to learn how to do/make remote calls to EJB
> server from JSF web layer like you are doing.
> 
> i wonder if this is the typical/common/most-recommended-and-preferred
> solution.
> 
> hmmm, avoid database replication.
> 
> i have even seen tomcat committer (mark thomas slideshow/document on
> people.apache.org) mention that clustering your app should be avoided, if
> possible (or only used, if necessary). :)
> 
> 
> 
> 
> On Sun, Oct 20, 2013 at 1:30 AM, José Luis Cetina 
> <maxtorzito@gmail.com>wrote:
> 
>>  I have a early experience with a "mini cluster" 2 servers using 
> tomee +
>>  memcached for session replication+ sticky session but using 1 only server
>>  for database (i mean i dont use db replication). My jsf apps (ear) are
>>  running in this mini cluster everithyng works fine except when i shutdown
>>  tomee for do a re deploy i always see an xhtml parser error. I could never
>>  configure it session replication with tomcat.
>> 
>>  In your web apps just use distributable tag in web.xml and all other are
>>  configuration. You can use memcached to not only session replication even
>>  thougth for savr information of your app and with this you can share
>>  information between your nodes and with this you dont persist information
>>  that could be "transient".
>>  The result is incredible.
>> 
>>  As i sayed i could never configure session replication with tomcat,  the
>>  only way i could do it is using memcached session replication.
>> 
>>  I dont know if anybody here have any experience with this.
>> 
>>  Regards Howard.
>>   El 19/10/2013 22:49, "Howard W. Smith, Jr." 
> <smithh032772@gmail.com>
>>  escribió:
>> 
>>  > I had a question or two, since I have been reading "Java Summit -
>>  Pitfalls
>>  > in EE"[1] provided by Mark Struberg while having a discussion on 
> tomee
>>  user
>>  > list.
>>  >
>>  > The following page stated the following:
>>  >
>>  > Page 134
>>  > Clustering
>>  >
>>  > * We use 'asymmetric clustering'
>>  > * use sticky sessions
>>  > * backup away the session to a memcached after each
>>  > request
>>  > * do not replicate the session over to other nodes!
>>  > * Session-Replication always in node pairs.
>>  > * only restore the session from the memcached if a failover
>>  > happened
>>  > * msm can be integrated into OWB:
>>  > http://code.google.com/p/memcached-session-manager/
>>  >
>>  > Since it says, 'We use asymmetric clustering' and other 
> suggestions were
>>  > made, I found it appropriate to direct my question(s) to MyFaces 
> 'JSF'
>>  user
>>  > list and committers.
>>  >
>>  > is there some type of blog (or two or three) available that discuss 
> how
>>  to
>>  > properly cluster a tomcat/tomee/openwebbeans/myfaces JSF web app? 
> also,
>>  how
>>  > is the database replicated? I don't ever see database 
> cluster/replication
>>  > discussed by JSF developers; i recently had to search for database
>>  cluster
>>  > and saw 'replication', which is something i have not had to 
> worry about
>>  > since my previous work involved database teams while i was doing
>>  > front-end/GUI software.
>>  >
>>  > now that i am doing java ee and jsf, i would love to know how to do
>>  > database clustering and/or replicating database while clustering JSF
>>  > webapp. Of course, right now, i only have one  tomee which references
>>  > 'apache' derby (which is performing well, but I would love to 
> get my feet
>>  > wet and cluster my web app + database). i did search derby's mail 
> list
>>  > archives and i learned about sequioa and HA-JDBC (High-Availability
>>  JDBC).
>>  >
>>  > i was hoping to get an answer from MyFaces 'JSF' 
> users/committers...based
>>  > on their experience. I think someone told me that they use mysql
>>  > (clustering); my preference is still 'apache' derby (smile). 
> please
>>  > remember, i'm wondering if any blogs are available that discuss
>>  clustering
>>  > tomcat (preference = tomee) + JSF web app (with database) + memcached
>>  > session manager.
>>  >
>>  > Thomas has already started writing a blog[2] about this. I'm 
> looking
>>  > forward to seeing sample config for it all (if available). :)
>>  >
>>  > [1]
>>  >
>>  >
>> 
> http://people.apache.org/~struberg/eesummit2013/Java%20EE%20Summit%20-%20pitfalls%20in%20EE.pdf
>>  >
>>  > [2]
>>  >
>>  >
>> 
> http://tandraschko.blogspot.com/2013/09/session-replication-clustering-failover.html
>>  >
>> 
> 

Mime
View raw message