[zeromq-dev] STREAM_UPSTREAM/DOWNSTREAM confusing?
sustrik at 250bpm.com
Fri Jun 11 19:42:29 CEST 2010
> In re: patterns UPSTREAM and DOWNSTREAM are a bit ambiguous, e.g. some
> folks think "the packets will go DOWNSTREAM" vs. UPSTREAM. I know we're
> back to the verb/noun/adverb/whatever argument, but if you have to think
> about it...
> I've quit trying and am using the following (less poetic) #defines instead:
> #define ZMQ_STREAM_SOURCE ZMQ_DOWNSTREAM
> #define ZMQ_STREAM_SINK ZMQ_UPSTREAM
> IMO this makes the code a bit more readable at a glance.
> (And food for thought re: the 0MQ 3.x API :-) )
Yes. UPSTREAM and DOWNSTREAM aren't great names.
One great idea was proposed by Martin Lucina and Pieter Hintjens -- that
there would be just a single socket type instead of these two and that
it would receive from upstream and send to downstream.
Unfortunately, there's no way to specify whether calls to zmq_bind and
zmq_connect and zmq_bind are to be associated with incoming data vs.
More information about the zeromq-dev