• Post Reply Bookmark Topic Watch Topic
  • New Topic

sharing huge data across JSPs  RSS feed

 
arin paul
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 env.


Please give me your valuable thoughts.

-Arin Paul
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66149
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you already have this huge map in memory, storing a reference to it in the application context will cost you nothing except the reference itself.

Also, there's really no need to make a bean out of it; you can store any object type in the context.
 
arin paul
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response.

I agree with your suggestion. But the only problem I see is, how do I share it across JVMs in mutiple nodes?

I once again appreciate your valuable response.

-Paul
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66149
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a horse of a different color and beyond my realm of expertise.

When you talk of different JVMs are you talking about a clustered environment? Or merely separate servers?
 
arin paul
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry to have confused you.
It is a clustered env with multiple nodes each node is a seperate server (box) hence a seperate JVM.

[I was thinking I would serialize the map to central location(dir) and share it across the nodes and not use the socket approach. Not sure.]

Regards,
Paul
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!