title: Python, Using Remote Managers and Multiprocessing
body: <p>I want to use the remote manager functions in the <code>multiprocessing</code> module to distribute work among many machines.  I know there are 3rd party modules, but I want to stick with core as much as possible.  I know for desktop (single machine), you can use the <code>multiprocessing.Pool</code> class to limit the number of CPUs, but have a couple of questions with remote managers.</p>
  
  <p>I have the following code for the remote manager:</p>
  
  <pre><code>   from multiprocessing.managers import BaseManager
     import Queue
     queue = Queue.Queue()
     class QueueManager(BaseManager): pass
     QueueManager.register('get_queue', callable=lambda:queue)
     m = QueueManager(address=('', 50000), authkey='abracadabra')
     s = m.get_server()
     s.serve_forever()
  </code></pre>
  
  <p>This works great, and I can even submit a job into the Queue using the following code:</p>
  
  <pre><code>QueueManager.register('get_queue')
  m = QueueManager(address=('machinename', 50000), authkey='abracadabra')
  m.connect()
  queue = m.get_queue()
  queue.put('hello')
  </code></pre>
  
  <p>You can also the <code>queue.get()</code> to get a single entry in the queue.</p>
  
  <ol>
  <li>How do you get the items in the queue?  When I tried to iterate through the queue, I enter an infinite loop.</li>
  <li>On the workers, can you limit each machine to 1 job per machine?</li>
  <li>Since this method seems to be a pull method, where the workers need to examine if a job exists, can there be a push method where the multiprocessing server can be triggered?</li>
  </ol>