• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is session devil in clustering environment

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is suggested in the office that session should be absolutely forbid in clustering environment. The reason is synchronization among nodes cause overhead and problem. Any argument to support this opinion?

I personally disagree. Session is for stateless server to remember who the caller is. If you need to implement a stateful application, you have to "save" the user info somewhere, either on server, or client side and pass to server every time. Yes, session migration among nodes does introduce overhead, but it doesn't get rid of this issue w/out session: how about the cost to pass user identity and authenticate/authorize user for every request? If carefully designed, we can try to reduce the footprint of the session object so that the migration session won't be too expensive. In our FLEX application, our front end team pretty much cache everything on client side (is that good?) so that only the authentication token will be saved in session.

In addition, the session migration issue has been there for a while and I believe most of the application server should have a optimized way to deal w/ it.

I may overlook some important points to discourage session. Any suggestion?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will,
Big sessions are a problem. In your case of it being a single string, I think it is fine. The alternative (checking logon is valid every time something happens) doesn't sound better to me.
 
Will Lee
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Jeanne very much for the reply. It's very helpful for my design. I think I'm going to use session.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic