Subject Re: [Firebird-Architect] Re: Data Streaming -- New Message Format
Author Brad Pepers
I was wondering the considerations between a binary format like Jim just
proposed as compared to a text based method. I know some of the
argument involved but I compare them to the benefits of a human readable
stream for debugging and lack of worrying about endian-ness and other
issues and I often opt for text instead of binary in my own protocol
designs. Perhaps a good argument could be made for needing a binary
stream but I'd like to hear it and be able to respond. Some things I
can think of:

1. The text representation would be larger than pure binary which is
true but by what factor and does it matter as much these days? I
suppose it always matters to at least think about otherwise you are down
the slippery slope to bloat. If you had the option to allow compression
of the text stream when both sides support it, then I don't think it
would be that different than the binary method.

2. The time spent to convert the numbers, dates, ... into text could be
a concern but then there is already going to be some encoding going on
in the binary method proposed so I don't think it would be a large
difference and would not compare to the things that really take time
like disk speeds.

3. The blob data type would be a problem but it could also be converted
into a text representation like base64 which along with a compressed
stream wouldn't be too much of a difference I believe.

So what are the fundamental problems with using a text stream? Is it
just hide-bound belief in binary streams or are there solid valid
arguments to be made?

Brad Pepers