Hello,
I have been looking into your implementation of XMLRPC,
and I
wish the library could be easily subclassed to support
execution of
methods in multiple threads. As far as I could see by
looking at the
source code, nonblocking I/O helps when the request is
being read,
but once a request is complete, the server code blocks
while the
method is executed. Not all calls are expected to
finish within
fractions of seconds (especially if they involve
database accesses),
so it would be a big win if the classes provided hooks
to plug in
implementations of threads in order to execute the
server methods.
No actual code to invoke threads should be included,
since the code
is heavily OS-specific (POSIX threads vs. Win32
threads, etc.).
Thanks in advance,
Alex Villacís Lasso
avillaci@ceibo.fiec.espol.edu.ec
Logged In: YES
user_id=42402
Hi,
You may want to check out this thread from the help forum:
http://sourceforge.net/forum/forum.php?
thread_id=813645&forum_id=240495
I am currently working on a multithreaded server
implementation, including a portable (win32 + posix) thread
api (similar to the simple socket api in XmlRpcSocket).
My current stumbling block is scalability. The approach
taken by peter in the thread I referenced above is simple to
implement, but since it assigns each client connection to a
separate thread, I worry that a sudden burst of connections
would generate bunches of threads (or block waiting for a
thread to free up - its not clear what his implementation does
since he didn't include the threading code).
I would prefer to create a fixed size thread pool and distribute
the connections among them. But I need a portable way to
interrupt a thread waiting on IO from its existing connections
in order to notify it of a new connection... Ideas welcome.
Chris