RE: Why can't we store big objects in session?
My opinion is in most cases you can with proper testing and profiling ; depends on how big is big. A large memory isn't necessarily a problem in itself. I would be concerned about going over the network frequently to fetch "small" amounts of data. -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 5:39 AM To: Tomcat Users List Subject: RE: Why can't we store big objects in session? You can, but in the most cases you shouldn't. It is not recommended because you may consume much memory this way. Per default a session times out after 30 minutes of in activity. If the everage session lasts 35 minutes and you get 2 new sessions per Minute you have already 70 concurrent sessions. The faster you get new sessions and the longer the sessions will last, the more memory you need. > -Original Message- > From: Chris Wahl [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 31, 2003 10:59 AM > To: Tomcat Users List > Subject: Why can't we store big objects in session? > > > I 'd like to ask a question about session. > It is "Why can't we store big objects in session?" > > What I wonder is that sessions reside in Server side and > are not transfered back and force between Client and Server. > I think they do not cost network band. > > So why we can't use it to store some objects? > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why can't we store big objects in session?
You can, but in the most cases you shouldn't. It is not recommended because you may consume much memory this way. Per default a session times out after 30 minutes of in activity. If the everage session lasts 35 minutes and you get 2 new sessions per Minute you have already 70 concurrent sessions. The faster you get new sessions and the longer the sessions will last, the more memory you need. > -Original Message- > From: Chris Wahl [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 31, 2003 10:59 AM > To: Tomcat Users List > Subject: Why can't we store big objects in session? > > > I 'd like to ask a question about session. > It is "Why can't we store big objects in session?" > > What I wonder is that sessions reside in Server side and > are not transfered back and force between Client and Server. > I think they do not cost network band. > > So why we can't use it to store some objects? > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why can't we store big objects in session?
There is nothing stopping you from storing large objects in session but it isn't advisable. It's true that there's no bandwidth penalty but storing large objects in session can quickly tie up a lot of memory on your server. If you store a 1 meg object in every user's session and you get 1000 hits within a half an hour. It's not hard to do the math. Take a look at how your app is used. If you are planning on getting a small amount of traffic from a small amount of users (IE: an intranet app) than storing objects in session can make your life very easy. If on the other hand you are writing a high traffic, internet app that needs to scale you will want to keep session scoped objects to a minimum. On Wednesday 31 December 2003 04:58 am, you wrote: > Howdy , > > I 'd like to ask a question about session. > It is "Why can't we store big objects in session?" > > What I wonder is that sessions reside in Server side and > are not transfered back and force between Client and Server. > I think they do not cost network band. > > So why we can't use it to store some objects? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]