Thrift Getting Started --- RPC service

https://blog.csdn.net/zkp_java/article/details/81879577

RPC basic principles

Most RPC framework follows the development of the following three steps:

 

 RPC communication procedure as shown in FIG.

 

 Communication process includes the following steps:

 

 FIG Code user business logic implemented, and the next Service.Client .write () / read () is generated thrift The IDL client and server code corresponding to the Client stub and the RPC Server stub. TProtocol used to serialize the data and deserialization, particularly comprising a binary format, JSON or Apache Thrift defined. TTransport provides data transfer function, can easily use the Apache Thrift define a service and to select a different transmission protocol.
As shown in the network stack structure thrift  

 

 

 

Guess you like

Origin www.cnblogs.com/Lee-yl/p/11526174.html