REST vs GRPC

- gRPC can handle different types of streaming , but REST API can handle unary streaming
- gRPC : Google Remote Procedure Call
- REST : Representational State Transfer

Types of streaming

  • Unary : Client sends single request and recieves single response
  • Client streaming : Client sends stream of messages and recieves single response message
  • Server streaming : Server responds with stream of messages to client’s request.Once all data is sent , server additionally delivers status message to complete the process Once all data is sent ,
  • Bi-directional streaming : 2 streams (client and server) are independent , they both can transmit message in any order

Image credits to ImaginaryCloud

For more details and clear understanding on gRPC vs REST , please visit ImaginaryCloud