>
> I have a questions about connection pooling.
>
> For connection pooling to work, doesn't the objects that
> create the connection be working in a Com+ environment?

No. Connection pooling is built into several different technologies.
COM+ is just one of those. The System.Data.SqlClient.SqlConnection class
has a built-in connection pool that does not require COM+.

> With my current setup, I have Web Services as the backend of
> my app so that I can go through firewalls.  My web services
> create objects and execute methods of that object such as
> Save or Retrieve.  In the methods, I create an object that
> contains a sqlConnection and I pass this connection object
> around to the commands to perform the process.  This is not
> in a Com+ environment (yet).  Do you think this will cause
> much more of a strain on the server?

Depends on a lot of things. If you're designing for maxiumum
scalability, I wouldn't do it this way, because think about how long you
hold onto the connection: from the time you open it in your init code
all the way until the last person is done using it. Using connection
pooling, you just nab one out of the pool when you need one, use it for
just that long, and plunk it back in.

>
> If I have 5 clients that are retrieving some data, I have 5
> connections open, right?

If we're talking connection pooling, then not necessarily. If only three
of them are retrieving data *right now at this very moment* , then only
three connections need to be open.

> Right now the SQL Server is on the
> same machine as the Web Service, so we don't have much
> network traffic dealing with the connections, but we trying
> to design it to be scalable so that some users will use
> different DBs and different Servers when we get into the
> hosting phase.  I wonder how much of a problem that will be.
>

If you're talking about scaling to 50 users, probably not a big deal.
But maybe. If 5000, you definitely want to take a really hard look at
your design, and above all else: read "Transactional COM+" by Tim Ewald.


The correct answer to any architectural question is always "it depends."
;)

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to