Re: Protocol buffer support for Postgres - Mailing list pgsql-hackers

From Flavius Anton
Subject Re: Protocol buffer support for Postgres
Date
Msg-id CANXdjjb8m_33yYpg7+q3xsoLw_DMzoRaYMjTCevS2rNU4L4xFw@mail.gmail.com
Whole thread Raw
In response to Protocol buffer support for Postgres  (陈天舟 <tianzhouchen@gmail.com>)
Responses Re: Protocol buffer support for Postgres  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Tue, Apr 26, 2016 at 2:40:49PM -0700, David Fetter wrote:
> Should we see about making a more flexible serialization
> infrastructure?  What we have is mostly /ad hoc/, and has already
> caused real pain to the PostGIS folks, this even after some pretty
> significant and successful efforts were made in this direction.

Hi all. Is anybody working on this right now? I would like to pick
this task for the summer. First of all, what do you think about what
David said? Should we try and design a generic infrastructure for
similar serialization datatypes? If so, will we need to refactor some
pieces from the JSON/XML implementation? I looked over the code and it
seems nicely decoupled, but I am not sure what this would involve.
I've done this before for MySQL[1] (not yet completed), but I'd love
to try it for PostgreSQL too.

On Tue, Apr 26, 2016 at 11:23:11AM -0700, José Luis Tallón wrote:
> Have you investigated JSONB vs ProtoBuf space usage ?
>        (the key being  the "B" -- Postgres' own binary JSON
>         implementation)

This is something I can further investigate, but another (possibly
major) benefit of the Protocol Buffers over JSON is that they *still*
have a schema. I think they combine advantages from both structured
and schemaless data.

My best guess is that we shouldn't focus on abstracting *any*
serialization paradigm, but only the ones that have a schema (like
Thrift or Protocol Buffers). Speaking of schemas, where is the best
place to keep that? For MySQL I opted for a plain text file similar to
.trg files (the ones used by MySQL for keeping triggers).

I'd love to talk more about this.

Thank you.
Flavius Anton

[1] https://github.com/google/mysql-protobuf



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Bug in to_timestamp().
Next
From: Greg Stark
Date:
Subject: Re: Protocol buffer support for Postgres