Re: connection pooling
Thomas Jacob <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2009-03-20 at 09:38 -0700, Tim Roberts wrote: > Thomas Jacob wrote: > > What makes you say that? Where is the significant difference between the > > pleasantness of threading on Windows and Unix (pthreads)? Especially on Python? > > > > Part of it is philosophical. Threading on Windows is rather easy, being > a fundamental part of the kernel. Pthreads forces me to worry about a > lot of details that I don't really care to worry about. It just doesn't > seem as natural, and that's may be because it began life as a wart > bolted on to the side of traditional multiprocessing. Well, yes, using pthreads directly is probably is more difficult than using a nice abstraction on top of it, but that's not what I meant mainly. Rather it's the fact that you have to invest a lot of energy into locking concurrent access to data, with all the potential problems this entails. And that failure to this correctly often kills your whole application, not just one particular process of it. > That's really a matter of opinion, and it's an opinion I would disagree > with. That doesn't mean you aren't entitled to it, however. ;) Of course ;) > > Threads are also a relatively recent arrival. So why convert easily understood > > and stable designs to something with lots of potential problems? Performance > > is almost a none issue given copy-on-write pages and the fork system call. > > > > application architectures." The original poster was questioning the > need for connection pooling, based partly (in my view) on the assumption > that multiple connection applications were always implemented with > threads. That assumption is wrong, and I was trying to point out why. Granted. > The maturity thing is a bit of a red herring. Threading was not > introduced in Windows 2000; it was originally introduced in Windows NT > 3.1 in 1993, and the Win32s addons to Windows 3.1 in 1994. That > certainly is "relatively young" compared to Unix, but it is > significantly more mature than threading on Linux. Sure, but Windows before NT 4 wasn't really a mature operating system, and before 2000 performance was pretty terrible. So that's my subjective starting point for when Windows started to "count" ;) > I probably should have avoided the whole topic... And I should not have responded in this way, so let's conclude the flame war right now. Have a nice weekend everyone ;)