Home > Software design >  Can gRPC be used to write realtime applications like multiplayer games?
Can gRPC be used to write realtime applications like multiplayer games?

Time:01-15

Lately, I've been reading about Google's gRPC. And I am wondering if it's a good choice for a real-time application like a multiplayer game.

For instance, can we build a game server with gRPC for a real-time multiplayer game?

CodePudding user response:

You can, however, real-time multiplayer games usually prefer UDP over TCP for streaming because TCP can have a lot of latency due to features like reordering and packet acknowledgement.

gRPC run uses HTTP/2 which used TCP, which would make it unsuited in some cases.

This however doesn't stop you from using protocol buffers which is the message serialization used by gRPC, if that is a feature you like.

  •  Tags:  
  • Related