[zeromq-dev] Binding to TCP port 0
Pieter Hintjens
ph at imatix.com
Thu Jan 26 06:19:47 CET 2012
On Wed, Jan 25, 2012 at 10:05 PM, Martin Lucina <martin at lucina.net> wrote:
> Indeed. In fact, the OP was specifically asking for a use case where he
> could bind an unspecified number of times to port zero, and get zero
> results back. :-)
Pierre may clarify whether "unspecified" is 1, or N > 1.
> Given that an API will stick around for a long time, it is good API
> design process to extrapolate current and possible future use cases
> and arrive at the simplest possible API covering all these use cases.
That road leads to AMQP/1.0. Solve the core majority problem
minimally, period. It is terrible API design (indeed, design in
general) to comingle abstract philosophically potential problems with
real ones and end up with incredibly complex solutions of which people
only use 10%.
Even if (some) users claim to require N, which is unproven here and
IMO inaccurate, it would be necessary to measure the cost of solving 1
vs. the cost of solving N, and measure the value to all users of that
solution. Often solving N is simpler than solving 1. In this case,
it's not. Solving N would satisfy 0.01% of users and make a solution
horrible to 99.9% of users. Quod Erat Demonstrandum.
If anyone on this list needs to bind one socket multiple times to port
0, please do raise a hand.
Not to mention the "binds are synchronous" statement that you seem to
be ignoring in the pursuit of complexity.
-Pieter
More information about the zeromq-dev
mailing list