Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC Backward and Forward Compatibility #35

Open
simon-fu opened this issue Jan 10, 2023 · 1 comment
Open

RPC Backward and Forward Compatibility #35

simon-fu opened this issue Jan 10, 2023 · 1 comment

Comments

@simon-fu
Copy link

simon-fu commented Jan 10, 2023

Suppose we add some fields to RPC message and upgrade cluster in production ENV. We must upgrade each node one by one instead of stopping all nodes of cluster. So old nodes and new nodes maybe co-exist in the same cluster, that required RPC message supporting backward and forward compatibility.

Does datacake-rpc support this scenario ?

@ChillFish8
Copy link
Member

Currently, the RPC framework does not do anything to modify the structure of the serialized data really, so in theory, providing the messages you send aren't different between versions there shouldn't be any inter-op issues.

One thing to note though is the format is dependent on rkyv, which is currently at 0.7 and may change when it stabilises, if i remember correctly though the data layout is that of how it is laid out in rust, so providing your messages are repr(C) (and the derived archived messages which can be done via the archived_attr macro) your format should be stable. I recommend using repr(C) on the messages in general for extra peace of mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants