flux-framework/flux-core — pull request #121 by garlick (2014-12-15 21:12:55+00:00)
Title: broker: modify routing for two special cases

This PR implements two minor changes to routing in the broker:
* If a request is addressed to rank 0, route the request via the primary TBON instead of the ring. This change is compliant with the current RFC 3. It improves latency for a common case. Without this, messages could only be sent to rank 0 via the high latency ring, or by threading them through each instance of a comms module in the TBON tree.
* If a request is addressed to a service other than `cmb` on the same rank (e.g. with nodeid set to the local rank, not FLUX_NODEID_ANY), allow it to be looped back. This will require a change to RFC 3. It permits comms modules that both produce and consume messages of a partiular type to leverage the broker's request handling to avoid internal queuing or clean up code paths.

Both of these changes will be useful in reworking the module management module (modctl).

Tests were added to verify this behavior.

A PR for RFC 3 will follow.