How to be reactive with gRPC
gRPC is a modern RPC framework that avoids the main errors from the past (SOAP, REST, …). It is both fast and asynchronous, supports streaming and a wide variety of languages (java, c, go, js, …). Although not on the official list of programming languages, Scala is well supported thanks to the excellent ScalaPB library, which in addition offers the possibility to plug-in its own code generators. This is a great feature as it allows to develop new interfaces for gRPC (e.g akka-stream, Monix). Akka-streams (and monix) are reactive abstractions that propagates back-pressure up to the source. Unfortunately gRPC-java callbacks mechanism doesn’t seem to provide anything of this sort (see the StreamObserver interface) but if you scratch the surface you’ll see that back-pressure is actually present right at the heart of gRPC which makes it possible to build truly reactive gRPC applications in Scala.