This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch refactor/next-2
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git


The following commit(s) were added to refs/heads/refactor/next-2 by this push:
     new ac6a605eb6 Update serialization
ac6a605eb6 is described below

commit ac6a605eb63a9fb6ecfc50a5f9ae9b128ca70b26
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Feb 10 15:04:54 2023 +0800

    Update serialization
---
 .../overview/what/ecosystem/serialization/avro.md  | 56 ++++++++++++++++++-
 .../what/ecosystem/serialization/fastjson.md       | 56 ++++++++++++++++++-
 .../what/ecosystem/serialization/fastjson2.md      | 62 +++++++++++++++++++++-
 .../overview/what/ecosystem/serialization/fst.md   | 61 ++++++++++++++++++++-
 .../overview/what/ecosystem/serialization/gson.md  | 56 ++++++++++++++++++-
 .../what/ecosystem/serialization/hessian.md        | 46 +++++++++++++++-
 .../overview/what/ecosystem/serialization/kryo.md  | 62 +++++++++++++++++++++-
 .../what/ecosystem/serialization/msgpack.md        | 62 +++++++++++++++++++++-
 .../what/ecosystem/serialization/protobuf.md       | 40 +++++++++++++-
 9 files changed, 492 insertions(+), 9 deletions(-)

diff --git a/content/zh-cn/overview/what/ecosystem/serialization/avro.md 
b/content/zh-cn/overview/what/ecosystem/serialization/avro.md
index 05c530cadc..3ee2859478 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/avro.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/avro.md
@@ -4,4 +4,58 @@ title: "Avro"
 linkTitle: "Avro"
 weight: 50
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Avro是一种远程过程调用和数据序列化框架,是在Apache的Hadoop项目之内开发的。它使用JSON来定义数据类型和通讯协议,使用压缩二进制格式来序列化数据。它主要用于Hadoop,它可以为持久化数据提供一种序列化格式,并为Hadoop节点间及从客户端程序到Hadoop服务的通讯提供一种电报格式。
+
+## 2 使用方式
+
+### 2.1 添加依赖
+
+```xml
+<dependencies>
+    <dependency>
+      <groupId>org.apache.dubbo.extensions</groupId>
+      <artifactId>dubbo-serialization-avro</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.avro</groupId>
+        <artifactId>avro</artifactId>
+        <version>1.11.1</version>
+    </dependency>
+</dependencies>
+```
+
+### 2.2 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: avro
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=avro
+
+# or
+dubbo.consumer.serialization=avro
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=avro
+```
+或
+```xml
+<dubbo:protocol serialization="avro" />
+
+<!-- or -->
+<dubbo:consumer serialization="avro" />
+
+<!-- or -->
+<dubbo:reference interface="xxx" serialization="avro" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/fastjson.md 
b/content/zh-cn/overview/what/ecosystem/serialization/fastjson.md
index 0b4e4b5bd3..628aa19024 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/fastjson.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/fastjson.md
@@ -4,4 +4,58 @@ title: "Fastjson"
 linkTitle: "Fastjson"
 weight: 40
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Fastjson 是一个 Java 库,可用于将 Java 对象转换为其 JSON 表示形式。它还可用于将 JSON 字符串转换为等效的 Java 对象。 
Fastjson 可以处理任意 Java 对象,包括您没有源代码的预先存在的对象。
+
+## 2 使用方式
+
+### 2.1 添加依赖
+
+```xml
+<dependencies>
+    <dependency>
+      <groupId>org.apache.dubbo.extensions</groupId>
+      <artifactId>dubbo-serialization-fastjson</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+        <groupId>com.alibaba</groupId>
+        <artifactId>fastjson</artifactId>
+        <version>1.2.83</version>
+    </dependency>
+</dependencies>
+```
+
+### 2.2 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: fastjson
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=fastjson
+
+# or
+dubbo.consumer.serialization=fastjson
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=fastjson
+```
+或
+```xml
+<dubbo:protocol serialization="fastjson" />
+
+<!-- or -->
+<dubbo:consumer serialization="fastjson" />
+
+<!-- or -->
+<dubbo:reference interface="xxx" serialization="fastjson" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/fastjson2.md 
b/content/zh-cn/overview/what/ecosystem/serialization/fastjson2.md
index a2e03bca3e..f624379dcf 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/fastjson2.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/fastjson2.md
@@ -4,4 +4,64 @@ title: "Fastjson2"
 linkTitle: "Fastjson2"
 weight: 20
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+`FASTJSON v2`是`FASTJSON`项目的重要升级,目标是为下一个十年提供一个高性能的`JSON`库。通过同一套`API`,
+
+- 
支持`JSON/JSONB`两种协议,[`JSONPath`](https://alibaba.github.io/fastjson2/jsonpath_cn)
 是一等公民。
+- 支持全量解析和部分解析。
+- 支持`Java`服务端、客户端`Android`、大数据场景。
+- 支持`Kotlin` 
[https://alibaba.github.io/fastjson2/kotlin_cn](https://alibaba.github.io/fastjson2/kotlin_cn)
+- 支持`JSON Schema` 
[https://alibaba.github.io/fastjson2/json_schema_cn](https://alibaba.github.io/fastjson2/json_schema_cn)
+- 支持`Android 8+`
+- 支持`Graal Native-Image`
+- 支持 `JSON Schema` 
[https://alibaba.github.io/fastjson2/json_schema_cn](https://alibaba.github.io/fastjson2/json_schema_cn)
+
+## 2 使用方式
+
+### 2.1 添加依赖
+
+```xml
+<dependencies>
+    <dependency>
+        <groupId>com.alibaba.fastjson2</groupId>
+        <artifactId>fastjson2</artifactId>
+        <version>2.0.23</version>
+    </dependency>
+</dependencies>
+```
+
+注:Fastjson2 序列化仅 Dubbo > 3.1.0 版本支持。在 Dubbo > 3.2.0 中将替代 Hessian 作为默认序列化方式。
+
+### 2.2 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: fastjson2
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=fastjson2
+
+# or
+dubbo.consumer.serialization=fastjson2
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=fastjson2
+```
+或
+```xml
+<dubbo:protocol serialization="fastjson2" />
+
+<!-- or -->
+<dubbo:consumer serialization="fastjson2" />
+
+<!-- or -->
+<dubbo:reference interface="xxx" serialization="fastjson2" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/fst.md 
b/content/zh-cn/overview/what/ecosystem/serialization/fst.md
index 02cc1a0000..42f4decb3b 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/fst.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/fst.md
@@ -4,4 +4,63 @@ title: "FST"
 linkTitle: "FST"
 weight: 60
 description: ""
----
\ No newline at end of file
+---
+
+
+## 1 介绍
+
+FST序列化全称是Fast 
Serialization,它是对Java序列化的替换实现。既然前文中提到Java序列化的两点严重不足,在FST中得到了较大的改善,FST的特征如下:
+
+1. 比JDK提供的序列化提升了10倍,体积也减少 3-4 倍多
+2. 支持堆外Maps,和堆外Maps的持久化
+3. 支持序列化为JSON
+
+## 2 使用方式
+
+### 2.1 添加依赖
+
+```xml
+<dependencies>
+    <dependency>
+      <groupId>org.apache.dubbo.extensions</groupId>
+      <artifactId>dubbo-serialization-fst</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+        <groupId>de.ruedigermoeller</groupId>
+        <artifactId>fst</artifactId>
+        <version>3.0.3</version>
+    </dependency>
+</dependencies>
+```
+
+### 2.2 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: fst
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=fst
+
+# or
+dubbo.consumer.serialization=fst
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=fst
+```
+或
+```xml
+<dubbo:protocol serialization="fst" />
+
+        <!-- or -->
+<dubbo:consumer serialization="fst" />
+
+        <!-- or -->
+<dubbo:reference interface="xxx" serialization="fst" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/gson.md 
b/content/zh-cn/overview/what/ecosystem/serialization/gson.md
index fc53caf584..38a86724c3 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/gson.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/gson.md
@@ -4,4 +4,58 @@ title: "Gson"
 linkTitle: "Gson"
 weight: 70
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Gson是Google公司发布的一个开放源代码的Java库,主要用途为序列化Java对象为JSON字符串,或反序列化JSON字符串成Java对象。
+
+## 2 使用方式
+
+### 2.1 添加依赖
+
+```xml
+<dependencies>
+    <dependency>
+      <groupId>org.apache.dubbo.extensions</groupId>
+      <artifactId>dubbo-serialization-gson</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+        <groupId>com.google.code.gson</groupId>
+        <artifactId>gson</artifactId>
+        <version>2.10.1</version>
+    </dependency>
+</dependencies>
+```
+
+### 2.2 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: gson
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=gson
+
+# or
+dubbo.consumer.serialization=gson
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=gson
+```
+或
+```xml
+<dubbo:protocol serialization="gson" />
+
+        <!-- or -->
+<dubbo:consumer serialization="gson" />
+
+        <!-- or -->
+<dubbo:reference interface="xxx" serialization="gson" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/hessian.md 
b/content/zh-cn/overview/what/ecosystem/serialization/hessian.md
index 18cdea746c..c8270726e2 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/hessian.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/hessian.md
@@ -4,4 +4,48 @@ title: "Hessian"
 linkTitle: "Hessian"
 weight: 10
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Hessian序列化是一种支持动态类型、跨语言、基于对象传输的网络协议,Java对象序列化的二进制流可以被其他语言(如,c++,python)。特性如下:
+
+1. 自描述序列化类型。不依赖外部描述文件或者接口定义,用一个字节表示常用的基础类型,极大缩短二进制流。
+2. 语言无关,支持脚本语言
+3. 协议简单,比Java原生序列化高效
+4. 
相比hessian1,hessian2中增加了压缩编码,其序列化二进制流大小事Java序列化的50%,序列化耗时是Java序列化的30%,反序列化耗时是Java序列化的20%。
+
+## 2 使用方式
+
+> Dubbo < 3.2.0 版本中,默认使用 Hessian2 作为默认序列化
+
+### 2.1 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: hessian2
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=hessian2
+
+# or
+dubbo.consumer.serialization=hessian2
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=hessian2
+```
+或
+```xml
+<dubbo:protocol serialization="hessian2" />
+
+        <!-- or -->
+<dubbo:consumer serialization="hessian2" />
+
+        <!-- or -->
+<dubbo:reference interface="xxx" serialization="hessian2" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/kryo.md 
b/content/zh-cn/overview/what/ecosystem/serialization/kryo.md
index 7885390b26..1f828b431e 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/kryo.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/kryo.md
@@ -4,4 +4,64 @@ title: "Kryo"
 linkTitle: "Kryo"
 weight: 80
 description: ""
----
\ No newline at end of file
+---
+
+
+## 1 介绍
+
+Kryo是一种非常成熟的序列化实现,已经在Twitter、Groupon、Yahoo以及多个著名开源项目(如Hive、Storm)中广泛的使用。
+
+## 2 使用方式
+
+### 2.1 添加依赖
+
+```xml
+<dependencies>
+    <dependency>
+      <groupId>org.apache.dubbo.extensions</groupId>
+      <artifactId>dubbo-serialization-kryo</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+        <groupId>com.esotericsoftware</groupId>
+        <artifactId>kryo</artifactId>
+        <version>5.4.0</version>
+    </dependency>
+    <dependency>
+        <groupId>de.javakaffee</groupId>
+        <artifactId>kryo-serializers</artifactId>
+        <version>0.45</version>
+    </dependency>
+</dependencies>
+```
+
+### 2.2 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: kryo
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=kryo
+
+# or
+dubbo.consumer.serialization=kryo
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=kryo
+```
+或
+```xml
+<dubbo:protocol serialization="kryo" />
+
+        <!-- or -->
+<dubbo:consumer serialization="kryo" />
+
+        <!-- or -->
+<dubbo:reference interface="xxx" serialization="kryo" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/msgpack.md 
b/content/zh-cn/overview/what/ecosystem/serialization/msgpack.md
index 1f0c6f0be2..5a44be6848 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/msgpack.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/msgpack.md
@@ -4,4 +4,64 @@ title: "MessagePack"
 linkTitle: "MessagePack"
 weight: 80
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+MessagePack是一种计算机数据交换格式。它是一种二进制形式,用于表示简单的数据结构,如数组和关联数组。MessagePack 旨在尽可能紧凑和简单。
+
+## 2 使用方式
+
+### 2.1 添加依赖
+
+```xml
+<dependencies>
+    <dependency>
+      <groupId>org.apache.dubbo.extensions</groupId>
+      <artifactId>dubbo-serialization-msgpack</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+        <groupId>org.msgpack</groupId>
+        <artifactId>msgpack-core</artifactId>
+        <version>0.9.3</version>
+    </dependency>
+
+    <dependency>
+        <groupId>org.msgpack</groupId>
+        <artifactId>jackson-dataformat-msgpack</artifactId>
+        <version>0.9.3</version>
+    </dependency>
+</dependencies>
+```
+
+### 2.2 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: msgpack
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=msgpack
+
+# or
+dubbo.consumer.serialization=msgpack
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=msgpack
+```
+或
+```xml
+<dubbo:protocol serialization="msgpack" />
+
+        <!-- or -->
+<dubbo:consumer serialization="msgpack" />
+
+        <!-- or -->
+<dubbo:reference interface="xxx" serialization="msgpack" />
+```
\ No newline at end of file
diff --git a/content/zh-cn/overview/what/ecosystem/serialization/protobuf.md 
b/content/zh-cn/overview/what/ecosystem/serialization/protobuf.md
index 3cca8a409a..3ab3f7341f 100644
--- a/content/zh-cn/overview/what/ecosystem/serialization/protobuf.md
+++ b/content/zh-cn/overview/what/ecosystem/serialization/protobuf.md
@@ -4,4 +4,42 @@ title: "Protobuf"
 linkTitle: "Protobuf"
 weight: 30
 description: ""
----
\ No newline at end of file
+---
+
+
+## 1 介绍
+
+Protocol 
Buffers是一种开源跨平台的序列化数据结构的协议。其对于存储资料或在网络上进行通信的程序是很有用的。这个方法包含一个接口描述语言,描述一些数据结构,并提供程序工具根据这些描述产生代码,这些代码将用来生成或解析代表这些数据结构的字节流。
+
+## 2 使用方式
+
+### 2.1 配置启用
+
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ protocol:
+   serialization: protobuf
+```
+或
+```properties
+# dubbo.properties
+dubbo.protocol.serialization=protobuf
+
+# or
+dubbo.consumer.serialization=protobuf
+
+# or
+dubbo.reference.com.demo.DemoService.serialization=protobuf
+```
+或
+```xml
+<dubbo:protocol serialization="protobuf" />
+
+        <!-- or -->
+<dubbo:consumer serialization="protobuf" />
+
+        <!-- or -->
+<dubbo:reference interface="xxx" serialization="protobuf" />
+```
\ No newline at end of file

Reply via email to