News for hackers. Stuff that matters.
Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by the_duke on Tuesday March 30, 2021 @06:43AM (#26633056)
The article doesn't mention at all how those speedups have been achieved, what tradeoff the format makes and what it is optimized for - which would be the actually interesting part.

A link to the benchmark code and description of the data would be nice.

It also doesn't show data for FlatBuffer, which is often a lot faster and leaner than ProtoBuf, or for Capt'n Proto.

ProtoBuf is not exactly known for amazing performance or very optimal client implementations across the various languages.

By all means, create a new serialization format, why not. But with so many options to chose from, I would require really strong justification internally.

Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by andrewmd5 on Tuesday March 30, 2021 @11:47AM (#26636008)
One of the authors of Bebop here:

- The benchmark code is present in the laboratory directory of the repository.

- We don’t compare to Capt’n Proto because it does not have a stable web-based implementation, at least not one that has the features that make it so fast natively, so there is nothing to compare.

- Flatbuffers are fast but have a notoriously awful API to work with while also creating their own non-standard data structures in languages like C++. Bebop generates standard type-safe code.

- Bebop doesn’t try to compress data other than strings. This is because we don’t want to be responsible for compressing trailing zeroes when faster compression algorithms exist that can be down after encoding. Also most data is tiny.

- Bebop supports discriminated unions and has a much more robust type system than Flatbuffers.

- We’re not convincing anyone to use our stuff. It was made for us and open sourced because it was useful; we don’t need people ripping out their current serializers if there’s no pressure to do so.

Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by fyrn- on Tuesday March 30, 2021 @08:16PM (#26642115)
Even with that I think flatbuffer, is still the main competition for something like this, not including it might make this look more impressive, but including it and mentioning that bebop has some advantages over flatbuffers (although with less language support) would be more fair.
Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by andrewmd5 on Wednesday March 31, 2021 @01:05AM (#26643719)
They are impossible to benchmark against each other without making an assumption about how often you want to access the data, and which parts of it you want to access. but this means Bebop and FlatBuffers can exist side-by-side / solve different problems: what FlatBuffers does makes sense if you want to access only parts of your objects in limited specific ways, what we do is better if you're always interested in the whole packet.
Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by willtim on Tuesday March 30, 2021 @08:01AM (#26633588)
Designing a serialisation format has a lot similarities with designing a programming language: data types, declarative/ease-of-use versus full control, abstractions, static versus dynamic memory areas, optimising representations etc. There is definitely room for a variety of formats depending on the use cases; and many are unhappy with the current incumbent: https://reasonablypolymorphic.com/blog/protos-are-wrong/

But yes, it's a lot of work and they probably should document what the trade-offs are that they have made.

Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by michaelcampbell on Tuesday March 30, 2021 @11:07AM (#26635465)
And security. SO MANY CVE's related to serialization issues.
Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by tyingq on Tuesday March 30, 2021 @09:39AM (#26634462)
It does seem more similar to Capt'n Proto than the things it does compare itself to.

I would guess the high speed is the triad of

    length encoding with a header vs searching for delimiters
    using what they call structs for benchmarks (no repeatedly sending the field name)
    how much you trade off safety/sanity checks for performance
Oh, and keeping ints little endian.
Re:Bebop: An Efficient, Schema-Based Binary Serialization Fo... by schoetbi on Tuesday March 30, 2021 @09:05AM (#26634108)
Totaly agree. I use flatbuffer and it is a lot faster than e.g Json: https://google.github.io/flatbuffers/flatbuffers_benchmarks....