Going real time with gRPC streaming in NestJS
gRPC is an open-source remote procedure call framework, created by Google in 2016. Remote procedure call means that with the gRPC protocol, built upon HTTP/2, we can execute a method from another machine or computer, as if we were running it locally. The fact that it is using HTTP/2 instead of HTTP/1.1 makes a significant performance boost, since it allows multiple streams of messages over a single long-lived TCP connection, and provides support for features like multiplexing, headers compression, and bi-directional streaming. This leads to reduced latency when communicating between different services.
gRPC uses Protocol Buffers as a language-agnostic mechanism for serializing structured data, offering efficient and compact data encoding. Compared to JSON, as a standard way of exchanging data on the web, Protocol Buffers are much faster and easier to decode and store on a server. Also, gRPC can help us when building type-safe APIs...