- Unary API
- Server Streaming API
- Client Streaming API
- Bi-directional Streaming API
Showing posts with label API Types. Show all posts
Showing posts with label API Types. Show all posts
gRPC enables to build 4 different kinds of APIs where you can build using traditional RESTful framework. These features are a game changer for microservices implementation. Currently we are using RESTful architecture to build our APIs for microservices. But there is a lot of overhead while building APIs uisng REST with JSON. Since JSON data format is good for small volume of data. But for huge volumes JSON is a hell. JSON is a text document, it is good for investigate the data because it is human readable. But parsing takes a huge amount computing resources. What if you have multiple microservices that exchange huge volumes of data. That is gonna be a hell.
gRPC solves the all problems that we faced with REST-JSON by using Protocol Buffers as data exchange format and also protocol buffers can be used to define service definitions and generating service stubs from ready made grpc /protobuf compiler provided by google. These compilers are available for around 14-15 programming languages by the time I write this blog. And also gRPC uses the latest HTTP/2 transport product which allows bi-directional streaming capability.
gRPC provides the following 4 types of APIs
Check the following video to know more about these 4 APIs.