Skip to content

Conversation

@chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented Apr 14, 2024

What does this PR do?

This PR implements meta string encoding described in fury java serialization spec and xlang serialization spec

We have 3/8 space saveing for most string:

    // utf8 use 30 bytes, we use only 19 bytes
    assertEquals(encoder.encode("org.apache.fury.benchmark.data").getBytes().length, 19);
    // utf8 use 12 bytes, we use only 9 bytes.
    assertEquals(encoder.encode("MediaContent").getBytes().length, 9);

The integration with ClassResolver is left in another PR.

Related issues

#1240
#1413

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

@chaokunyang chaokunyang changed the title feat(java): meta string encoding in java feat(java): meta string encoding algorithm in java Apr 15, 2024
@chaokunyang
Copy link
Collaborator Author

@theweipeng @PragmaTwice @LiangliangSui This PR is ready for review, could you help review it?

Copy link
Member

@theweipeng theweipeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

chaokunyang added a commit that referenced this pull request Apr 15, 2024
## What does this PR do?

This PR renames EnumString to MetaString

## Related issues
#1514 


## Does this PR introduce any user-facing change?

<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/incubator-fury/issues/new/choose)
describing the need to do so and update the document if necessary.
-->

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


## Benchmark

<!--
When the PR has an impact on performance (if you don't know whether the
PR will have an impact on performance, you can submit the PR first, and
if it will have impact on performance, the code reviewer will explain
it), be sure to attach a benchmark data here.
-->
@chaokunyang chaokunyang force-pushed the meta_string_in_java branch from c27ef1c to ba43740 Compare April 15, 2024 12:54
Copy link
Contributor

@LiangliangSui LiangliangSui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

chaokunyang added a commit that referenced this pull request Apr 27, 2024
## What does this PR do?

This PR implements meta string encoding described in [xlang
serialization
spec](https://fury.apache.org/docs/specification/fury_xlang_serialization_spec#meta-string)


## Related issues
- #1240 
- #1413
- #1514



## Does this PR introduce any user-facing change?

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

---------

Co-authored-by: Shawn Yang <chaokunyang@apache.org>
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

Successfully merging this pull request may close these issues.

3 participants