EJB Java Servlet’s and PHP

Trying to find performance tips on JForum led me to a very good resource on performance.
The Rubis at ObjectWeb is one of the most robust comparisons ever done on the PHP/Java performance.
Since both of those are probably the more common Web Open source Initiatives development languages this is almost gold.
The comparison was made with the development of a web application resembling eBay type auction site.
The project members developed their own web stress tool wich seams to be a good choice if you want to run it on your application (its free and almost as robust as OpenSTA)
The result of the tests they have carried is placed in a very detailed manner in a pdf document.
The main shocking result is this:

Under all circumstances, EJB is
Considerably slower than PHP and Java servlets, even when an extra machine is dedicated as an
EJB server.

I was led to belive otherwise that the overhead of network communication is the problem of the servlets and that there is something wrong in writing the code in the design (like in PHP).
There has been some more information regarding the session and state of the EJB that may affect the tests. since the EJB can be state full or stateless the comparison of the two make it clear that the use of stateless is more robust at higher loads.
Also if you look at the benchmark of calling/not calling the Remove from the servlet to the EJB has some great significance.
so the bottom line I think is clear. USE EJB since it is a better software standard for maintenance.
Don’t! use it when it is not needed.
And call Remove.

Speak Your Mind

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.