libzutil

Rationale

We need a layer just above libzmq which provides utility functions (including functions that have been dropped from 3.0). This should be in C/C++ to allow performance in slower languages. Making this a separate project allows it to evolve faster than libzmq, who's API is frozen for long periods.

Technical requirements

  • Must be portable to all platforms that libzmq runs on.
  • Must be written in C or C++ for performance (I'd prefer C since it's more accessible).

Functional requirements

  • Provide a set of devices, listed below.
  • Provide a set of clock and timer functions (which aren't otherwise portable).
  • Provide a thread creation API (which is otherwise not portable).

Devices

  • A switch device that switches messages between a front-end and back-end socket (same as zmq_device(3)). This is used to create forwarders, queues, and streamers.
  • A router device that switches messages in and out of a front-end ROUTER socket, switching addresses during each cross-over.
  • A persist device that stores messages onto a durable disk file, then forwards them. This replaces and extends the SWAP socket option.