Skip to content

Commit

Permalink
docs: translates introduction docs (#172)
Browse files Browse the repository at this point in the history
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Shawn Yang <chaokunyang@apache.org>
  • Loading branch information
yuluo-yx and chaokunyang authored Aug 26, 2024
1 parent da5f1df commit eee5123
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
id: benchmark
title: Benchmark
sidebar_position: 2
---

不同的序列化框架适用于不同的场景,这里的 benchmark 结果仅供参考。

如果你需要针对特定场景进行 benchmark 测试,请确保所有序列化框架都针对该场景进行了适当配置。

动态序列化框架支持多态和引用,与静态序列化框架相比,这成本更高,除非它和 Fury 一样使用 JIT 技术。由于 Fury 在运行时生成代码,因此请在收集 benchmark 统计信息之前进行系统预热。

### Java 序列化

<img width="33%" alt="" src="/img/benchmarks/serialization/bench_serialize_compatible_STRUCT_to_directBuffer_tps.png" />
<img width="33%" alt="" src="/img/benchmarks/serialization/bench_serialize_compatible_MEDIA_CONTENT_to_array_tps.png" />
<img width="33%" alt="" src="/img/benchmarks/serialization/bench_serialize_MEDIA_CONTENT_to_array_tps.png" />
<img width="33%" alt="" src="/img/benchmarks/serialization/bench_serialize_SAMPLE_to_array_tps.png" />

### Java 反序列化

<img width="33%" alt="" src="/img/benchmarks/deserialization/bench_deserialize_compatible_STRUCT_from_directBuffer_tps.png" />
<img width="33%" alt="" src="/img/benchmarks/deserialization/bench_deserialize_compatible_MEDIA_CONTENT_from_array_tps.png" />
<img width="33%" alt="" src="/img/benchmarks/deserialization/bench_deserialize_MEDIA_CONTENT_from_array_tps.png" />
<img width="33%" alt="" src="/img/benchmarks/deserialization/bench_deserialize_SAMPLE_from_array_tps.png" />

有关类型向前/向后兼容性、堆外支持、零拷贝序列化的更多 benchmark 测试,请参见[benchmarks](https://github.com/apache/fury/tree/main/docs/benchmarks)

### JavaScript

<img width="33%" alt="" src="/img/benchmarks/javascript/complex_object.jpg" />

该条形图使用的数据包括一个具有多种字段类型的复杂对象,JSON 数据的大小为 3KB。

请参阅[benchmarks](https://github.com/apache/fury/blob/main/javascript/benchmark/index.js) benchmark 测试代码。
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
id: features
title: Features
sidebar_position: 3
---

- 多种语言:Java/Python/C++/Golang/Javascript/Rust。
- 零拷贝:类似[pickle5](https://peps.python.org/pep-0574/),支持堆外读/写的跨语言序列化。
- 高性能:高度可扩展的 JIT 框架,可在运行时以异步多线程方式生成序列化程序代码,以加快序列化速度,通过以下方式提升 20-170 倍的速度:
- 减少在生成代码中内联变量减少内存访问;
- 通过在生成的代码中内联调用来减少虚拟方法调用;
- 减少条件分支;
- 减少哈希查找;
- 二进制协议:对象图、行格式等。

除了跨语言序列化之外,Fury 还支持以下功能:

- 直接替换 Java 序列化框架,如 JDK/Kryo/Hessian,无需修改任何代码,但速度提高 100 倍。它可以大大提高 RPC 调用性能、数据传输和对象持久化的效率;
- JDK 序列化 100% 兼容,原生支持 java 自定义序列化 `writeObject/readObject/writeReplace/readResolve/readObjectNoData`
- 支持 golang 的共享和循环引用对象序列化;
- 支持 golang 的自动对象序列化。

0 comments on commit eee5123

Please sign in to comment.