• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session Tracking in Web application

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

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.

Any suggestion!!
Thanks in advance!!
DM
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You appear to have decided on this "optimization" without making any measurements or considering how the client will use the data.

How is a user going to approach this data?

What are they looking for in these HTML pages of 100 records?

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 many users will be interested in the same data set?

Bill
 
Debashis Mandal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

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.

Let me know if you need any further info.

Thanks,
Debashis
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Debashis Mandal wrote:Now as this list is huge so we can not put it in session object to make client side heavy.


This shows that you do not understand how sessions work. The session data is not maintained on the client.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic