Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id A804B1648184 for ; Fri, 30 Mar 2012 13:11:41 -0300 (ADT) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SDeQL-0004Lc-SW for pgsql-hackers@postgresql.org; Fri, 30 Mar 2012 16:11:40 +0000 X-Originating-IP: 217.70.178.129 Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 35FEE172076; Fri, 30 Mar 2012 18:11:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id CP8FPZexbYqK; Fri, 30 Mar 2012 18:11:12 +0200 (CEST) X-Originating-IP: 98.27.54.176 Received: from [192.168.10.146] (cpe-098-027-054-176.nc.res.rr.com [98.27.54.176]) (Authenticated sender: adsend@dunslane.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 9691D172067; Fri, 30 Mar 2012 18:11:11 +0200 (CEST) Message-ID: <4F75DB1D.5080403@dunslane.net> Date: Fri, 30 Mar 2012 12:11:09 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Robert Haas CC: Dobes Vandermeer , Daniel Farina , pgsql-hackers@postgresql.org Subject: Re: HTTP Frontend? (and a brief thought on materialized views) References: <4F7479FE.9050702@dunslane.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/1867 X-Sequence-Number: 205748 On 03/30/2012 11:41 AM, Robert Haas wrote: > On Fri, Mar 30, 2012 at 10:55 AM, Dobes Vandermeer wrote: >> Well, in our case HTTP is a clear win (but not replacement) and SPDY a >> potential one (even as a replacement). Even if SPDY is not widely adopted >> it could still replace FEBE if there's a clear advantage to using it, I >> don't know enough to make the call right now. > I can see that there are some advantages to having an HTTP interface > to the database, but I think throwing our existing protocol out the > window or relegating it to the status of a second-class citizen would > be foolish. Right, I can't imagine it happening. And I wouldn't really be keen to add an alternative protocol either. I could imagine a client which presented a SPDY interface to the world and translated it into standard calls, possibly via libpq. It's well to remember that we are not a green fields project here. > HTTP is a non-trivial protocol that tends to impose lots > of escaping and de-escaping overhead which is unnecessary for people > who just want to connect to the database and run queries. I can > completely understand that someone might want the ability to do GET > /db/table/pk and have that return an answer very, very quickly, by > bypassing the usual parser and planner and just firing off an > index-scan and returning the results as JSON or somesuch. But I think > it would be a serious mistake to assume that GET /q?q=myquery is going > to come out better than what we have now in the general case. Indeed. cheers andrew