Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-09-14 Thread Björn Harrtell
FYI, got an initial implementation of http://wiki.postgresql.org/wiki/HTTP_API done in Java (intended to run as a servlet) at https://github.com/bjornharrtell/jdbc-http-server. Feedback is welcome :) Regards, Björn 2014-09-03 1:19 GMT+02:00 Álvaro Hernández Tortosa a...@nosys.es: On 02/09/14

Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-09-02 Thread Álvaro Hernández Tortosa
On 02/09/14 04:47, Dobes Vandermeer wrote: Same idea as PgBouncer or PgPool. The advantage over hacking PgBouncer/PgPool for the job is that Tomcat can already do a lot of what you want using built-in, pre-existing functionality. Connection pool management, low level

Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-09-01 Thread Dobes Vandermeer
Hmm yes I am learning that the BG worker system isn't as helpful as I had hoped due to the single database restriction. As for a writing a frontend this might be the best solution. A java frontend would be easy but pointless because the whole point here is to provide a lightweight access method

Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-09-01 Thread Craig Ringer
On 09/02/2014 12:50 AM, Dobes Vandermeer wrote: Hmm yes I am learning that the BG worker system isn't as helpful as I had hoped due to the single database restriction. As for a writing a frontend this might be the best solution. A java frontend would be easy but pointless because the whole

Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-09-01 Thread Dobes Vandermeer
On Mon, Sep 1, 2014 at 7:00 PM, Craig Ringer cr...@2ndquadrant.com wrote: On 09/02/2014 12:50 AM, Dobes Vandermeer wrote: Hmm yes I am learning that the BG worker system isn't as helpful as I had hoped due to the single database restriction. As for a writing a frontend this might be the

Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-08-31 Thread Peter Eisentraut
On 8/31/14 12:40 AM, Dobes Vandermeer wrote: The background workers can apparently only connect to a single database at a time, but I want to expose all the databases via the API. I think the term background worker should be taken as a hint that foreground protocol endpoint was not one of the

Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-08-31 Thread Fabrízio de Royes Mello
Em domingo, 31 de agosto de 2014, Peter Eisentraut pete...@gmx.net escreveu: On 8/31/14 12:40 AM, Dobes Vandermeer wrote: The background workers can apparently only connect to a single database at a time, but I want to expose all the databases via the API. I think the term background

Re: [HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-08-31 Thread Craig Ringer
On 08/31/2014 12:40 PM, Dobes Vandermeer wrote: 1. Connecting to multiple databases The background workers can apparently only connect to a single database at a time, but I want to expose all the databases via the API. bgworkers are assigned a database at launch time (if SPI is enabled),

[HACKERS] Tips/advice for implementing integrated RESTful HTTP API

2014-08-30 Thread Dobes Vandermeer
A while back I was working on a little proposal to create a RESTful HTTP front-end for PostgreSQL and recently I had the inspiration to work on this. So I successfully created a background worker for PostgreSQL 9.3 that can use the SPI to list off the databases in a JSON response. WIP on github: