[Mono-list] Maintaining just one DB (Npgsql) connection for web services

Joe Audette joe_audette at yahoo.com
Fri May 20 14:28:10 EDT 2005


I think trying to use just 1 connection is not a good
idea. You want to use connection pooling to re-use
connections but not just 1 connection or your app
won't scale to many users.

Support for connection pooling is built in to the .NET
data providers.

Regards,

Joe Audette


--- Christopher Nehren
<apeiron+usenet at coitusmentis.info> wrote:
> I'm in the process of designing some web services,
> and they'll speak to
> a database through an assembly that I'll also be
> writing. I've learned
> from my experience in other database-backed web
> development environments
> that it's generally a good idea to reuse one
> connection to the database
> rather than spawning a new one for every request. I
> haven't been able to
> find anything documenting how to enable this for
> .NET data providers. I
> have a few ideas of how to implement it using things
> like a Unix socket
> (this code will only run on a Unix system, so no
> need to worry about
> lack of portability), but I'd like some nice, simple
> method call that I
> can use which will handle the magic for me. Thanks
> in advance for any
> information.
> 
> Best Regards,
> Christopher Nehren
> 
> P.S.: Thanks a million, million times for Mono. I
> have been obsessing
> over it for at least three months now. :)
> -- 
> I abhor a system designed for the "user", if that
> word is a coded
> pejorative meaning "stupid and unsophisticated". --
> Ken Thompson
> If you ask the wrong questions, you get answers like
> "42" and "God".
> Unix is user friendly. However, it isn't idiot
> friendly.
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 

joe_audette [at] yahoo dotcom
http://www.joeaudette.com
http://www.mojoportal.com


More information about the Mono-list mailing list