rpc framework

 1. Including service providers and service callers

 

Service caller: 

Proxy layer:

Generate an object by passing the corresponding interface through the dynamic proxy of the rpc framework. The object is not directly invoked to call the method of the real class, but encapsulated by serialization, sending information to the server through the network , the server receiving the information, using the reflection mechanism, calling the method and returning the result.

 

Serialization layer: 1 serialize parameters into messages, 2 deserialize

 

Communication layer: 1. Communicate messages to the producer server, 2. Reflect the generated objects according to the returned messages

 

service provider

 

Proxy layer:

To initialize the container, the service needs to be registered, and the registered service needs to be called by reflection.

 

The serialization and communication layers are the same as above.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326600131&siteId=291194637