Permalink
Browse files

Fixes to man pages

- Added missing man page for zmq_device(3)
- Removed man pages for undocumented zmq_queue(1), zmq_forwarder(1), zmq_streamer(1)

Signed-off-by: Pieter Hintjens <ph@imatix.com>
  • Loading branch information...
hintjens committed Mar 13, 2011
1 parent eff8491 commit 27f04bd52f2433b9d4ae6b02f535ac7898691a96
View
9 NEWS
@@ -8,6 +8,15 @@ Bug fixes:
* Fix to C++ binding to properly close sockets (Guido Goldstein).
+Changes
+-------
+
+* Added man page for zmq_device(3) which was hereto undocumented (Pieter
+ Hintjens).
+
+* Removed zmq_queue(3), zmq_forwarder(3), zmq_streamer(3) man pages
+ (Pieter Hintjens).
+
0MQ version 2.0.10 (Stable), released on 2010/10/15
===================================================
View
@@ -1,5 +1,5 @@
-MAN1 = zmq_forwarder.1 zmq_streamer.1 zmq_queue.1
-MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_init.3 \
+MAN1 =
+MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_device.3 zmq_init.3 \
zmq_msg_close.3 zmq_msg_copy.3 zmq_msg_data.3 zmq_msg_init.3 \
zmq_msg_init_data.3 zmq_msg_init_size.3 zmq_msg_move.3 zmq_msg_size.3 \
zmq_poll.3 zmq_recv.3 zmq_send.3 zmq_setsockopt.3 zmq_socket.3 \
View
@@ -139,20 +139,12 @@ Local in-process (inter-thread) communication transport::
Devices
~~~~~~~
-Apart from the 0MQ library the 0MQ distribution includes 'devices' which are
-building blocks intended to serve as intermediate nodes in complex messaging
-topologies.
+0MQ provides 'devices', which are building blocks that act as intermediate
+nodes in complex messaging topologies. Devices can act as brokers that other
+nodes connect to, proxies that connect through to other nodes, or any mix of
+these two models.
-The following devices are provided:
-
-Forwarder device for request-response messaging::
- linkzmq:zmq_queue[1]
-
-Forwarder device for publish-subscribe messaging::
- linkzmq:zmq_forwarder[1]
-
-Streamer device for parallelized pipeline messaging::
- linkzmq:zmq_streamer[1]
+You can start a device in an application thread, see linkzmq:zmq_device[3].
ERROR HANDLING
@@ -202,7 +194,7 @@ of the 0MQ community and pointers can be found on the 0MQ website.
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -85,5 +85,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -44,5 +44,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -83,5 +83,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -206,5 +206,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -0,0 +1,138 @@
+zmq_device(3)
+=============
+
+NAME
+----
+zmq_device - start built-in 0MQ device
+
+
+SYNOPSIS
+--------
+*int zmq_device (int 'device', const void '*frontend', const void '*backend');*
+
+
+DESCRIPTION
+-----------
+The _zmq_device()_ function starts a built-in 0MQ device. The 'device' argument
+is one of:
+
+'ZMQ_QUEUE'::
+ starts a queue device
+'ZMQ_FORWARDER'::
+ starts a forwarder device
+'ZMQ_STREAMER'::
+ starts a streamer device
+
+The device connects a frontend socket to a backend socket. Conceptually, data
+flows from frontend to backend. Depending on the socket types, replies may flow
+in the opposite direction.
+
+Before calling _zmq_device()_ you must set any socket options, and connect or
+bind both frontend and backend sockets. The two conventional device models are:
+
+*proxy*::
+ bind frontend socket to an endpoint, and connect backend socket to
+ downstream components. A proxy device model does not require changes to
+ the downstream topology but that topology is static (any changes require
+ reconfiguring the device).
+*broker*::
+ bind frontend socket to one endpoint and bind backend socket to a second
+ endpoint. Downstream components must now connect into the device. A broker
+ device model allows a dynamic downstream topology (components can come and
+ go at any time).
+
+_zmq_device()_ runs in the current thread and returns only if/when the current
+context is closed.
+
+
+QUEUE DEVICE
+------------
+'ZMQ_QUEUE' creates a shared queue that collects requests from a set of clients,
+and distributes these fairly among a set of services. Requests are fair-queued
+from frontend connections and load-balanced between backend connections.
+Replies automatically return to the client that made the original request.
+
+This device is part of the 'request-reply' pattern. The frontend speaks to
+clients and the backend speaks to services. You should use 'ZMQ_QUEUE' with a
+'ZMQ_XREP' socket for the frontend and a 'ZMQ_XREQ' socket for the backend.
+Other combinations are not documented.
+
+Refer to linkzmq:zmq_socket[3] for a description of these socket types.
+
+
+FORWARDER DEVICE
+----------------
+'ZMQ_FORWARDER' collects messages from a set of publishers and forwards these to
+a set of subscribers. You will generally use this to bridge networks, e.g. read
+on TCP unicast and forward on multicast.
+
+This device is part of the 'publish-subscribe' pattern. The frontend speaks to
+publishers and the backend speaks to subscribers. You should use
+'ZMQ_FORWARDER' with a 'ZMQ_SUB' socket for the frontend and a 'ZMQ_PUB' socket
+for the backend. Other combinations are not documented.
+
+Refer to linkzmq:zmq_socket[3] for a description of these socket types.
+
+
+STREAMER DEVICE
+---------------
+'ZMQ_STREAMER' collects tasks from a set of pushers and forwards these to a set
+of pullers. You will generally use this to bridge networks. Messages are
+fair-queued from pushers and load-balanced to pullers.
+
+This device is part of the 'pipeline' pattern. The frontend speaks to pushers
+and the backend speaks to pullers. You should use 'ZMQ_STREAMER' with a
+'ZMQ_PULL' socket for the frontend and a 'ZMQ_PUSH' socket for the backend.
+Other combinations are not documented.
+
+Refer to linkzmq:zmq_socket[3] for a description of these socket types.
+
+
+RETURN VALUE
+------------
+The _zmq_device()_ function always returns `-1` and 'errno' set to *ETERM* (the
+0MQ 'context' associated with either of the specified sockets was terminated).
+
+
+EXAMPLE
+-------
+.Creating a queue broker
+----
+// Create frontend and backend sockets
+void *frontend = zmq_socket (context, ZMQ_XREP);
+assert (backend);
+void *backend = zmq_socket (context, ZMQ_XREQ);
+assert (frontend);
+// Bind both sockets to TCP ports
+assert (zmq_bind (frontend, "tcp://*:5555") == 0);
+assert (zmq_bind (backend, "tcp://*:5556") == 0);
+// Start a queue device
+zmq_device (ZMQ_QUEUE, frontend, backend);
+----
+
+
+SEE ALSO
+--------
+linkzmq:zmq_bind[3]
+linkzmq:zmq_connect[3]
+linkzmq:zmq_socket[3]
+linkzmq:zmq[7]
+
+
+AUTHORS
+-------
+This 0MQ manual page was written by Pieter Hintjens <ph@imatix.com>
+
+
+RESOURCES
+---------
+Main web site: <http://www.zeromq.org/>
+
+Report bugs to the 0MQ development mailing list: <zeromq-dev@lists.zeromq.org>
+
+
+COPYING
+-------
+Free use of this software is granted under the terms of the GNU Lesser General
+Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER`
+included with the 0MQ distribution.
View
@@ -46,5 +46,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -1,33 +0,0 @@
-zmq_forwarder(1)
-================
-
-
-NAME
-----
-zmq_forwarder - forwarding device for publish-subscribe messaging
-
-
-SYNOPSIS
---------
-To be written.
-
-
-DESCRIPTION
------------
-To be written.
-
-
-OPTIONS
--------
-To be written.
-
-
-SEE ALSO
---------
-linkzmq:zmq[7]
-
-
-AUTHORS
--------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
-Martin Lucina <mato@kotelna.sk>.
View
@@ -239,5 +239,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -42,5 +42,5 @@ linkzmq:zmq_term[3]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -85,5 +85,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -76,5 +76,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -50,5 +50,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -52,5 +52,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -44,5 +44,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -61,5 +61,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
@@ -76,5 +76,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
@@ -54,5 +54,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -47,5 +47,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -44,5 +44,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -153,5 +153,5 @@ linkzmq:zmq[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -131,5 +131,5 @@ Your operating system documentation for the _poll()_ system call.
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
+This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and
Martin Lucina <mato@kotelna.sk>.
View
@@ -1,33 +0,0 @@
-zmq_queue(1)
-============
-
-
-NAME
-----
-zmq_queue - forwarding device for request-reply messaging
-
-
-SYNOPSIS
---------
-To be written.
-
-
-DESCRIPTION
------------
-To be written.
-
-
-OPTIONS
--------
-To be written.
-
-
-SEE ALSO
---------
-linkzmq:zmq[7]
-
-
-AUTHORS
--------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
-Martin Lucina <mato@kotelna.sk>.
Oops, something went wrong.

0 comments on commit 27f04bd

Please sign in to comment.