Is it possible to use gRPC protobuf along with Spring webflux?

Viewed 4780

I am new to Spring webflux as well as protobuf. I have been reading some stuff and I have found some similarities between them. Like

  • Spring webflux could be deployed over netty so does gRPC.
  • Both work good for streaming data.
  • Both these frameworks are somewhat based on Observer design pattern, supporting even based data processing approach.

However, still I am not able to find any example out there which combines the power of webflux (reactive programming), gRPC (faster data coding and decoding) and Spring (dependency injection). Are those not compatible?

1 Answers

They are compatible (sort of) and I've been using them together in multiple projects, but recently I switched all machine to machine reactive calls to RSocket (TCP transport) which fits nicely with the Spring Reactor ecosystem.

For reactive gRPC adapter take a look at Salesforce project: reactive-grpc

Also see the comparison between these two techs: rsocket-vs-grp

Related