Hi,
I know probably this has been discussed on the forum before, i tried finding out some answers to my question but was unable to do so.
I will try explaining the problem
- We are in the process developing a portal for a client.
- This is basically a search based site with absolutely no transactions although they might be added later when the site is e-commerce enabled.
- There are no dbase updates
- There are different categories, & sub-categories & surfers can get search results based on the search criteria given by them.
- There is a generic keyword search & a category/sub-category specific search where a a surfer can get the results based on the narrowing options for the specific category/sub-category.
- The client will most probably be using IBM Websphere application server & NES web server.
- Time taken to process a client request is very important
The different options availiable to us are (to the best of my knowledge):
- Entity Beans
- Stateful & stateless Session Beans
- Servlets/JSP's
I think entity beans are out as there are no transactions & security issues. They would take up a lot of resources. I was also thinking that stateful session beans would not be a very good idea. I think it would be best to perform the search & keep the results as a session object instead of having a stateful session to service the request. Now we are left with stateless session beans & servlets.
The stateless beans will have the SQL statements. From what i have read a few stateless session bean beans can request a lot of clients. As mentioned in the Gemstone Developer's guide a pool of instances can be maintained at the client servlet so that i can save the lookup & create time .Also the database connection pooling will again help in cutting down on the processing time. Plus the other advantages of the application server. Caching of results is another option but i am not very sure if it will work in our case as there are different queries for different categories, a single cache cannot sevice the requests & there are a large number of the categories\sub-categories to write a cache specefic to each category.
The immediate downside i could think up of was the network traffic between the web server & the application server.
In case of a servlet i would directly fire a SQL get the results from the dbase & service the clients request. I bypass the app server.
The problem i see here is the load handling capabilities of the web server. The web server might not provide facilities like connection pooling.The presentation layer will be tightly coupled with the business logic. I could probably overcome this by using java objects.. But this could again slow down the system...
So as you can see i am quite confused on which would be a better approach. I feel that SSB's might be a better approach, but again i am not very sure !!! Please let me know your experiences. Which approach do you think is best suited for the requiements mentioned above.
Thanks In Advance
Rishi
