What is the difference between the net / rpc package of the Golang system and gRPC?

gRPC is a "common RPC infrastructure" that uses ProtoBuffer to serialize and deserialize, while the net / rpc package seems to be able to do "almost" the same thing with encoding / gob , and both are under Google auspices.
So what's the difference between the two? What are the pros and cons of choosing one of them?

+4
source share
1 answer

Ok, you said it yourself. gRPC is an environment in which RPC is used for communication. RPC is not Protobuf , but instead Protobuf can use RPC , and gRPC is actually Protobuf over RPC.

You do not need to use Protobuf to create RPC services in your application. This is a good idea if you are building small to medium sized libraries / applications. Also, you do not need to learn Protobuf syntax to create your services.

Protobuf , , , REST. Protobuf. , Protobuf , Go. , - Java, Protobuf RPC , net/rpc, ( Go Java)

, Protobuf . .

0

Source: https://habr.com/ru/post/1651754/


All Articles