Re: Python versus Other Languages using PostgreSQL

From: George Neuner <gneuner2(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Python versus Other Languages using PostgreSQL
Date: 2017-05-09 14:54:08
Message-ID: gnk3hc5dt9avi3u93sgpf5525res33r7t7@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 8 May 2017 14:26:02 -0700, Paul Hughes <paul(at)vivation(dot)com>
wrote:

>Hello,
>
>I noticed that most of the largest web platforms that use PostgreSQL as
>their primary database, also use Python as their primary back-end language.
>Yet, according to every benchmark I could find over the last couple of
>years, back-end languages like PHP, HHVM, and Node.JS outperform Python by
>2x to 8x!
>
>So here are my questions:
>
>1) Why do the largest web applications that use PostgreSQL also use Python,
>even though Python is significantly slower than it's biggest competitors?

Most cloud servers come preconfigured with some variation of either
the "LAMP" or "LAPP" stack: i.e. Linux, Apache, MySQL or Postgresql,
PHP or Python.

There needs to be a compelling *application* reason to install
something else: a JVM (or Apache-Tomcat vs regular Apache),
Ruby/Rails, Groovy/Grails, etc.

>2) Can PostgreSQL just as easily be used with PHP or Node.js? If not, why
>not?

Absolutely. The DBMS is (programming) language neutral - the only
requirement is that a client speak the wire protocol. That can be
done natively, or via a library/driver.

>3) Can PostgreSQL be made to work seamlessly to take advantage of the
>superior performance of HHVM or Node.js?

Not really sure what you're asking. The application running under
HHVM or node.js is completely separate from Postgresql.

Both PHP and Javascript (generically and for node.js specifically)
have libraries for Postgresql.

George

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Armand Pirvu (home) 2017-05-09 14:56:59 Re: data transformation and replication
Previous Message Francisco Olarte 2017-05-09 14:48:20 Re: Python versus Other Languages using PostgreSQL