Arbitrary content (including XML) as binary stream

  • Thread starter Generic Usenet Account
  • Start date
G

Generic Usenet Account

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
 
C

cr88192

Generic Usenet Account said:
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.

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...).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top