Hessian
This article introduces Hessian serialization
1 Introduction
Hessian serialization is a network protocol that supports dynamic typing, cross-language, and object-based transfer. The binary stream of Java object serialization can be used by other languages (such as C++, Python). Its features include:
- Self-describing serialization types. It does not rely on external description files or interface definitions and uses one byte to represent common basic types, significantly shortening the binary stream.
- Language-independent, supports scripting languages.
- Simple protocol, more efficient than Java native serialization.
- Compared to Hessian1, Hessian2 adds compressed encoding, the size of its serialized binary stream is 50% of Java serialization, serialization time is 30% of Java serialization, and deserialization time is 20% of Java serialization.
2 Usage
In the Dubbo framework, when using the Dubbo communication protocol, Hessian2 is used as the default serialization.
2.1 Configuration
or
or