
0mq is a tcp protocol whereas gRPC is HTTP with a binary payload.0mq's documentation must be read to throughly understand the technology and is more of a higher lift. Again you could get slick and front-end the 0mq service with a HTTP/1.1 webserver that the load balancer reads from.īoth are well documented. 0mq is a tcp connection which means that a load balancer would likely check a 'socket connect' in tcpmode to verify the connection.

This isn't a huge big deal, however, because you can tie the health check to a HTTP/1.1 service which the load balancer calls. GRPC has a health check support ( ) but because it's HTTP/2 you'd have to have a HTTP/2 load balancer to support the health check. gRPC supports putting metadata in the message ( ) which will allow you to 'route' a message into a queue that a 'pub-sub' connection could pull from. In gRPC the same sort of topology could be created with a 'pub-sub' like connection over a stream. This is trivially done in 0mq and there are a number of topologies that support stuff like this ( ). 'Routing' essentially means that a message gets from A to B via some broker. For 0mq you can setup a simple REQ-REP connection which is basically a synchronous communication path, or you can create async ROUTER-DEALER type topologies.

Basically gRPC allow for typical HTTP synchronous request/response or a 'websocket-like' bidirectional streaming.
#Mpi vs grpc vs rest how to#
async req / res communication (inproc or remote) between nodesīoth libraries allow for synchronous or asynchronous communication depending on how to implement the communication.
