![]() You can read more about how to enable HTTP/2 for REST in these articles: Note that today we can enable HTTP/2 in REST as well, but normally it often goes with HTTP/1.1. ![]() Now, let’s do a quick comparison of gRPC and REST to see their differences.įirst, gRPC uses HTTP/2 which is, as you know, much faster than HTTP/1.1 used in REST by default. We will come back to this later on the hands-on lecture, where we will implement each and everyone of them to get much deeper understanding. That’s a very high-level overview of the 4 different ways of communication in gRPC. It’s very flexible and no blocking, which means no sides need to wait for the response before sending the next messages. This one is the most complex because client and server will keep sending and receiving multiple messages in parallel and with arbitrary order. Similarly, we have server-streaming, where the client sends only 1 request message, and the server replies with a stream of multiple respnoses.Īnd finally, the bidirectional (or bidi) streaming. In this scenario, the client will send a stream of multiple messages, and it expects the server to send back only 1 single response. This looks somewhat similar to the normal HTTP REST API. The simplest one is Unary, where the client sends 1 single request message and the server replies with 1 single response. Gitlab repository: pcbook-go and pcbook-java Github repository: pcbook-go and pcbook-java Here's the link to the full gRPC course playlist on Youtube Welcome back, every one! In this lecture, we will discover some use cases of gRPC and how does it compare to REST.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |