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] Support userContext for user custom global data #1595

Open
MrChang0 opened this issue Apr 29, 2024 · 2 comments
Open

[Java] Support userContext for user custom global data #1595

MrChang0 opened this issue Apr 29, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MrChang0
Copy link
Contributor

Is your feature request related to a problem? Please describe.

when I want compress some Map<String, String> map, it have lots of same string key, I want make user serializer contain a map key dict suche as Map<String, Integer> dict and I can just serializer key as int, then write dict data after metaContext.
but fury cant costum metaContext to save user global data.

btw, stringRefIgnored open will take slow serilizer time.

Describe the solution you'd like

maybe we can support user context with open interface like interface userContext with method wirteData(MemoryBuffer buffer) and write(MemoryBuffer buffer) and constructr(Fury fury). we can take it just like fury.registerUserContext("name", CompressStringDictMapContext.class). we can take userContext like fury.getUserContext("name")
when after wirte metaContext, wirte all register userContext data by register order, same to read.

Additional context

I make a simple compress map version in my local project, so I think a userContext can take better flexibility

thanks

@MrChang0 MrChang0 added the enhancement New feature or request label Apr 29, 2024
@chaokunyang
Copy link
Collaborator

Hi, Fury has a SerializationContext class. Could we use this class to implement this feature?

@MrChang0
Copy link
Contributor Author

sure, I will take a simple code for this feature.

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

2 participants