Re: Why are stored procedures looked on so negatively? - Mailing list pgsql-general

From Sébastien Lorion
Subject Re: Why are stored procedures looked on so negatively?
Date
Msg-id CAGa5y0NE9QqLxAS=z8c5u1LdUJKNjt9jeuA+s497n7w3jyXKZw@mail.gmail.com
Whole thread Raw
In response to Re: Why are stored procedures looked on so negatively?  (Some Developer <someukdeveloper@gmail.com>)
List pgsql-general
On Thu, Jul 25, 2013 at 4:41 AM, Some Developer <someukdeveloper@gmail.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

pgsql-general by date:

Previous
From: Andrew Bartley
Date:
Subject: Re: Rule Question
Next
From: Neil McGuigan
Date:
Subject: How to do incremental / differential backup every hour in Postgres 9.1?