Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can Rich faces tackle peak user load of 1000 users?  RSS feed

 
Nischit Shetty
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are working on an application which will be used by my company purely for internal operations.
This application will have a peak user load of 1000 users. The screens are expected to be very intutive and should be RIA based.
I am planning to recommend Rich faces (latest version).
I have worked with Myfaces earlier and we have been able to sustain a user load of 750 users.
This is the first time that I will be working on Rich faces. Can you please let me know Rich Faces can sustain high user load of 1000 users? Has anyone tried something like this in the past?
I did some POC of my own on my desktop. When I used Rich faces rich:inplaceInput components in a datatable, the screen load was very slow. When I replace it with hutputText the screen load was fast. Well this is just my first view and may be I can make it better.

I will like to hear if I can go ahead with my recommendation.

Regards,
Nischit
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richfaces own website doesn't do much to promote it as a fast product

However, one of the things I discovered in my own efforts to tune RichFaces is that the AJAX support downloads a ton of JavaScript. If you don't have browser cache enabled that can punish the user, the server, and the network for each page load. The offence is compounded when using SSL in Tomcat, since by default, Tomcat switches caching off for ALL SSL requests - including CSS, images, and (alas) JavaScript.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm very interested in this myself, although the question is a little like "how long is a piece of string?",
in terms of application architecture (session beans?), memory, cpu etc...

But putting that aside static resource caching is a big issue and I'd want to know what expiry headers
they (RichFaces) set, is there a working versioning system in place for refreshing cached static resources
on upgrade.

My own, admittedly limited, experience of RichFaces was that it performed slowly in comparison to
PrimeFaces.

At least it sounds like you're working with a known and understood user environment.

Regards,
Brendan.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richfaces doesn't set any cache info. However, TOMCAT was overriding the normal actions for static content. This is documented behavior and they actually WANT it to work that way, based on the precept that if ANY part of a page is secure, NONE of it should be cacheable, laying around on proxy servers or in files where Bad People could potentially do mischief with it.

The system in question wasn't originally JSF at all, and the reduction in performance was notable as I converted it. So I measured where the pain was coming from, and it quickly became apparent that the hundreds of kilobytes of JavaScript that were being reloaded over and over and over again were a prime contributor. That's when I started studying the caching mechanisms.

To obtain performance, I had to override Tomcat's default caching control for SSL and add a custom servlet filter to add appropriate cache headers to the selected files while avoiding unwanted caching on dynamic content. There's also an option to make RichFaces bundle up all its generated javascript into a single cacheable stream so I enabled that as well.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim, that's interesting and I'm still trying to get my head around it. In Glassfish you can set some
default settings but to be honest this is on my todo list. What I have done is implement two filters,
one for dynamic content (don't cache), and one for static content (do cache). I see that there is
another method (other than filters) for doing this in JSF, the ResourceHandler, which again I have
a note to myself to look into.

So it sounds like you can configure RichFaces to cache stuff but it's not the out of the box default?
The versioning mechanism is so important, I would assume that RichFaces supports something like
this:

http://articles.sitepoint.com/article/save-cash-optimize-cache

I am very interested to get any feedback about how many users you can realistically expect to
support on a single server. I realise fully well that it depends on the user activity, it depends on
whether or not each form submission or ajax request results in calculating Pi to 1m decimal places,
what sort of database activity there is, etc... etc... Prior to being able to do any load testing I'd
be happy to get a feel for whether the classic department/employee application (use your imagination)
can support 100 users or 10,000. And then what's next - clustering?

Regards,
Brendan.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, Richfaces has no cache control at all that I know of. What I used was an option that sends all the javascript in one large file instead of lots of little files. The one big file contains stuff that is invariant over the session lifespan, therefore cacheable.
 
Nischit Shetty
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know it is difficult to throw a generalized opinion about how Rich faces can perform under high user load. Application performance itself depends on a host of factors - infrastucture, database, external interfaces if any... etc ... etc...

All I was trying to find out if anyone had tried using rich faces for such high user load. It doesnt matter what application or for what business purpose used for.

And thanks Tim for letting me know that Rich Faces dumps loads of Java script files. Luckily in one of my previous Myfaces projects, I used a CacheControlFilter. I think it can be reused here.

Our requirement was originally to built a RIA based application. Keep cost in mind, I thought of recommending a open source.
I might also use some of the components provided by Prime Faces.

Please keep sharing more and more information as you get.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!