Subject | Re: [Firebird-Architect] Re: Record Encoding |
---|---|
Author | Jim Starkey |
Post date | 2005-05-15T15:54:27Z |
Dmitry Yemanov wrote:
that blobs that support blob seek be declared as uncompressed or the
moral equivalent. If somebody needs to ability to interact with inner
block structure he should be willing to forgo the optimization of
compression. Whether or not this is actually necessary, it does shift
the burden to the advocates of blob seek.
originating from setBlob, setBytes, setText, etc. But we also need to
be able to continue to support staged blobs. I don't see any problems
with compressing any or all of the above. There is a question, however,
as to whether the compression information is part of the staged blob or
a compression prefix on edsBlobIdxxx. If somebody knows the answer, I'd
like to hear it.
records for 20 years. I'd be perfectly happy to audition the existing
schemes that are license compatible with Firebird and pick one that
conforms to our best appreciation of tradeoffs and live with it. In
five to ten years somebody will come up with a better one, and we can
add a second.
Based on my current prejudices, I'd pick zlib. I'd argue that we should
modify it to support a static alphabet tuned for our data stream
encoding and utf-8. Then someone will point out that a modified
algorithm will make it impossible to use the AMD decompression
instruction, and we should stick to the straight and narrow. I'll
counter that AMD doesn't actually have that instruction, and basing an
architecture on an industrial rumor isn't smart. Then Intel will
annouce a chip set to do run length encoding with an ISA board for
Claudio's 486 and I'll have to eat my words.
memory bus to 110/220 volts and fry the sucker. On other machines it
should check for user name. If "Roman" it should throw an exception,
other decompress in memory.
[Non-text portions of this message have been removed]
>> 3. Blob compression is problematic with blob seek, and an acceptableI'm getting ready to punt on this question and suggest that we require
>> compromise must be found, though the compromise may require a
>> per-blob compromise
>>
>>
>
>Let's discuss the possible compromises.
>
>
that blobs that support blob seek be declared as uncompressed or the
moral equivalent. If somebody needs to ability to interact with inner
block structure he should be willing to forgo the optimization of
compression. Whether or not this is actually necessary, it does shift
the burden to the advocates of blob seek.
>A client can choose not to compress. Simple enough?
>
>> 4. Client side compression and decompression has the double benefit
>> of reducing the server CPU load while reducing the number of byte
>> and packets transmitted over the wire
>>
>>
>
>First, this means that no pluggable algorithms are possible, as you already
>mentioned. Personally, I can live with this. Second, it brings enough issues
>for the single PC usage including the embedded one. Why do I need a good
>over-the-wire compression if I have no wire at all? Did you also consider
>e.g. Pocket PC usage (with much slower CPUs)?
>
>
>Agreed. Should temporary blobs to be also compressed when sent to theI don't see any reason why not. The new API needs to support blobs
>client?
>
>
originating from setBlob, setBytes, setText, etc. But we also need to
be able to continue to support staged blobs. I don't see any problems
with compressing any or all of the above. There is a question, however,
as to whether the compression information is part of the staged blob or
a compression prefix on edsBlobIdxxx. If somebody knows the answer, I'd
like to hear it.
>Too many builtin [de]compression algorithms complicates the client library.We've lived with no compression on blobs and run length encoding in
>Do you want them to be linked-in or loaded dynamically (i.e. some predefined
>set of plugins)?
>
>
records for 20 years. I'd be perfectly happy to audition the existing
schemes that are license compatible with Firebird and pick one that
conforms to our best appreciation of tradeoffs and live with it. In
five to ten years somebody will come up with a better one, and we can
add a second.
Based on my current prejudices, I'd pick zlib. I'd argue that we should
modify it to support a static alphabet tuned for our data stream
encoding and utf-8. Then someone will point out that a modified
algorithm will make it impossible to use the AMD decompression
instruction, and we should stick to the straight and narrow. I'll
counter that AMD doesn't actually have that instruction, and basing an
architecture on an industrial rumor isn't smart. Then Intel will
annouce a chip set to do run length encoding with an ISA board for
Claudio's 486 and I'll have to eat my words.
>See above.
>
>>It also makes compromises to support
>>blob seek problematic.
>>
>>
>
>And this is what we must solve.
>
>I see the only solution - add a new blob type (which is independent from
>streamed/segmented). I mean a new BPB option - compressed/not compressed.
>The default behaviour (no option is specified) is either hardcoded or
>settable via the config file. With a default set to compressed, we have all
>the benefits of Jim's proposal, but it still keeps other usage options
>possible. This solution solves all needs and costs us virtually nothing from
>the implementation POV.
>
>
>Questions:Check the cpu type. If 486, it should short the address lines of the
>
>1) what should a blob seek do for a compressed blob? Decompress in server's
>memory or return an error?
>
>
memory bus to 110/220 volts and fry the sucker. On other machines it
should check for user name. If "Roman" it should throw an exception,
other decompress in memory.
>2) how should temporary blobs be transfered? Inherit the compress optionI await your comments.
>from its persistent source? Use a config setting?
>
>
>
[Non-text portions of this message have been removed]