message processing/threads

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan Curran

    #1

    message processing/threads

    I've been thinking about this for a bit and wanted some input as to the design
    of it. The problem is as such:

    I need a program running in the background to process messages (FIFO order)
    which I would send using soap/xmlrpc/pyro (haven't decided yet). According to
    my thinking I would need to make this a threaded application. One thread to
    process the messages and the other thread(s) would be used to listen for
    messages and insert it into the message queue.

    Is my thinking correct? Is there a better way to do such a thing?

    Thanks for any input,

    - Jonathan
  • Aahz

    #2
    Re: message processing/threads

    In article <mailman.3886.1 171258250.32031 .python-list@python.org >,
    Jonathan Curran <jonc@icicled.n etwrote:
    >
    >I need a program running in the background to process messages (FIFO order)
    >which I would send using soap/xmlrpc/pyro (haven't decided yet). According to
    >my thinking I would need to make this a threaded application. One thread to
    >process the messages and the other thread(s) would be used to listen for
    >messages and insert it into the message queue.
    >
    >Is my thinking correct? Is there a better way to do such a thing?
    Well, that's one option. Your other two options are to implent your
    program with multiple processes or to use event-loop programming. Your
    basic design looks reasonably sound, though you might consider multiple
    threads to process messages (which probably won't provide any performance
    boost but could enhance response if you're using callbacks at all).
    --
    Aahz (aahz@pythoncra ft.com) <* http://www.pythoncraft.com/

    "I disrespectfully agree." --SJM

    Comment

    • fumanchu

      #3
      Re: message processing/threads

      On Feb 11, 9:30 pm, Jonathan Curran <j...@icicled.n etwrote:
      I need a program running in the background to process
      messages (FIFO order) which I would send using
      soap/xmlrpc/pyro (haven't decided yet). According to
      my thinking I would need to make this a threaded
      application. One thread to process the messages
      and the other thread(s) would be used to listen for
      messages and insert it into the message queue.
      You just described a threaded HTTP server ;) (although they aren't
      strictly FIFO). If you did decide on SOAP or XML-RPC, feel free to
      grab CherryPy instead of writing your own listener. http://www.cherrypy.org


      Robert Brewer
      System Architect
      Amor Ministries
      fumanchu@amor.o rg

      Comment

      • Irmen de Jong

        #4
        Re: message processing/threads

        Jonathan Curran wrote:
        I need a program running in the background to process messages (FIFO order)
        which I would send using soap/xmlrpc/pyro (haven't decided yet). According to
        my thinking I would need to make this a threaded application. One thread to
        process the messages and the other thread(s) would be used to listen for
        messages and insert it into the message queue.
        >
        Is my thinking correct? Is there a better way to do such a thing?
        For your interest:
        Pyro includes a "server" by itself that takes care of all of this.


        --Irmen

        Comment

        • joncfoo@gmail.com

          #5
          Re: message processing/threads

          Thank you all for your input. I now have some new ways that I need to
          look into and see what fits best.

          Thanks once again,

          Jonathan

          Comment

          Working...