|
| Performance and Scalability |
|
|
|
Scalability
AjaxSwing is as scalable as your application and the server you are
running it on and as fast as your Swing application.
It adds a thin layer that replaces the Java graphical environment
and emulates the events. In many aspects it can make your application run
faster because no drawing, buffering and output to the screen occurs in the
emulated mode. There are less events to process and less memory needs to be
allocated and garbage collected. Using AjaxSwing dynamic clustering you can combine
several virtual clients into the same JVM and specify when to launch more JVMs as the
load increases. This model gives a significant
performance improvement to each client because shared resources are already loaded
and initialized in the JVM. You can specify how many virtual uers should
emulated by each JVM, and if there are more users connecting then a JVM can handle,
AjaxSwing will launch a new one. JVMs are pooled and are "warmed up" in the background
to ensure that a new user session is handled instanteneously. For example, if your client
code is fairly thin, you may choose to have up to 100 virtual clients in a JVM. In this case,
if your server needs to handle 1000 concurrent users AjaxSwing will use 10 JVM processes. Typically,
one running JVM takes 20-100M so the total amount of memory needed to support this traffic would
be 200-1000M.
In general, you probably should
expect higher resource consumption and slower response time then a pure servlet
solution, but lower resource consumption then the Swing application running standalone.
Check out this Performance Metrics
to see specific performance data and the difference in memory consumption
and response time between a regular GUI app, simple servlet and AjaxSwing emulation.
Note that the Excel table shows data for one JVM.
AjaxSwing applications has been load tested for thousands of concurrent users
and the response time has always been comparable to the execution of the native Swing application.
Improving Performance
Performance of AjaxSwing applications is subject to the same constraints as any other web application using
HTMl, CSS, JavaScript and XmlHttpRequest. Some tips for better performance are listed below
|
|
|
|
|
|