RE: shopping cart, session variables - best practices

2005-01-03 Thread mayo
Sorry for not responding earlier. My laptop was stolen. A big mess.

I'm on a shared host so the RAM is somewhat limited. However the client is a
small clothing and jewelry business. They have two stores and this is their
first venture into on-line sales. Currently they get about 200 unique
visitors a week. I don't think they will have over 10 concurrent users of
their shopping site for quite a while.

gil






-Original Message-
From: Martin Parry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 1:26 PM
To: CF-Talk
Subject: RE: shopping cart, session variables - best practices


I think we should really find out the capabilities of Mayo's server/host
before we can truly suggest one method over another. In high traffic
eComm sites I have seen superb performance using the method described.

If, however RAM is not a problem, he isn't experiencing high volumes and
is not on another server with xxx websites who all make excessive use of
session variables, then yes - maybe he should use session variables..

Mayo - please advise.

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk

-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: 29 December 2004 18:02
To: CF-Talk
Subject: RE: shopping cart, session variables - best practices

 Use a structure for storing the basket contents by all means, however
 instead of session.basketContents, convert the structure to a WDDX
 object and store it as client.basketContents - That way you're not
using
 precious RAM but cheap disk space.

Storing application- and user-specific data is what precious RAM is for!

In an application environment with a single application server, you will
typically achieve significantly higher performance under load by storing
things in memory rather than fetching them from the database for each
page
request. You may need to provision your server's RAM adequately to
ensure
you have enough for the number of concurrent users you need to support,
but
RAM is comparatively cheap.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496




~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189159
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: shopping cart, session variables - best practices

2005-01-03 Thread Donna French
The company I work for is currently still running on CF5 and I am in
the process of building my first custom shopping cart so thought it
would be appropriate to jump into this thread.

We are using CrystalTech for shared hosting, and the new site will be
running on CFMX and SQL 2000. From what I've read on this post the
best practice for my situation would be to use session variables and a
structure for the info on each item.

Any other tips for building a first shopping cart would be greatly
appreciated. Feel free to email me off list!

TIA,
Donna


On Mon, 3 Jan 2005 12:50:33 -0500, mayo [EMAIL PROTECTED] wrote:
 Sorry for not responding earlier. My laptop was stolen. A big mess.
 
 I'm on a shared host so the RAM is somewhat limited. However the client is a
 small clothing and jewelry business. They have two stores and this is their
 first venture into on-line sales. Currently they get about 200 unique
 visitors a week. I don't think they will have over 10 concurrent users of
 their shopping site for quite a while.
 
 gil
 
 
 -Original Message-
 From: Martin Parry [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 29, 2004 1:26 PM
 To: CF-Talk
 Subject: RE: shopping cart, session variables - best practices
 
 I think we should really find out the capabilities of Mayo's server/host
 before we can truly suggest one method over another. In high traffic
 eComm sites I have seen superb performance using the method described.
 
 If, however RAM is not a problem, he isn't experiencing high volumes and
 is not on another server with xxx websites who all make excessive use of
 session variables, then yes - maybe he should use session variables..
 
 Mayo - please advise.
 
 Martin Parry
 Macromedia Certified Developer
 http://www.BeetrootStreet.co.uk
 
 -Original Message-
 From: Dave Watts [mailto:[EMAIL PROTECTED]
 Sent: 29 December 2004 18:02
 To: CF-Talk
 Subject: RE: shopping cart, session variables - best practices
 
  Use a structure for storing the basket contents by all means, however
  instead of session.basketContents, convert the structure to a WDDX
  object and store it as client.basketContents - That way you're not
 using
  precious RAM but cheap disk space.
 
 Storing application- and user-specific data is what precious RAM is for!
 
 In an application environment with a single application server, you will
 typically achieve significantly higher performance under load by storing
 things in memory rather than fetching them from the database for each
 page
 request. You may need to provision your server's RAM adequately to
 ensure
 you have enough for the number of concurrent users you need to support,
 but
 RAM is comparatively cheap.
 
 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 phone: 202-797-5496
 
 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189189
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-30 Thread Martin Parry
Just when you thought you knew everything (well, not quite) - I wasn't
aware that session no longer needed locking! Is this what you're saying
? If so, when was this introduced?

Ta

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk


-Original Message-
From: Ben Rogers [mailto:[EMAIL PROTECTED] 
Sent: 29 December 2004 23:52
To: CF-Talk
Subject: RE: shopping cart, session variables - best practices


That said, for new sites, I generally use the session scope because I
can
store complex objects such as CFCs in the session scope. Additionally,
since
the session scope is now thread safe, I don't have to worry about
whether or
not every developer is properly locking their code.


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188981
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: shopping cart, session variables - best practices

2004-12-30 Thread Cameron Childress
Yes, that is what he is saying.

Since CFMX (6.0).  You can thank Java for that.

-Cameron


On Thu, 30 Dec 2004 09:16:08 -, Martin Parry
[EMAIL PROTECTED] wrote:
 Just when you thought you knew everything (well, not quite) - I wasn't
 aware that session no longer needed locking! Is this what you're saying
 ? If so, when was this introduced?

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188983
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-30 Thread Martin Parry
Excellent 

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk


-Original Message-
From: Cameron Childress [mailto:[EMAIL PROTECTED] 
Sent: 30 December 2004 10:09
To: CF-Talk
Subject: Re: shopping cart, session variables - best practices

Yes, that is what he is saying.

Since CFMX (6.0).  You can thank Java for that.

-Cameron


On Thu, 30 Dec 2004 09:16:08 -, Martin Parry
[EMAIL PROTECTED] wrote:
 Just when you thought you knew everything (well, not quite) - I wasn't
 aware that session no longer needed locking! Is this what you're
saying
 ? If so, when was this introduced?



~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188986
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-30 Thread Dennis Powers
 operate in a cluster of web servers.  Sharing memory (session) variables
 then become impracticable.

 You can either use session replication or you can
 use sticky session - both allow session variables to be used
 effectively with clusters

To clarify then: Sharing memory (session) variables then become
impracticable for us poor people. smile  Small Hosting shops will
typically use less expensive load balancers which operate externally from
the servers.  Client variables then become more attractive and easier to
use.  Good point but we both digress.



Best Regards,

Dennis Powers
UXB Internet- A Website Design and Hosting Company
690 Wolcott Road - P.O. Box 6028
Wolcott, CT 06716tel: (203)879-2844
http://www.uxbinternet.com
http://dennis.uxb.net




~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189027
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-30 Thread Dennis Powers
 Even though he actually did, it just goes without saying: memory is
faster
 than I/O.

 Under a heavy load, this is no doubt true. However, I was recently
 surprised to find that under a small to moderate load, there may
 be no noticeable performance difference.

The analogy here is that a BMW is faster than a VW Beetle but not when they
are both going at 20Mph.

 I generally use the session scope

Since 98% of our applications will never be run in a cluster I too use
session scope even with the locking issues involved in CF5.x. (We are a bit
behind the curve and CF5.x ain't broke for us.)

Like anything it is a matter matching the methodology to the application.
Just because one is technically faster than the other does not mean that
one is better than the other, unless the application calls for it.


Best Regards,

Dennis Powers
UXB Internet- A Website Design and Hosting Company
690 Wolcott Road - P.O. Box 6028
Wolcott, CT 06716tel: (203)879-2844
http://www.uxbinternet.com
http://dennis.uxb.net




~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189029
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-29 Thread Martin Parry
I personally favour client variables. But bear in mind that you must be
using a proper DB server, NOT access for this to work. SQL, MYSQl Etc.

Additionally, in CF admin the client variables must be purged in a
reasonable time if SQL disk space is in short supply or you get a
billion hits a day.

Use a structure for storing the basket contents by all means, however
instead of session.basketContents, convert the structure to a WDDX
object and store it as client.basketContents - That way you're not using
precious RAM but cheap disk space.

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk


-Original Message-
From: mayo [mailto:[EMAIL PROTECTED] 
Sent: 29 December 2004 02:13
To: CF-Talk
Subject: shopping cart, session variables - best practices

I'm setting up a shopping cart for a jewelry store.

I'm curious, what is performance limit for storing data in session
variables?

The following are lists:

Item No (itemID used in check out)
Item Qty (in case someone wants more than one)
Item Price
Item Description (most descriptions about 50 characters. ex: Ruby and
gold
drop-earrings)

Most customers will not go above 3 or 4 items so I'm not concerned for
this
project.

Just curious in general. At what point would storing data impact
performance?

Also, is updating session variables all that much quicker than updating
a
database. For example a customer wants two pairs of a particular earring
instead of one.

-- gil




~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188920
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-29 Thread Dave Watts
 Use a structure for storing the basket contents by all means, however
 instead of session.basketContents, convert the structure to a WDDX
 object and store it as client.basketContents - That way you're not using
 precious RAM but cheap disk space.

Storing application- and user-specific data is what precious RAM is for!

In an application environment with a single application server, you will
typically achieve significantly higher performance under load by storing
things in memory rather than fetching them from the database for each page
request. You may need to provision your server's RAM adequately to ensure
you have enough for the number of concurrent users you need to support, but
RAM is comparatively cheap.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444


~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188941
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-29 Thread Dave Watts
 Any reason you're not using an array of structs? It would be much
 cleaner to work with and much faster than using lists (which is going
 to have much more impact on your performance than storing data).

While I agree with your suggestion to use arrays and structures rather than
lists, I doubt it would have a fraction of the impact on performance that
choices about storing data will have. You might save a few milliseconds per
page by avoiding lists, but you will typically suffer a more severe
performance penalty by making trips to the database instead of storing
things in the Session scope in my experience.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188944
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-29 Thread Martin Parry
I think we should really find out the capabilities of Mayo's server/host
before we can truly suggest one method over another. In high traffic
eComm sites I have seen superb performance using the method described.

If, however RAM is not a problem, he isn't experiencing high volumes and
is not on another server with xxx websites who all make excessive use of
session variables, then yes - maybe he should use session variables..

Mayo - please advise.

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk

-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: 29 December 2004 18:02
To: CF-Talk
Subject: RE: shopping cart, session variables - best practices

 Use a structure for storing the basket contents by all means, however
 instead of session.basketContents, convert the structure to a WDDX
 object and store it as client.basketContents - That way you're not
using
 precious RAM but cheap disk space.

Storing application- and user-specific data is what precious RAM is for!

In an application environment with a single application server, you will
typically achieve significantly higher performance under load by storing
things in memory rather than fetching them from the database for each
page
request. You may need to provision your server's RAM adequately to
ensure
you have enough for the number of concurrent users you need to support,
but
RAM is comparatively cheap.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188949
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-29 Thread Dave Watts
 I think we should really find out the capabilities of Mayo's server/host
 before we can truly suggest one method over another.

I wouldn't go so far as to say I was suggesting one mechanism over another.
I merely pointed out that, in general, you improve the performance of web
applications by storing data in application server memory instead of
fetching it from the database for each page request.

 In high traffic eComm sites I have seen superb performance using the 
 method described.

There are plenty of reasons why you might choose Client variables or other
database storage over Session variables. It is certainly possible to build
applications that perform acceptably well using any of these approaches. My
point was simply that storing data in memory will perform better than
storing it in a database, all other things being equal.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188955
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-29 Thread Dennis Powers
 In high traffic eComm sites I have seen superb performance using the
 method described.

 There are plenty of reasons why you might choose Client variables or
 other database storage over Session variables.

To expand on Dave's statement the times you would want Client variables over
memory (session) variables for storage is when the application needs to
operate in a cluster of web servers.  Sharing memory (session) variables
then become impracticable.

 My point was simply that storing data in memory will perform better
 than storing it in a database, all other things being equal.

Even though he actually did, it just goes without saying: memory is faster
than I/O.


Best Regards,

Dennis Powers
UXB Internet- A Website Design and Hosting Company
690 Wolcott Road - P.O. Box 6028
Wolcott, CT 06716tel: (203)879-2844
http://www.uxbinternet.com
http://dennis.uxb.net




~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188968
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: shopping cart, session variables - best practices

2004-12-29 Thread Sean Corfield
On Wed, 29 Dec 2004 18:27:31 -0500, Dennis Powers
[EMAIL PROTECTED] wrote:
 To expand on Dave's statement the times you would want Client variables over
 memory (session) variables for storage is when the application needs to
 operate in a cluster of web servers.  Sharing memory (session) variables
 then become impracticable.

Well, that depends. You can either use session replication or you can
use sticky session - both allow session variables to be used
effectively with clusters. macromeda.com is a cluster of several CFMX
6.1 instances, with hardware load balancing and lots of session data.
We use sticky session in the load balancer.
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188969
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-29 Thread Ben Rogers
 To expand on Dave's statement the times you would want Client variables
 over
 memory (session) variables for storage is when the application needs to
 operate in a cluster of web servers.  Sharing memory (session) variables
 then become impracticable.

Session state stored in client variables also survive service and server
restarts.

 Even though he actually did, it just goes without saying: memory is faster
 than I/O.

Under a heavy load, this is no doubt true. However, I was recently surprised
to find that under a small to moderate load, there may be no noticeable
performance difference.

I was recently tasked with upgrading a site from ColdFusion 5 to MX. I had
used client variables when originally designing the site for various
reasons. Mostly, I was trying to avoid locking issues and anticipating the
need for clustering.

Suffice it to say, we never had to cluster the site and locking for
stability's sake is no longer necessary. So, when performing the upgrade, I
decided to test the performance difference between using session variables
and client variables.

It took me a couple of hours to update the code base (20,000 lines of code).
I was surprised to find that, under a minimal to moderate load, I could not
measure the performance difference using the tools I had. Consequently, I
decided not to make the switch (don't fix what ain't broke).

That said, for new sites, I generally use the session scope because I can
store complex objects such as CFCs in the session scope. Additionally, since
the session scope is now thread safe, I don't have to worry about whether or
not every developer is properly locking their code.

Ben Rogers
http://www.c4.net
v.508.240.0051
f.508.240.0057


~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188971
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


shopping cart, session variables - best practices

2004-12-28 Thread mayo
I'm setting up a shopping cart for a jewelry store.

I'm curious, what is performance limit for storing data in session
variables?

The following are lists:

Item No (itemID used in check out)
Item Qty (in case someone wants more than one)
Item Price
Item Description (most descriptions about 50 characters. ex: Ruby and gold
drop-earrings)

Most customers will not go above 3 or 4 items so I'm not concerned for this
project.

Just curious in general. At what point would storing data impact
performance?

Also, is updating session variables all that much quicker than updating a
database. For example a customer wants two pairs of a particular earring
instead of one.

-- gil


~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188911
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: shopping cart, session variables - best practices

2004-12-28 Thread Cameron Childress
 I'm curious, what is performance limit for storing data in session
 variables?

Memory (RAM) is really your only practical limit when using session
variables.  Just make sure you make your session timeout a practical
interval. and (assuming you are on CFMX) make sure you set both your
max and default memory sizes to the same value in the CFADMIN.

It's conceivable that if you have too many sessions going at once, you
could use up all the available RAM and run into out of memory errors,
but based on the limmited data you are storing in session, you will
likely hit another bottleneck point (ie: CPU or DB connections) before
your sessions exceed available RAM.

 Also, is updating session variables all that much quicker than updating a
 database. For example a customer wants two pairs of a particular earring
 instead of one.

Session variables are always going to be faster than making trips to the DB.

-Cameron

~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188912
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: shopping cart, session variables - best practices

2004-12-28 Thread Sean Corfield
On Tue, 28 Dec 2004 21:12:58 -0500, mayo [EMAIL PROTECTED] wrote:
 The following are lists:
 
 Item No (itemID used in check out)
 Item Qty (in case someone wants more than one)
 Item Price
 Item Description (most descriptions about 50 characters. ex: Ruby and gold
 drop-earrings)

Any reason you're not using an array of structs? It would be much
cleaner to work with and much faster than using lists (which is going
to have much more impact on your performance than storing data).
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188915
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: shopping cart, session variables - best practices

2004-12-28 Thread mayo
There's no particular reason to use list. I was wondering about using arrays
instead, and then got pulled elsewhere. Thx.

-- gil



-Original Message-
From: Sean Corfield [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 28, 2004 10:59 PM
To: CF-Talk
Subject: Re: shopping cart, session variables - best practices


On Tue, 28 Dec 2004 21:12:58 -0500, mayo [EMAIL PROTECTED] wrote:
 The following are lists:

 Item No (itemID used in check out)
 Item Qty (in case someone wants more than one)
 Item Price
 Item Description (most descriptions about 50 characters. ex: Ruby and
gold
 drop-earrings)

Any reason you're not using an array of structs? It would be much
cleaner to work with and much faster than using lists (which is going
to have much more impact on your performance than storing data).
--
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 6 invites to give away!

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood



~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188916
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54