• 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

Session management

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

After reading through this forum, I see some members use HttpSession, some others use SFSB, some use back end database...

Me, I propose to store session information in clients tier.
- AJAX for web, hoping all browser support AJAX.
- some kind of static JavaSession in swing

Do you think it's OK? And do I have to support non-AJAX browser.

Thanks in advance
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does AJAX have to do with session state? AJAX simply allows you to make calls to the server without requiring a full page refresh in the browser.
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, this is a scea regarding question? Otherwise, try to look for this answers at others forums. Considering that it is about scea assignment:

What are your motivations to store session at the client tier? This is absurd at jee applications because client tier does not scale at many redundant servers, and potentially you could loose your session at a application client trash. Keep session at the web or ejb tier remains clear because you could threat aspects of concurrency and transactions data of sessions.

"hoping all browser support AJAX"

This is not a valid architecture consideration. Architecture means create solid based applications using proof of concepts, robust analysis and design methods and mitigation of technical risks. Architecture are used at the elaboration phase to ensure that construction are going to be made without potential risks of failure, so 'hope' that the browser supports Ajax is not a good approach. For the scea assignment, this is the first thing that the corrector will see at your design and potentially reprove you.

Revise your non-functional requirements and verify valid considerations to use session data at the client tier. Just to keep the things clear. Ajax does not need to be used to maintain client state. At JSF programming model, we call this 'save-state' attribute, this is the same at ASP.NET programming model. Is just about a hidden field that store the serializable version of the page. This is a valid approach, but for transactional and concurrency features, this should be evicted.

Regards,

Originally posted by Pham Huy Anh:
Hello,

After reading through this forum, I see some members use HttpSession, some others use SFSB, some use back end database...

Me, I propose to store session information in clients tier.
- AJAX for web, hoping all browser support AJAX.
- some kind of static JavaSession in swing

Do you think it's OK? And do I have to support non-AJAX browser.

Thanks in advance

 
Pham Huy Anh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marc Peabody and Ricardo Ferreira for anwsers.

I think I was explaining not very well. I did mean I don't use session management at server side, in my solution session's data is stored at clients side and will be submitted one time, HttpSession is just to keep connect between client and server, just customer id for example. I will explain in more details.

1. Normally, to complete a shopping card, user must pass many step: search, browse, view , select.... A lot of screen. All the informations during this session are usually store in server session: HttpSession, SFSB.

2. In my solution: using Ajax to store all the shopping card at client side. When check out, the browser send the whole ShopCart to server. So I don't need a big HttpSession (600 concurrent big session).

Do you think it's better for performance?

3. Nowadays, I think AJAX is the good trend which is supported by both Java and .Net. I see some sample web 2.0 app use AJAX. That's very good.


Yes, you are right, I should find a solution for non-AJAX browser. I will think again...
 
I child proofed my house but they still get in. Distract them with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic