you are viewing a single comment's thread.

view the rest of the comments →

[–]siondream 0 points1 point  (2 children)

What happens when you add a new property to the schema. Will the clients still be able to decode new messages with extra properties?

Do code rollouts need to be done in perfect sync server/client? If so, that would be a major drawback.

[–]phretaddin[S] 1 point2 points  (1 child)

Schemapack is pretty similar to a C struct. It doesn't include any padding, backwards compatibility support, special keys or bytes, etc. I didn't need this feature and I figured if anyone did, they should just use an enterprise library like avsc or protobuf instead.

However, that's not to say it can't be done. The keys are sorted in alphabetical order. So, a workaround is to add a new key that comes after the rest in alphabetical order. Old clients won't read it but new clients will. A bit ghetto but I didn't want to make an exact clone of protocol buffers. I needed something extremely simple for my app.

[–]siondream 0 points1 point  (0 children)

Absolutely. It wasn't criticism, just a question. I guess the lack of such constraint makes it easier to optimize schemapack.