Java There are two main purposes of serialization ：
1. Object serialization
2. Network transmission
When making a remote cross process service call , You need to convert the transferred object into a byte array or ByteBuffer object . When the remote service reads a byte array or ByteBuffer Object time , It needs to be decoded as Java object . That's what's called Java Object coding and decoding technology .
JDK1.1 Serialization has been provided , No additional class libraries are needed . General remote call （RPC） Rarely used Java With the serialization of the message encoding and decoding and transmission .
Java Serialization disadvantage ：
Inability to cross language
The serialized stream is too large
Low serialization performance
Mainstream coding framework
Google Of Protobuf
Structured data storage format
High coding performance
Language has nothing to do , Platform independent , Good scalability
Support Java,C++ and Python
FaceBook Of Thrift
Thrift Three typical encoding and decoding methods are supported
Universal binary codec
Compressed binary codec
Optimized optional field compression codec
Pluggable class parser
Pluggable object replacement technology
Pluggable predefined cache table
No need to achieve Serializable
Caching improves the performance of object serialization
This article is from WeChat official account. - The snail flying in the fallen leaves （A_GallopingSnail） , author ： The supernatural snail
The source and reprint of the original text are detailed in the text , If there is any infringement , Please contact the email@example.com Delete .
Original publication time ： 2018-09-12
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .