Wednesday, April 19, 2006

Power of Asynchrony

Power of asynchrony is well known and it is used widely at different layer of the application architectures to improve performance of the application. i.e. AJAX, Asynchronous I/O in application server and so forth …

In many cases server side processing which doesn't deliver response back to HTTP request can be implemented in asynchronous fashion. Not only it will improve performance of the application, it will also improve front end user experience.

JMS/MDB in J2EE container can be used to achieve this.
1) Logging event to external database.
2) Connection to external processes -It will also decouple application's availability from unresponsive external processes.

I found following good reads about this subject…
http://www.javaranch.com/newsletter/200403/AsynchronousProcessingFromServlets.html
http://www.javaworld.com/jw-02-2001/jw-0209-jms.html

Some of the asynchronous capabilities available out of the box from different implementation.

http://logging.apache.org/log4j/docs/api/org/apache/log4j/net/JMSAppender.html
http://e-docs.bea.com/wls/docs91/webapp/progservlet.html#179418 - New features in WebLogic 9.1

Despite it's advantages, I see may implementations just ignores it.
Reasons may be ….
Performance" is not priority when delivering the requirements.
Synchronous is always easy and quick to implement !!

Wednesday, April 12, 2006

WebLogic JMS Clustering

1) JMS Client Failover.

During WebLogic JMS clustering session couple of questions raised about failover capabilities of JMS producer and consumer clients.
As I said in 8.1 WebLgoic returns Exception when server becomes unavailable.
http://e-docs.bea.com/wls/docs81/jms/config.html#1055931
I just happened to the look at release note of the WebLogic 9.2 beta today, with pleasant surprise found that BEA already addressed above shortcomings with 9.2 beta (Transparent consumer client failover) and 9.1 (Transparent producer client failover) releases.

How robust the client failover is? Only time will tell!!!
http://edocs.bea.com/wls/docs92/jms/recover.html#AutomaticFailoverforJMSClients

2) JMS and WebLogic Security framework.
In addition security of the JNDI look up for JMS destination, it is also possible to protect operations of the destination.
http://e-docs.bea.com/wls/docs92/secwlres/types.html#wp1209997

Does your application need to implement security at this level? Like other J2EE security feature, it depends on your deployment and security requirements of your application.