[thelist] best practice question

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Wed Aug 9 13:19:01 CDT 2006


		Thanks for the extra link, Ken...

...and to be clear, the analogy belongs to Charles (who, truth be told, has a certain flair for such things).

				From: "Ken Schaefer" Ken at adOpenStatic.com

In addition to Peter's excellent analogy, the technical details behind why
the analogy is good:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html/
pooling2.asp

Cheers
Ken

--
My IIS Blog: www.adOpenStatic.com/cs/blogs/ken
Tech.Ed Sydney: learn all about IIS 7.0 - See you there!

: -----Original Message-----
: From: thelist-bounces at lists.evolt.org On Behalf Of Peter Brunone (EasyListBox.com)
: 
: > Okay, but then you still need to instantiate the object "dbConnect" on
: > as needed basis. What I'm wondering if there is a way to only
: > instantiate it once per application, and then refer to it as many times
: > as needed.
: 
: There is, but -- as Chris pointed out when responding to what he thought
: was my suggestion of something similar -- it REALLY doesn't scale well for
: multi-user applications. I think the following analogy from
: http://www.learnasp.com/freebook/asp/sessionoverview.aspx really applies
: here:
: 
: A Porsche seems really fast to get anywhere... until you have 3-10
: passengers. Then a mini-van will beat it because you have less trips to
: make. In client-server terms the Porsche doesn't SCALE WELL for more than 2
: passengers. On the other hand, when a group of 100 wants to go to Atlantic
: city for the weekend we recommend a Tour Bus. However, someone taking a
: Tour Bus to the grocery store has anecdotal evidence it is not as fast as a
: Porsche.
: 
: Storing one connection object for repeated use is a great idea... until
: more users need to get to it at once.
: 
: If you want to abstract out the connection creation, you'd do better to
: use the approach I mentioned earlier (not that it's the best or only way)
: and just add methods as needed, depending on what you need from the object.
: 
: HTH,
: 
: Peter



More information about the thelist mailing list