The Apache Fury team is pleased to announce the 0.6.0 release. This is a major release that includes 35 PR from 12 distinct contributors. See the Install Page to learn how to get the libraries for your platform.
High light
In this release, we introduced a scoped meta share mode for schema evolution in java and enabled it by default when CompatibleMode
is set to Compatible
:
- This mode is 50% faster than previous KV compatible mode, and only 1/6 size of serialized payload than before.
- It's 4x faster than protobuf, less than 1/2 serialized size of protobuf for complex object.
Protobuf/JSON will write message fields meta and values in a KV layout, so when serializzing a list of message, they will have two issues:
- Write meta multiple times even those message are the same type.
- KV layout is dispersive, which is not friendly for compression.
The meta share mode will write field name&type meta of a struct only once for multiple objects of same type, which will save space and improve performance comparedto protobuf.
With meta share, we can write field name&type meta of a struct only once for multiple objects of same type, which will save space and improve performance comparedto protobuf. And we can also encode the meta into binary in advance, and use one memory copy to write it which will be much faster.
Serialize data
public static class NumericStruct {
public int f1;
public int f2;
public int f3;
public int f4;
public int f5;
public int f6;
public int f7;
public int f8;
public static NumericStruct build() {
NumericStruct struct = new NumericStruct();
struct.f1 = 1;
struct.f2 = 2;
struct.f3 = 3;
struct.f4 = 4;
struct.f5 = 5;
struct.f6 = 6;
struct.f7 = 7;
struct.f8 = 8;
return struct;
}
}
public static class NumericStructList {
public List<NumericStruct> list;
public static NumericStructList build() {
NumericStructList structList = new NumericStructList();
structList.list = new ArrayList<>(1000);
for (int i = 0; i < 1000; i++) {
structList.list.add(NumericStruct.build());
}
return structList;
}
Result
Performance:
Benchmark Mode Cnt Score Error Units
fury_deserialize thrpt 30 49667.900 ± 3004.061 ops/s
fury_kv_compatible_deserialize thrpt 30 33014.595 ± 3716.199 ops/s
fury_kv_compatible_serialize thrpt 30 23915.260 ± 3968.119 ops/s
fury_serialize thrpt 30 63146.826 ± 2930.505 ops/s
protobuf_deserialize thrpt 30 14156.610 ± 685.272 ops/s
protobuf_serialize thrpt 30 10060.293 ± 706.064 ops/s
Size:
Lib | Serialized Payload Size |
---|---|
fury | 8077 |
furystrict | 8009 |
furykv | 48028 |
protobuf | 18000 |
Feature
- feat(java): support nonexistent class deserialization in meta share mode by @chaokunyang in https://github.com/apache/fury/pull/1646
- feat(java): scoped meta share mode for type forward/backward compaibility by @chaokunyang in https://github.com/apache/fury/pull/1660
- feat(java): support meta compression by Deflater by @chaokunyang in https://github.com/apache/fury/pull/1663
- perf(java): Add ClassInfo ClassBytes generation conditions. by @LiangliangSui in https://github.com/apache/fury/pull/1667
- feat(javascript): use TextDecoder to decode buffer by @bytemain in https://github.com/apache/fury/pull/1699
- feat(Python): meta string encoding algorithm in Python by @pandalee99 in https://github.com/apache/fury/pull/1702
- feat(C++): String detection is performed using SIMD techniques by @pandalee99 in https://github.com/apache/fury/pull/1720
- feat(C++): The use of SIMD accelerated to implement and optimize utf16 utf8 by @pandalee99 in https://github.com/apache/fury/pull/1732
- feat(java): enable scoped meta share for compatible mode by default by @chaokunyang in https://github.com/apache/fury/pull/1733
- perf(java): optimize scoped meta share mode perf by @chaokunyang in https://github.com/apache/fury/pull/1734
Bug Fix
- chore(doc): fix example by @wangjie-fourth in https://github.com/apache/fury/pull/1657
- fix(java): fix scala object type codegen by @chaokunyang in https://github.com/apache/fury/pull/1659
- fix(java): Fix header offset issue in MetaStringBytes hashcode by @LiangliangSui in https://github.com/apache/fury/pull/1668
- fix(java): return fury to pooled which get from by @MrChang0 in https://github.com/apache/fury/pull/1697
- fix(doc): codestyle version in python by @pandalee99 in https://github.com/apache/fury/pull/1706
- fix(java): fix nested map serialization codegen by @chaokunyang in https://github.com/apache/fury/pull/1713
- fix(java): fix fastjson object serialization by @chaokunyang in https://github.com/apache/fury/pull/1717
Others
- chore: Add IssueNavigationLink and icon for IDEA by @lvshaokang in https://github.com/apache/fury/pull/1665
- chore(rust): resolve deprecate warnings by @waynexia in https://github.com/apache/fury/pull/1662
- chore(doc): fix doc example code by @wangjie-fourth in https://github.com/apache/fury/pull/1666
- chore(rust): Setup rustfmt and toolchain for rust by @Xuanwo in https://github.com/apache/fury/pull/1677
- chore(rust): Make rust clippy happy by @Xuanwo in https://github.com/apache/fury/pull/1678
- chore(doc): add incubating DISCLAIMER by @chaokunyang in https://github.com/apache/fury/pull/1681
- chore(java): Update github URL in IntelliJ vcs.xml by @pjfanning in https://github.com/apache/fury/pull/1689
- ci: fix ci error by @LiangliangSui in https://github.com/apache/fury/pull/1691
- docs: fix badge x by @vesense in https://github.com/apache/fury/pull/1694
- chore(doc): fix compiler error by @wangjie-fourth in https://github.com/apache/fury/pull/1698
- refactor(java): move latin language checker method from string serializer to string util by @anagh07 in https://github.com/apache/fury/pull/1708
- chore(doc): the more complete readme is in python by @pandalee99 in https://github.com/apache/fury/pull/1709
- build: update scala build by @pjfanning in https://github.com/apache/fury/pull/1725
- build: publish jars for fury-scala by @pjfanning in https://github.com/apache/fury/pull/1729
- chore(java): merge reflect.Types into TypeRef by @chaokunyang in https://github.com/apache/fury/pull/1731
New Contributors
- @wangjie-fourth made their first contribution in https://github.com/apache/fury/pull/1657
- @lvshaokang made their first contribution in https://github.com/apache/fury/pull/1665
- @waynexia made their first contribution in https://github.com/apache/fury/pull/1662
- @Xuanwo made their first contribution in https://github.com/apache/fury/pull/1677
- @anagh07 made their first contribution in https://github.com/apache/fury/pull/1708
Full Changelog: https://github.com/apache/fury/compare/v0.5.1...v0.6.0