grpc node.js
With gRPC, is has made it easier for a client application to directly call a server application on a different machine as if it were a local object. The idea of gRPC is defining the service with methods in the Protobuf file, then the server needs to implement the defined methods, so the client application able to call these services by using the defined methods.
使用gRPC,可使客户端应用程序更轻松地直接在其他计算机上调用服务器应用程序,就好像它是本地对象一样。 gRPC的想法是使用Protobuf文件中的方法定义服务,然后服务器需要实现定义的方法,因此客户端应用程序可以使用定义的方法来调用这些服务。
为什么gRPC比REST好? (Why gRPC is better than REST?)
数据序列化 (Data serialization)
The data transfer in GRPC is using binary format compare to REST that is in text format. GRPC is using protocol buffer to serialize the data., it can help the data to be smaller and faster in comparison to REST which is using plain text that can be huge.
与文本格式的REST相比,GRPC中的数据传输使用二进制格式。 GRPC正在使用协议缓冲区来序列化数据。与使用纯文本的REST相比,它可以帮助数据变得更小,更快。
使用HTTP / 2与HTTP / 1进行比较 (Utilize HTTP/2 compare to HTTP/1)
Although REST can su