Comic | After 40 years, distributed communication is too difficult!

At 11 o'clock in the evening, Zhang Dafang returned home

Suddenly, strange changes occurred in the surrounding time and space

A building called "distributed communications" appeared in front of you


Da Pang Zhang hesitatedly entered the lobby on the first floor

rexec is a command on Unix that can execute programs on remote computers, which is a prototype of distributed communication. However, in the 21st century's view of Zhang Dafang...

Zhang Dafang didn't entangle him, and went straight to the second floor.

Zhang Dapang thinks Stub and Skeleton are really two weird names! They are called Proxy (proxy) so good!

The client and the stub are in the same process, and it sends the request to the stub. 

Stub communicates with Skeleton through the network, and uses the agreed format to send and receive requests. 

This hides the network from the client, just like calling a local method.

But how to generate them two?

Java RMI looks good, but Zhang Dafang also found the drawbacks:

The client and server are closely bound, and any changes to the interface require the new stub to be distributed to the client.

Zhang Dapang feels that Java RMI is a very backward RPC. The Dubbo used in his project is much better than it. Although there are things like Stub and Skeleton, they are hidden and can be dynamically generated in memory. 

Saying goodbye to RPC, Zhang Dafang came to the 3rd floor.

There is an interface on the server side called getUser, and the parameter that needs to be provided is the user ID, which is described in XML:

The data returned by the server can be described as follows:

If you use XML to represent requests and responses, you don't need Stub and Skeleton, just use HTTP and XML directly.

Everything is described in XML , which feels great!

However, Zhang Dafang still felt that something was missing.

Leaving XML-RPC, Zhang Dafang continued to climb the stairs and came to the 4th floor.

Zhang Dapang likes this XML interface description file of User Service very much. As long as you parse it, you can know the method name and parameter name of the interface.

While looking at the interface file, Zhang Dapang was surrounded by three people.

Programmers can use WSDL to describe the interface information of a service, and then register the service provider's information in UDDI, and the client can call this service through the SOAP protocol. 

When Zhang Dapang saw such a succinct name, he felt that the major companies should take the lead in formulating it, as expected.

After turning around on the 4th floor, I found that although there are major company platforms, these WSDL and SOAP are too difficult to use.

Zhang Dapang climbed to the 5th floor

It’s a huge leap from verb to noun, and Zhang Da Pang can’t understand it for a while.

That being said, Zhang Dapang thinks that this method is quite simple and makes full use of the features of HTTP, which is much more refreshing than the Web Service downstairs.

He intends to continue upstairs.

More exciting technical comics , all in the programmers stand up

Guess you like

Origin blog.csdn.net/coderising/article/details/113209247