Hacker News new | ask | show | jobs
by kentonv 4177 days ago
That's cool... but, from what I can tell (correct me if I'm wrong), Bond accomplishes this by using common classes for in-memory objects which have no relation to the wire format, and then simply invoking a pluggable wire format and parse/serialize time. This lets you plug in previous-generation serialization protocols like Protobuf, Thrift, or Avro but probably won't allow you to plug in a next-generation zero-copy protocol like Cap'n Proto, SBE, or FlatBuffers, where the in-memory data structure and the wire format are one and the same. If you want to try one of them, you'll still have to rewrite all your code, unfortunately.
1 comments

Hey Kenton. I see Adam Sapek bumming around the thread, so maybe he'll chime in here, but Bond works essentially by: (1) inspecting the schematized type, and (2) generating code that will quickly walk over that type and write it to a stream. So yes, it would probably require some surgery to make Bond do what Cap'n Proto is doing.

It is interesting to think about how it might work, though...

If you want to follow up, I encourage you to email Adam (adamsap -at- microsoft) or you can ping me and I'll loop him in (aclemmer@microsoft.com).