Re:PostgreSQL 9.2 released
by joevandyk on Monday September 10, 2012 @12:42PM
(#4500666)
Once the database can start receiving and returning json, then you can treat it as a webservice and not have the client involved in SQL. I think this is huge.
[ Parent
| on HN ]
Just FYI, this is already half-true:
"With PostgreSQL 9.2, query results can be returned as JSON data types."
It also supports the PL/V8 stored procedure format, which is Javascript http://code.google.com/p/plv8js/wiki/PLV8
It's very, very close.
Can you elaborate a little bit on how an architecture like that would look like? I had great hopes for CouchDB once.
Re:PostgreSQL 9.2 released
by y0ghur7_xxx on Monday September 10, 2012 @01:38PM
(#4500952)
HTML/JS frontend calls simple node server that does nothing but call a stored procedure like
spc_handle_request(req_headers, req_body, http_method, ...)
stored procedure does simple routing and does something like insert into table (a, b, c) values (to_json(req_body).a, to_json(req_body).b, to_json(req_body).c);
or to_json(select * from emp);
Time to implement simple crud app: 10 minutes.