In particular - is there any chance that something like this has already
been written for Delphi?
Jason Swager
> (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.
Best Regards
--
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de
It is easy to do using xml dtd and xsl, I used it long time ago to
produce client/server protocol.
henri
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
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