Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Heavy use of HTTPSession

 
Suresh patel
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just changed my project and the new project I am going to work has huge huge usage of HTTPSession .
Can some body tell me how can I replace it ..
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Replace what?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rushit patel:
I just changed my project and the new project I am going to work has huge huge usage of HTTPSession .
Can some body tell me how can I replace it ..


Is this your plan . You are going to heavily use HTTPSession and replacing it(HTTPSession) with something else would improve performance. I do not think so.

HTTPSession are ready to use stuff to store user specific data , but yes , try to avoid putting unnecessary objects into it.Better to keep it small and as soon as work of an object is over , remove it.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From some loudmouth on the web ...

Web applications often have to hold some information about the user for the time the user is browsing the site, say a shopping cart with several items in it. Designers have many choices about where to put such data. Here are a few:

1. In Java or COM objects in memory
2. In server "session" storage
3. In a cookie
4. In hidden fields on the HTML page
5. In an XML data island on the page
6. Encoded on the URL
7. In temporary session storage on a database
8. On the real database of record

Give you any ideas?

I worked one vendor framework that put too much on the session and caused memory problems. Some of it was really dumb; copies of very large objects that were never really used again, but we had a difficult time pruning others off. Once it was small enough, we turned on the WebSphere option to store sessions in the database to support clustering.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you've already come to the conclusion that the heavy use of session binding is a bad thing. Have you done any testing to prove this?
Is this really a bottleneck to performance or are you just assuming that the heavy use of the session object is bad?

In certain types of apps, proper use of the session object can greatly improve efficiency by cutting down on redundant object creation, disk I/O, and/or database access.
[ September 13, 2007: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic