RPC Concepts and classifications
RPC is all called remote Procedure call, which translates to "remoting procedure calls". At present, the mainstream platform supports a variety of remote call technologies to meet the remote communication and mutual invocation between different systems in the Distributed system architecture. Remote invocation scenarios are extremely extensive and are implemented in a variety of ways.
From the level of communication protocols, it can be broadly divided into:
HTTP-based protocol-based (for example, text-based soap (XML), Rest (JSON), binary hessian (binary))
TCP protocol-based (typically with high-performance network frameworks such as Mina, Netty, etc.)
From different development language and platform level, it is divided into:
A single language or platform-specific support for communication technologies such as RMI for the Java platform. NET Platform remoting)
Technologies that support cross-platform communication (such as HTTP Rest, thrift, etc.)
From the invocation process, it is divided into:
Synchronous communication calls (synchronous RPC)
Asynchronous communication calls (MQ, asynchronous RPC)
several common ways of communication
1. Remote Data sharing (for example: Sharing remote files, sharing databases, etc. to achieve different system communication)
2. Message Queuing
3. RPC (Remote Procedure Call)
Serialization/Deserialization
Only binary data can be transmitted over the network, and the definition of serialization and deserialization is:
The process of converting an object into a binary stream is called serialization,
The process of replacing binary streams with objects is called deserialization.
Common communication Technologies in the Java and. NET Platforms
The support in Java includes:
Technology |
Brief introduction |
Whether to support cross-platform |
Corbra |
90-generation products have been eliminated |
Not supported |
Rmi |
EJB ERA product, has been gradually eliminated |
Not supported |
WebService |
Based on HTTP SOAP, inefficient and gradually eliminated |
Support |
Hessain |
HTTP-based, binary serialization, high efficiency, wide use |
Support |
Rest (spring MVC, etc.) |
Support HTTP Rest, widely used in wireless API, open platform, etc. |
Support |
JMS, open source MQ |
Java Messaging Services (message middleware), using a wide range of |
Support |
Socket |
Based on Mina, Netty (NIO, AIO efficient communication) |
Theoretically supported |
. NET includes the following:
Technology |
Brief introduction |
Whether to support cross-platform |
WebService |
HTTP-based SOAP, low efficiency, gradually eliminated by WCF integration |
Support |
. NET Remoting |
The communication efficiency is fair, the use is complex, gradually by the WCF integration elimination |
Not supported |
WCF SOAP |
Integration of the original WebService, low communication efficiency |
Support |
WCF NET. Tcp |
High communication efficiency, part. NET project Internal service in use |
Not supported |
WCF Rest |
Use less, has been gradually replaced by Web API |
Support |
Web Api |
Support HTTP Rest, widely used in wireless API, open platform, etc. |
Support |
MSMQ, open source MQ |
Microsoft's own messaging middleware or other open source MQ |
Support (except MSMQ) |
Hessain. NET |
HTTP-based, binary serialization, high efficiency, less use |
Support |
Socket |
System communication via Socket network programming |
Theoretically supported |
common RPC technologies and frameworks in the Internet age
Application-level service framework:
Dubbo/dubbox
Zeroice
Grpc
Spring boot/spring Cloud
Basic Communication framework:
Protocol buffers
Thrift
Remote communication protocol:
Rmi
Socket
SOAP (HTTP XML)
REST (HTTP JSON)
Considerations for RPC
Performance
The main factors that affect RPC performance are in several ways:
1. Serialization/deserialization Framework
2. Network protocols, network models, threading models, etc.
Safety
RPC security mainly depends on the authentication and access control support of the service interface.
Cross-platform
Across different operating systems, different programming languages and platforms.
Cross-platform RPC technology and common frameworks
SOAP WebService
Hessian
HTTP Rest
Thrift
GRPC (Protobuffer)
Zero ICE
Message middleware
What is RPC? Popular Science