fury icon indicating copy to clipboard operation
fury copied to clipboard

feat(java): support user context for serialize global data(#1595)

Open MrChang0 opened this issue 1 year ago • 6 comments

What does this PR do?

support user context for serialize user global context in some special sence. the changes in this pr are too simple and without design, just an example for the issue.

Related issues

  • #1595

Does this PR introduce any user-facing change?

  • [ ] Does this PR introduce any public API change?
  • [ ] Does this PR introduce any binary protocol compatibility change?

Benchmark

MrChang0 avatar Apr 29 '24 13:04 MrChang0

This is interesting. Withi this feature, we can implement some kinds of dictiontary encoding for data plane. I planed to implement it as DataContext before.

chaokunyang avatar Apr 30 '24 17:04 chaokunyang

This will introduce a big change in user API. I will deep into it when I have time. Currently I'm on vacation.

chaokunyang avatar Apr 30 '24 17:04 chaokunyang

And I future, we plan to profile user data, and generate new serializer based on the profiling result. For exmaple, disable/enabled number compression for specific fields. Check whether map keys are limited and use dict encoding. Will this design relate to it?

chaokunyang avatar Apr 30 '24 17:04 chaokunyang

maybe it could be. I use Fury for RPC and have a big trouble is fury option can't change when code is going on. if we have more flexible context so that Fury could transmit data like ' fury options'/'user data'.

MrChang0 avatar May 01 '24 03:05 MrChang0

maybe it could be. I use Fury for RPC and have a big trouble is fury option can't change when code is going on. if we have more flexible context so that Fury could transmit data like ' fury options'/'user data'.

Could you share more details why you want to change fury options at runtime. It is designed to be immutable

chaokunyang avatar May 01 '24 05:05 chaokunyang

maybe it could be. I use Fury for RPC and have a big trouble is fury option can't change when code is going on. if we have more flexible context so that Fury could transmit data like ' fury options'/'user data'.

Could you share more details why you want to change fury options at runtime. It is designed to be immutable

hoho, just image a scence for this feature 'generate new serializer based on the profiling result', maybe the deserializer can deserialize any Fury data even options is different. for now I dont need it. I just need a user context to save custom data.

MrChang0 avatar May 01 '24 08:05 MrChang0