Thread: Josh's Comments on Hstore / Jsonb

Josh's Comments on Hstore / Jsonb

From
"john.tiger"
Date:
Somehow my comments didn't go thru on the soup blog but wanted to throw
in more support for this patch

Josh, you are so right on the money.  An ACID compliant db that serves
JSON is great.  Sorry I didn't make SCALE this year to hear the PG talks
and stop by and say hi.  Maybe at Open West ?  We are incorporating
Postgres JSON served from Nodejs (using Express to offer the REST side)
into several new products.   For modern web apps, JSON just makes so
much sense.

Yes, the Node driver needs some work - hopefully we can contribute as we
work more with it.  I'm particularly interested in working offline, then
synching (vis-a-vis couch/pouch).  If anyone else is working on this
issue please feel free to touch base.


Re: Josh's Comments on Hstore / Jsonb

From
Merlin Moncure
Date:
On Tue, Feb 25, 2014 at 3:43 PM, john.tiger <john.tigernassau@gmail.com> wrote:
> Somehow my comments didn't go thru on the soup blog but wanted to throw in
> more support for this patch
>
> Josh, you are so right on the money.  An ACID compliant db that serves JSON
> is great.  Sorry I didn't make SCALE this year to hear the PG talks and stop
> by and say hi.  Maybe at Open West ?  We are incorporating Postgres JSON
> served from Nodejs (using Express to offer the REST side) into several new
> products.   For modern web apps, JSON just makes so much sense.
>
> Yes, the Node driver needs some work - hopefully we can contribute as we
> work more with it.  I'm particularly interested in working offline, then
> synching (vis-a-vis couch/pouch).  If anyone else is working on this issue
> please feel free to touch base.

Aside: I also have basically completely switched to node.js/express +
postgres (via 'node-postgres').  It's absolutely fantastic.  Besides
the obvious great and getting better json support, you have other
postgres-ism that mesh very well with node: asynchronous notification
for example.

merlin


Re: Josh's Comments on Hstore / Jsonb

From
Merlin Moncure
Date:
On Thu, Feb 27, 2014 at 6:16 PM, Brett Mc Bride
<brett.mcbride@deakin.edu.au> wrote:
> I'm in the process of prototyping a DB-backed REST web service as a
> side-project. It's still early
> days, but I've been handed a PHP/mysql setup.
> After a bit of searching around, I thought that the exact combination above
> (node.json/express +
> node-postgres), possibly coupled with JSON datatypes, could be a really
> effective solution. ()
>
> Now for the advocacy part - before I saw this thread I wasn't sure whether
> there were any real-world
> implementations of this combination. Are there any good skeletons or
> prototypes out there to get a
> RESTful web service up and running with express and postgres?

Express *is* the skeleton.  If you are handing auth and session mgmt
in node that's were the bulk of your code will be at the service
level.  If not, things are even easier:  my web service calls tend to
boil down to almost one liners: postgres returns pre-packaged json and
node just flips it to the client.   I've gotten pretty adept at json
serialization: when the application page refreshes I'll stuff as many
things into one json object as possible.

Posting data back to the database is more complex so you have to
decide if you want to let the database handle the json decomposition
(this requires 9.3) or reduce it to SQL in node.  I prefer the
database because things are simplified when you don't have to use
connection pooling.

merlin


Re: Josh's Comments on Hstore / Jsonb

From
Brett Mc Bride
Date:
On 26/02/14 09:32, Merlin Moncure wrote:
On Tue, Feb 25, 2014 at 3:43 PM, john.tiger <john.tigernassau@gmail.com> wrote:
Somehow my comments didn't go thru on the soup blog but wanted to throw in
more support for this patch

Josh, you are so right on the money.  An ACID compliant db that serves JSON
is great.  Sorry I didn't make SCALE this year to hear the PG talks and stop
by and say hi.  Maybe at Open West ?  We are incorporating Postgres JSON
served from Nodejs (using Express to offer the REST side) into several new
products.   For modern web apps, JSON just makes so much sense.

Yes, the Node driver needs some work - hopefully we can contribute as we
work more with it.  I'm particularly interested in working offline, then
synching (vis-a-vis couch/pouch).  If anyone else is working on this issue
please feel free to touch base.
Aside: I also have basically completely switched to node.js/express +
postgres (via 'node-postgres').  It's absolutely fantastic.  Besides
the obvious great and getting better json support, you have other
postgres-ism that mesh very well with node: asynchronous notification
for example.

merlin


I'm in the process of prototyping a DB-backed REST web service as a side-project. It's still early
days, but I've been handed a PHP/mysql setup.
After a bit of searching around, I thought that the exact combination above (node.json/express +
node-postgres), possibly coupled with JSON datatypes, could be a really effective solution. ()

Now for the advocacy part - before I saw this thread I wasn't sure whether there were any real-world
implementations of this combination. Are there any good skeletons or prototypes out there to get a
RESTful web service up and running with express and postgres?

-- 
Brett

Important Notice:
The contents of this email are intended solely for the named addressee and are confidential; any unauthorised use, reproduction or storage of the contents is expressly prohibited. If you have received this email in error, please delete it and any attachments immediately and advise the sender by return email or telephone.

Deakin University does not warrant that this email and any attachments are error or virus free.