Re: Why are stored procedures looked on so negatively?

From: Sébastien Lorion <sl(at)thestrangefactory(dot)com>
To: Some Developer <someukdeveloper(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why are stored procedures looked on so negatively?
Date: 2013-07-25 21:17:00
Message-ID: CAGa5y0NE9QqLxAS=z8c5u1LdUJKNjt9jeuA+s497n7w3jyXKZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 25, 2013 at 4:41 AM, Some Developer
<someukdeveloper(at)gmail(dot)com>wrote:

> You are forgetting that you can execute a query asynchronously using libpq
> therefore the app server can continue serving requests whilst the database
> server chugs away on its work. You just poll the server every now and again
> to see if the work has finished.

I think another option is to use some sort of pub/sub architecture using a
messaging server such as RabbitMQ. It would at least allow you to
avoid/reduce the locking in the database caused by the remote calls in
triggers. It would also allow you to scale out the app servers instead of
scaling up the database. That said, depending on your load, it might be
overkill.

Sébastien

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Neil McGuigan 2013-07-25 22:24:24 How to do incremental / differential backup every hour in Postgres 9.1?
Previous Message Andrew Bartley 2013-07-25 21:15:09 Re: Rule Question