aspose file tools*
The moose likes Tomcat and the fly likes [Ask] How much space for session in tomcat server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "[Ask] How much space for session in tomcat server?" Watch "[Ask] How much space for session in tomcat server?" New topic
Author

[Ask] How much space for session in tomcat server?

Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hi friends...

i want to develop an application..
its application is like a ecommerce application...
for the shopping cart which use List<Object[]>, i decide to save it in session...
so user can insert, update and delete the shopping cart...
is it a good choice?..

or i have to save shopping cart current users in database?..
which one is good choice for keep the performance tomcat server?..

AFAIK i think if it many current user, or if it many user which have the "big" shopping cart,
is it can decrease performance of tomcat server?..

Thank's before


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

I can't imagine that any one user can put enough in a shopping cart to cause an issue. So how many simultaneous users are you expecting? 10? 100? One million?

I'd also base the decision on whether I wanted the contents of the cart to persist across multiple browsers or sessions.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Maybe assume the current user its arround one hundred..

and now how we manage all shopping cart it?..
example..
assume each current user is buying 60 items..
and i want to save it in List<Object[]>, array of object with dimension 60x7..

how to manage it?..
i want to save them in Session.. is it possible?..
cause i want to decrease hit to database..

Thank's
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18669
    
    8

Of course you can save that data in the session. It's a trivially small amount of data. Is there a reason why you want to reduce the number of database accesses?
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

AFAIK I think i must to reduce the number of database access because i think it can decrease the performance's tomcat server..

which one is more better for keep the server's performance?..
should i save that data in the session or i save that data to database?..

Thank's
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

You think it will decrease performance? You might want to look up the concept of premature optimization.

The numbers we are talking about here are trivial and you shouldn't really need to worry much about performance. Rather, design for clarity and the functionality you require.
 
 
subject: [Ask] How much space for session in tomcat server?