So the example case for this is:
I have the type Message. It is passed between server A -> B -> C Now let's say version 2.0 of the Message is created that has a couple of new fields/ids. Servers A and C know about this new format, but server B is still using the old one. All servers deserialize, inspect, serialize and send the message. Assuming that A is populating all fields (both V1.0 and V2.0 of Message), will C see the populated fields of Message V2.0?
I know that protocol buffers supports this. I wanted to know whether Thrift supports it as well. (on a quick test I did in C#, the answer is no but just wanted to check with everyone)
As an example of the Message code, here it goes on IDL:
struct Message { // V1.0
1: i64 Id;
}
.
struct Message { // V2.0
1: i64 Id;
2: string Content;
}
Will server C see Message.Content that was populated in A?
The answer is no.
Regarding Protocol Buffers, it is also important to notice that according to the documentation the Python version of the generated code does not support this.
https://developers.google.com/protocol-buffers/docs/encoding#order - "If a message has unknown fields, the current Java and C++ implementations write them in arbitrary order after the sequentially-ordered known fields. The current Python implementation does not track unknown fields."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With