Python SOAP and XML-RPC performance extremely low?

J

Jack

When I try TooFPy with the SOAP and XML-RPC sample client code
provided in TooFPy tutorials, a log entry shows up quickly on web server
log window, but it takes a long time (5 seconds or longer) for the client
to output a "Hello you." It seems like the web server is fast because the
log
entry shows immieidately on web server console. But it takes Python XML/SOAP
parser a long time to parse the extremely simple result. If so, wouldn't
this
render Python SOAP and XMP-RPC implementation useless in real life?
 
S

skip

Jack> When I try TooFPy with the SOAP and XML-RPC sample client code
Jack> provided in TooFPy tutorials, a log entry shows up quickly on web
Jack> server log window, but it takes a long time (5 seconds or longer)
Jack> for the client to output a "Hello you."

For XML-RPC are you using sgmlop or some other accelerator? If not, you
might want to consider it.

Skip
 
B

Boris Borcic

Jack said:
When I try TooFPy with the SOAP and XML-RPC sample client code
provided in TooFPy tutorials, a log entry shows up quickly on web server
log window, but it takes a long time (5 seconds or longer) for the client
to output a "Hello you." It seems like the web server is fast because the
log
entry shows immieidately on web server console. But it takes Python XML/SOAP
parser a long time to parse the extremely simple result. If so, wouldn't
this
render Python SOAP and XMP-RPC implementation useless in real life?


5 secs looks really huge to just parse an "extremely simple" message. I'd rather
suspect some sort of timeout delay.
 
F

Fredrik Lundh

Jack said:
When I try TooFPy with the SOAP and XML-RPC sample client code
provided in TooFPy tutorials, a log entry shows up quickly on web server
log window, but it takes a long time (5 seconds or longer)

okay, 5 seconds...
No, I'm not using any accelerator. The code is extremely simple (from
toofpy):

# XML-RPC test
import xmlrpclib
srv = xmlrpclib.Server('http://localhost:4334/RPC2/greeting')
print srv.greeting('you', 5)

and a "5" as the second argument in the greeting call. I wonder what
that does ? ;-)

(if you need a hint, look for "waits the given number of seconds" on
this page:

http://pyds.muensterland.org/wiki/toolserverframeworkforpythonquickstartguide.html

)

</F>
 
J

Jack

Ha! Thanks Fredrik for the big hint :) I wasn't careful when reading that
page.
Was in too much of a hurry to try the code :)
 
S

skip

Jack> No, I'm not using any accelerator. The code is extremely simple
Jack> (from toofpy):
...

To use sgmlop, just download and install it. Your code doesn't need to
change. The xmlrpclib module detects its presence and uses it
automatically.

As someone else noted though, a five-second delay for such a small example
doesn't seem to be an XML-RPC problem. A simple round-trip to my XML-RPC
server running on the localhost takes about 5 *milli*seconds. That's with
sgmlop installed, but even without it, I can't imagine it taking more than
50-100 ms.

Skip
 
F

Fredrik Lundh

As someone else noted though, a five-second delay for such a small example
doesn't seem to be an XML-RPC problem. A simple round-trip to my XML-RPC
server running on the localhost takes about 5 *milli*seconds.

even if the service you're connecting is waiting 5 seconds before it
sends the response ? ;-)

</F>
 
S

skip

Fredrik> even if the service you're connecting is waiting 5 seconds
Fredrik> before it sends the response ? ;-)

Well, yeah I suppose that might have an effect. ;-) I saw your earlier
response about a minute after I responded...

Skip
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top