Protocol buffers
Posted on August 16, 2020
(Last modified on August 27, 2020)
| 3 minutes
| Kinshuk Chandra
Intro Protobuf (or Protocol Buffers) is a language-agnostic and platform-neutral serialization format invented at Google. Each protocol buffer message is a small logical record of information, containing a series of name-value pairs.
Unlike XML or JSON, here you first define the schema in a .proto file. They are a format like JSON but simpler, smaller, strictly typed, understandable only from the client to the server and faster to Marshall/Unmarshall. For example:
[Read More]Why use gRPC?
Posted on August 16, 2020
(Last modified on August 26, 2020)
| 1 minutes
| Kinshuk Chandra
With gRPC we can define our service once in a .proto file and implement clients and servers in any of gRPC’s supported languages, which in turn can be run in environments ranging from servers inside Google to your own tablet - all the complexity of communication between different languages and environments is handled for you by gRPC. We also get all the advantages of working with protocol buffers, including efficient serialization, a simple IDL, and easy interface updating.
[Read More]Challenges with gRPC
Posted on August 16, 2020
(Last modified on August 23, 2020)
| 1 minutes
| Kinshuk Chandra
Challenges with gRPC You should bear in mind that whilst gRPC does allow you to utilize these newer bits of technology, it is more challenging prototyping a gRPC service due to the fact that tools like the Postman HTTP client cannot be used in order to easily interact with your exposed gRPC service.
You do have options that make this possible, but it’s not something that’s readily available natively. There are options to use tools such as envoy to reverse proxy standard JSON requests and transcode them into the right data format but this is an additional dependency that can be tricky to set up for simple projects.
[Read More]gRPC vs Rest
Posted on August 16, 2020
(Last modified on August 26, 2020)
| 1 minutes
| Kinshuk Chandra
Whilst REST and gRPC are somewhat similar, there are some fundamental differences in how they work that you should be aware of.
gRPC utilizes HTTP/2 whereas REST utilizes HTTP 1.1 gRPC utilizes the protocol buffer data format as opposed to the standard JSON data format that is typically used within REST APIs. This provides us with strong schema and backward compatibility. With gRPC you can utilize HTTP/2 capabilities such as server-side streaming, client-side streaming or even bidirectional-streaming should you wish.
[Read More]gRPC Introduction
Posted on August 16, 2020
(Last modified on August 27, 2020)
| 1 minutes
| Kinshuk Chandra
So, before we dive in, we first need to understand what gRPC is, how it works and so on.
Definition - gRPC is a modern, open source remote procedure call (RPC) framework that can run anywhere
Remote Procedure Calls are something that we use within distributed systems that allow us to communicate between applications. More specifically, it allows us to expose methods within our application that we want other applications to be able to invoke.
[Read More]