In my web application, the architechture is:
JSP(view) ->servlet-> Business Class (to implement the business logic which in turns call DB to get the data).
Same way reply back to a new JSP to show the result.
Now, we have to show result in table in some JSP with 100 records at a time and there are 2 buttons next and back. So when user click on the next it will show next 100 records on the page. There are huge records in the DB. So what we plan is to fetch 1000 records from DB at a time and keep it in List object in Business class and send 100 records from this list to JSP to show. Then when next request come to show next 100 records for same user same session it will give next 100 records from the list and so on.
My question is how to maintain this list through out the session in back end. Now as this list is huge so we can not put it in session object to make client side heavy.
Thanks for looking into it.
To answer your question:
1. First there is a search page, where user will select the criteria. Based on this criteria data will be selected from database.
This is an internal application of a company, where the manager can log into the system and search for some employees. Search criteria are:Name, Role, Skill Set etc. Now if user select Skill Set as search criteria it may select multiple employee and result can be more than 100.
The access will be given to all managers and in fully running condition at a time more than 5000-10000 user can use this.
So from the user's point of view there's a "huge" list and they can scroll through it 100 rows at a time?
Hopefully "huge" isn't going to be much bigger than 1000, otherwise the unfortunate user is going to have to click "Next" far too many times. Personally I would just display the 1000 rows to the user and let them use the browser's search function to find what they want.
Or if "huge" is a lot bigger than 1000, then you haven't designed the system right. Giving the user an enormous data dump and making them go through it is just user-hostile. Ask the user what they want and do the searching on the server before you return a non-huge list of results for them.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Now lets consider the question you did not answer:
What is the comparison between the amount of time a user would stare at a page of 100 records and the time required to retrieve the next or previous 100?
How long does it take to do a typical query on your system?
Personally, I would not mind if, after spending a minute or so scanning 100 records, it took 5 seconds to recover the next 100.
Also, consider this - if there are really that many potential users, suppose user A modifies a record but user B still browses in your cached 1000 records.