Re: Async IO HTTP server frontend for PostgreSQL

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Async IO HTTP server frontend for PostgreSQL
Date: 2014-09-09 12:52:08
Message-ID: CAAfz9KP0QPzTswEv+_9NcRazL4RYLdFsomkE8OoVrsMuQOwXdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2014-09-09 1:28 GMT+04:00 Merlin Moncure <mmoncure(at)gmail(dot)com>:

> On Mon, Sep 8, 2014 at 12:59 PM, Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
> wrote:
> > Dear community,
> >
> > I need a %subj% -- high performance HTTP server solution
> > based on asynchronous IO with ability to run PostgreSQL's
> > functions from HTML templates asynchronously and passing
> > the results to the HTTP client.
> > For example, consider a simple template:
> > <html>
> > <div id="rows">
> > ${get_rows(id := :id)}
> > </div>
> > </html>
> > The function get_rows() will be called asynchronously
> > during the dispatching HTTP request and the result of
> > it will streams immediately to the HTTP client via async IO.
> >
> > Currently, I've found only a module for NGINX
> > https://github.com/FRiCKLE/ngx_postgres
> > but it does not what I need.
> >
> > Ideally, it should be a simple C (libevent based) or C++
> > (boost::asio based) library.
> >
> > Please, if anyone has a ready solution of the idea described
> > above, let me know, because I don't want waste my time to write
> > it from scratch.
>
> It's not in C, but you should take a very good look at node.js.
>
> merlin
>
Yeah, it looks interesting and AFAIK there are already bindings
for node.js to asynchronous libpq's API --
https://github.com/brianc/node-postgres/blob/master/src/binding.cc#L43
Thanks for the point, Merlin.

--
// Dmitriy.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-09-09 13:25:07 Re: Crash in 9.4 Beta when partially collapsing left outer joins
Previous Message Ramesh T 2014-09-09 10:36:50 stackbuilder