Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Replace HTTP RPC Calls With ZeroMQ

DZone's Guide to

Replace HTTP RPC Calls With ZeroMQ

· Integration Zone ·
Free Resource

The new Gartner Critical Capabilities report explains how APIs and microservices enable digital leaders to deliver better B2B, open banking and mobile projects.

HTTP is the most common choice for internal RPC service calls, but you may not have known that you can use ZeroMQ for this and probably get better results.  Here are a few reasons why from this great post on augustl.com:

In summary, the benefits ZeroMQ offers over HTTP are:

  • Multiple concurrent RPC calls over the same TCP connection. With HTTP, you're limited to sequential calls (keep-alive). This is a big one.
  • No manual connection management. This isn't impossible to do with HTTP, and is mostly a library problem, but AFAIK few libraries exist that lets you do this right with HTTP.
  • Supports multiple server processes responding to requests. No HTTP load balancer needed.
  • No manual retry handling. Can stop the server, do a RPC, then start the server, then get a response - the message is queued, instead of delivered directly.

    -- augustl.com


The blog goes on to show you how to take advantage of ZeroMQ RPC service calls with a little bit of Clojure code.

The new Gartner Critical Capabilities for Full Lifecycle API Management report shows how CA Technologies helps digital leaders with their B2B, open banking, and mobile initiatives. Get your copy from CA Technologies.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}