Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I do this effectively?  RSS feed

Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I obtain a huge chunk of data from a different system by executing just one transaction(plain socket) but I have to use the data across three or four pages(on the front end thru servlets/jsp) only when required by the user.
What is the best way to have this data available when required to the particular user on the website.This data is obviously different for different users that is obtained by different inputs.
One way is to put the values in the session object(that is particular to the user) but I dont want to load the session object.
I may also put them in a local database and access it as and when required but again is not a best solution since this will not be a persistant data and the db network is an overload.
I can have it in a regular java bean objects but how do I tie it to the specific user?
Is there any other way that I can acheive this in an effective way?
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the huge chunk of data is a lot of standard,
boiler plate stuff with customizations for
each user, you might store it in a context
attribute when the application starts. (Unless
it's so huge that keeping it in the context
really hurts performance.)
Then get what you need for each user as you
need it. If there is some internal structure to
the data that you can use to break it up, try
keeping discrete sub-chunks in collections.
I have used techniques like that to reduce the
number/frequency of database calls in some
systems. In one case we saw a marked performance
increase, despite keeping our huge chunk in
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
ScroogeXHTML 7.2 - RTF to HTML5 / XHTML converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!