apache / fury

A blazingly fast multi-language serialization framework powered by JIT and zero-copy.
https://fury.apache.org/
Apache License 2.0
3.09k stars 246 forks source link

[Java] Add support for deserialization between applications and use of typeTag on thread safe instances #1796

Closed rvcoutinho closed 1 month ago

rvcoutinho commented 3 months ago

I have been using Fury as a mean for serialization in a single application. When it comes to move serialized objects between applications, I have not been able to deal with different DTO packages/classNames (different origin and target classes).

I have tried using XLANG serialization and registering classes with the same typeTag, but it does not work. My understanding is that it should work similarly to a cross language de-serialization.

As an additional comment, the typeTag registration is not available on thread safe classes in Java (not defined on BaseFury). I don't see a reason why not to have the option on thread safe usages.

chaokunyang commented 1 month ago

Type tag was designed for xlang serialization. But you come up with a good use scenario. We should extend type tag to support Java serialization. After it's supported, We should add this to BaseFury interface.