dcsimg
Where can we cache database searh result and how can we cache it in Web App?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   pierre_yin
Posted On:   Friday, December 7, 2001 11:11 AM

The situation is a web user submit the search request through web page, then the back end part of this application (Servlet or EJB) will search database for result. When the user want to look the the search result, usually the result will be displayed from page to page. During this process, user need to click next button to move to next page and previous button to move back. The question is where we keep or cache the search result which we got when the user start the search request. possible solution could be: 1. Use Sun's value list handler pattern. but this is really a resource expensive way cause it will get all search result from database and translate into a value object colle   More>>

The situation is a web user submit the search request through web page, then the back end part of this application (Servlet or EJB) will search database for result.




When the user want to look the the search result, usually the result will be displayed from page to page. During this process, user need to click next button to move to next page and previous button to move back.




The question is where we keep or cache the search result which we got when the user start the search request. possible solution could be:




1. Use Sun's value list handler pattern. but this is really a resource expensive way cause it will get all search result from database and translate into a value object collection in VM. While, usually very few user will browse all result.




2.Modify a little bit of the value list handler pattern to just keep a primary key list, not the value object list, but it still seems not a sound solution.




3. It looks like Client/Server do not have this problem cause it can keep an alive JDBC connection with database, so can cache the result in a JDBC result set, but for Web app, usually we want to share connections, so the Client/Server way seems doesn't work in this situation.




Any suggestions? thanks a lot.






Pierre

   <<Less
About | Sitemap | Contact