(no subject)

Date: 2021-10-17 11:48 am (UTC)
From: (Anonymous)

I didn't know about all that politics and arguments. It's worth to know, thank you for the review. But I'll compare only technical details.

I've implemented binary JSON-like format for storing, transferring and processing log events. And I took CBOR as a base. More precisely I've thrown away all that predefined extension types and used my own only. I agree, standard extension tags are quite messy. Many of them are useless or rarely needed.

Why do I like it more than MsgPack?

Reader and writer implementation is simpler.

There is the same tag-length structure (tag is always 2 bit, length is always the same encoded), so I can have the same function to encode/decode all types headers.

Indefinite-length is useful.

Logger can encode arguments without knowing how many of them follow. Processor can easily modify messages in flight.

Extension tags are simpler.

CBOR has just one simple wrapper with a tag. Easy to encode and decode. MsgPack has 8 tags with different semantics. And these tags are not event contiguous.

CBOR can have the same CBOR format under extension tag with all base types. MsgPack has only byte array. One loses ability to parse, interpret and process that extension data in a general way.

Extension tags are extremely useful. Although all data is encoded in the same simple types you can easily differentiate {just int, time, duration, enum}, {just bytes, id, hash and, other binary format}, {error message and string}, {stack trace from array of maps} and so on. So if user of my logger would add any of that typed data into the event arguments any UI or processing script can interpret it specially.

Other small nice point.

Float can be encoded as a decimal, so that they can take 1 or 2 bytes instead of minimal 5.

(will be screened)
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

diziet: (Default)
Ian Jackson

May 2025

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags