• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are all the Common Servlet Programming practises for Clustered Environment?

 
Antany Vasanth
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have an requirement of developing the web application using Servlet & JSP for clustered environment.

What are all the common practises to be followed inorder to achieve the above?

Thanks in advance,
Antany
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no need to perform any special coding as such but things that do come in mind

1. Ensure that Singletons replicated across the clusters will not impact your environment

2. If you have classes to be bound to session / application scope ensure that their contents are serializable in case the server wants to port them.

 
Antany Vasanth
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Bala.

Can you please explain me how the singleton gonna affect the clustered environment.

As per my understanding for example If 3 machines participate in clustering then 3 instance of Singleton object will be created. How this gonna affect the environment. Please explain

Thanks,
Antany
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets say you wrote a singleton to handle DB connection pooling and your database can handle only 20 connections. With 3 nodes on a cluster and 3 singletons you will effectively be allowing 60 connections to the DB instead of 20. An example that might not be pragmatic (since most app servers will provide this feature) but an example never the less
 
Antany Vasanth
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bala..

Regards,
Antany
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic