4 ms·
How do you plan to serialize chat messages into protobuf format? Just a protobuf message with one json/xml blob in it? Protobuf can't easily contain an arbitrar
by GoblinSlayer 5y ago
How do you plan to serialize chat messages into protobuf format? Just a protobuf message with one json/xml blob in it? Protobuf can't easily contain an arbitrary tree structure.
- kitkat_new 5y agohow about like this https://github.com/harmony-development/protocol https://github.com/harmony-development/protocol ?
- GoblinSlayer 5y agoOut of line metadata is an interesting idea. Is there a guarantee that metadata is sorted by (start,length)?
- lmm 5y agoI don't think a chat message is or should be an arbitrary tree structure?
- GoblinSlayer 5y agoFor plaintext messages? Existing chat programs use formatted messages with quotes, bold text, smilies and whatnot.
- lmm 5y ago> Existing chat programs use formatted messages with quotes, bold text, smilies and whatnot. Right, but they're not arbitrarily nested tree structures. They're structured data that you want to represent in a structured way (e.g. lists of different kinds of spans), but I don't think a full DOM tree is a good representation.
- GoblinSlayer 5y agoQuotes apparently allow nesting. That said, serializing trees in linear form isn't really a problem: each node simply specifies parent's index. The problem is that these nodes are polymorphic, protobuf doesn't like that.
- lmm 5y agooneof works reasonably well. It's not perfect but it's fine.