[zeromq-dev] Worker ranking with MDP (and Titanic)

Jonathan Rice jottorice at gmail.com
Thu Jun 7 05:30:37 CEST 2012


I'm new to 0MQ, so bear with me? ;-) Does anyone have any advice as to how to add ranking of available workers to a setup based on the Majordomo Protocol? The particular situation I'm thinking of is a testing system which would preferentially choose the worker which is predicted to finish the job quickest, based on various attributes of the worker machine (either fixed, or varying, such as machine load).

Clearly, this could be accomplished by adding a new request type to the MDP worker API, so that the broker could query all available workers' rankings before selecting which one to send the job to. Ideally, this would work with the Titanic pattern too, so that the Titanic worker would be returned the best-ranked worker for its request. Still, I hesitate to add to the worker API unless it's really needed. The Titanic pattern is a good example of how functionality can be cleverly implemented within the framework of MDP itself, so I wonder if I'm missing some sort of neat "mmi"-type implementation like that.

Another whole approach to this is to go completely outside of MDP for this functionality, and add a PUB-SUB channel between the broker and the workers. The workers would subscribe to job "advertisements" from the broker, and would then bid for those jobs by returning a self-computed ranking to the broker on another well-known socket (ROUTER?). Then the broker would just select the worker with the best ranking.

Any advice is welcome. Thanks!

-- Jonathan


More information about the zeromq-dev mailing list