IntelliJ Java IDE
The moose likes Web Services and the fly likes using huge static data in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "using huge static data in JSP" Watch "using huge static data in JSP" New topic
Author

using huge static data in JSP

arin paul
Greenhorn

Joined: Sep 07, 2005
Posts: 9
Hi There,
I am facing the following problem, I have to share huge data around 1.5 MB across JPS. It is fetched from DAO (SOAP service) and stored in
HashMap as name value pairs. Note that this data will be refreshed every two day so it is sought of static and dyanmic as well.

I am thinking
Option 1: I would make the HashMap a bean and store it in ApplicationContext.

Option 2: Code a Server Socket and serve the value given the key that way the Server space is light weight and the data is avaiable to the nodes in the clustered.


Please give me your valuable thoughts.

-Arin Paul
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 11862
I think you are on the right track with option 1. Who cares if every machine in the cluster has a copy, memory is cheap.
If I understand what you mean in option 2, I think you would find that opening a socket can be surprisingly time consuming.
Bill
 
 
subject: using huge static data in JSP
 
Threads others viewed
Advantages of Reducing Database Hits
MapMessage vs HashMap in setObjectMessage
sharing huge data across JSPs
Drop Down List Poputaion in JSF
display date(formatted with select boxes) from oracle DB in jsf
developer file tools