Re: Confusion over Python drivers

From: "Massa, Harald Armin" <chef(at)ghum(dot)de>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Confusion over Python drivers
Date: 2010-02-08 08:14:22
Message-ID: e3e180dc1002080014n743aebd9x93726219502edfab@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>The pg8000 / bpgsql seem to be toy projects, and anyway you dont
>want to use pure-Python drivers in high-performance environments.

I agree that there are some performance-challenges with pure-Python drivers.

And we should not forget to look for the reasons for the incubation of that
many pure-Python drivers:

a) Python is no longer one-language, one-implementation. There are (at
least) cPython (the original), Jython (on JVM), IronPython (from Microsoft
on CLR), PyPy (Python on Python), Unladen Swallow (from Google on LLVM). In
addition the nearly-Pythons as in Cython, RPython and ShedSkin

Everything apart from cPython (and possible UnladenSwallow) has its
challenges dealing with non-Python extension modules. From a developer
standpoint it can be tempting to be able to rely on the same database
adapter across more then one implementation

b) the stabilization of an Python Application Binary Interface is in early
discussion stage; meaning: it will take some time untill a non-Python
extension can be usable across Python versions. c-Extensions are allways a
major stumbling block on Python-n to Python-(n+1) versions

c) Stability. Python code is same-on-same more robust then C-Code, as some
of the crash-friendly-problems are eliminated (you cannot allocate memory
wrongly within Python, you cannot errorly access memory cross array
boundaries...)

especially a) is a point to consider when standardizing on a PostgreSQL
blessed Python-Postgresql-driver. How will the blessing extend to Jython /
Ironpython / PyPy?

Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
%s is too gigantic of an industry to bend to the whims of reality

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2010-02-08 08:36:52 Re: Confusion over Python drivers
Previous Message Andres Freund 2010-02-08 07:13:41 Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)