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

[Java] when can I use Fury with buffer/storage in production #919

Open
smalljunHw opened this issue Sep 18, 2023 · 6 comments
Open

[Java] when can I use Fury with buffer/storage in production #919

smalljunHw opened this issue Sep 18, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@smalljunHw
Copy link

smalljunHw commented Sep 18, 2023

The document says

We are still improving our protocols, binary compatibility are not ensured between fury releases for now. Please shade fury if you will upgrade fury in the future.
Binary compatibility will be ensured before fury 1.0.

So is Fury not recommended for production use now if any serialized object is stored in some place, otherwise future Fury release upgrade may cause deserialization problem?
If so, when binary compatibility will be ensured?

@smalljunHw smalljunHw added the enhancement New feature or request label Sep 18, 2023
@chaokunyang
Copy link
Collaborator

Hi @smalljunHw , thanks for opening up this issue. There are three parts of work to be finished before we can ensure binary compatibility:

I'm afraid binary compatibility can't be ensured before we finish this.

If you want to use it for persistent storage, you may need to add a version flag into the stored data, and shade fury by version, so in future you can switch to newer version of fury without breaking binary compatibility.

@chaokunyang
Copy link
Collaborator

@smalljunHw I add the doc for upgrade fury when breaking binary compatibility: https://github.com/alipay/fury/blob/main/docs/guide/java_object_graph_guide.md#upgrade-fury

If you use fury by this method, future Fury release upgrade won't cause deserialization problem. Does this answer your concern?

@Chenhaoqing
Copy link

Hi @chaokunyang , Can I use "versioning" to ensure binary compatibility now?

The description of

Binary compatibility will be ensured before fury 1.0.

from here is still a little unclear to me.

Thanks for the help.

@chaokunyang
Copy link
Collaborator

yes, if you serialize by https://github.com/alipay/fury/blob/main/docs/guide/java_object_graph_guide.md#upgrade-fury
The binary compatibility can be ensured:
image

@smalljunHw
Copy link
Author

@smalljunHw I add the doc for upgrade fury when breaking binary compatibility: https://github.com/alipay/fury/blob/main/docs/guide/java_object_graph_guide.md#upgrade-fury

If you use fury by this method, future Fury release upgrade won't cause deserialization problem. Does this answer your concern?

thanks, it has answered my question.
I think binary compatiability is an import issue that needs to be solved as soon as possible. It may be odd without it.
By the way, according to https://stackoverflow.com/questions/65718/what-do-the-numbers-in-a-version-typically-represent-i-e-v1-9-0-1, for v0.2.1, the major version number is 0 instead of 2, 2 is actually the minor version.

@chaokunyang
Copy link
Collaborator

@smalljunHw Thanks for your reminder, the document should be updated for his version naming. As to binary compatiability, maybe we should add protocol version to data header, and develop a tool for future binary data migration.

Would you like to collaborate on this?

If we have protocol version on data, we can load different version of fury based on the protocol. The different fury can be shaded into different package. Or we can create a jar like springboot with a cusom format, and load different fury jar by different URLClassloader. Then use loaded Fury to deserialize the data

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

No branches or pull requests

3 participants