message processing/threads

J

Jonathan Curran

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
 
A

Aahz

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).
 
F

fumanchu

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
(e-mail address removed)
 
I

Irmen de Jong

Jonathan said:
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
 
J

joncfoo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,183
Latest member
OrderGlycoEase

Latest Threads

Top