Discussion:
Arbitrary content (including XML) as binary stream
(too old to reply)
Generic Usenet Account
2009-03-24 23:03:32 UTC
Permalink
Hi,

In a certain Client/Server setup the following data-types are
supported:
binary, b64-encoded binary, boolean, char, int, float, date and xml.

As can be seen, the "Any" data type is not supported.

Each message exchanged between the client and the server has a
specific data-type. I am planning to "emulate" the Any data type in
this setup by trying to use the binary data type in lieu of Any, since
binary stream is the most fundamental of all data types. Are there
any issues I can run into? Someone told me that the encoding scheme
used in XML (ASCII, UTF-8, Unicode etc.) will give me some grief but I
don't fully comprehend the issue. After all, at a certain level
everything reduces to bits and bytes.

Any insight will be appreciated.

Thanks,
Ramesh
cr88192
2009-03-25 08:47:48 UTC
Permalink
Post by Generic Usenet Account
Hi,
In a certain Client/Server setup the following data-types are
binary, b64-encoded binary, boolean, char, int, float, date and xml.
As can be seen, the "Any" data type is not supported.
Each message exchanged between the client and the server has a
specific data-type. I am planning to "emulate" the Any data type in
this setup by trying to use the binary data type in lieu of Any, since
binary stream is the most fundamental of all data types. Are there
any issues I can run into? Someone told me that the encoding scheme
used in XML (ASCII, UTF-8, Unicode etc.) will give me some grief but I
don't fully comprehend the issue. After all, at a certain level
everything reduces to bits and bytes.
Any insight will be appreciated.
it will likely be needed to indicate which representation is used
per-message, and thus likely require defining a protocol in itself (raw data
is too vague. yes, anything can be sent as raw data, but it is not nearly so
useful unless you know which format it is).

but, alas, if the protocol already has a way of indicating which it is,
there is no problem.

if you mean, you have a raw-binary chunk as a possible message type, and
want to run other types through it, one possibility is to add a small tag to
the front of the data, such as a FOURCC or similar (may be optional for
formats which can self-identify via their headers, ...).

example, an XML chunk could have 'XML ' followed by any XML data (although,
granted, officially one can identify XML payloads via "<?xml ...", but alas
in practice it is not so common that every piece of XML starts with such a
signtature tag...).
Post by Generic Usenet Account
Thanks,
Ramesh
Loading...