Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi equivalent of Google Protocol Buffers

516 views
Skip to first unread message

Jason Swager

unread,
Jul 8, 2008, 11:46:19 AM7/8/08
to
Google released their Protocol Buffers
(http://code.google.com/p/protobuf/). The general idea sounds rather
good; a easy to build and use, quick to parse, binary data format for
simple objects that is platform and technology agnostic. But at the
same time, the idea sounds so simple, I wonder if hasn't already been
done elsewhere, possibly in a slightly different fashion?

In particular - is there any chance that something like this has already
been written for Delphi?

Jason Swager

Michael Justin

unread,
Jul 8, 2008, 12:38:37 PM7/8/08
to
Jason Swager wrote:

> (http://code.google.com/p/protobuf/). The general idea sounds rather
> good; a easy to build and use, quick to parse, binary data format for
> simple objects that is platform and technology agnostic. But at the
> same time, the idea sounds so simple, I wonder if hasn't already been
> done elsewhere, possibly in a slightly different fashion?

Maybe JSON is what you are looking for: easy to implement,
human-readable, light-weight, cross-language and cross-platform, at
least three Delphi implementations available.

I use it in my Delphi components for object exchange with Java for
example, the Delphi JSON-based object will be received as a true Java
object on the other side, using the Apache ActiveMQ message broker.

www.json.org

Best Regards
--
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de

Henri Gourvest

unread,
Jul 9, 2008, 3:46:57 AM7/9/08
to
Jason Swager a écrit :

It is easy to do using xml dtd and xsl, I used it long time ago to
produce client/server protocol.

henri

Jason Swager

unread,
Jul 9, 2008, 11:00:07 AM7/9/08
to
Henri Gourvest wrote:
> It is easy to do using xml dtd and xsl, I used it long time ago to
> produce client/server protocol.

True, using XML and a DTD/schema will work. But one of the primary
points behind Google Protocol Buffers is to have a more efficient data
packet. Their particular approach uses a stream of binary data rather
than the text based XML. This makes for much less data being sent
around and for a much faster parsing.

Jason

Henri Gourvest

unread,
Jul 9, 2008, 6:44:14 PM7/9/08
to

My idea was to generate delphi code using XSL to serialise data packets
in a binary stream. There is an example in UIB to do that.
But I really prefer JSON over HTTP + compression.
I think it could be possible to serialize a json data structure as
binary stream, a shared dictionnary (for properties name) could be used
to serialise and deserialise data.
The google protocol buffer would be more efficient because there is
default values!

henri

marat....@gmail.com

unread,
Apr 18, 2013, 11:03:15 AM4/18/13
to
Google Protocol Buffer Port for Delphi
http://sourceforge.net/projects/protobuf-delphi

Marat
0 new messages