i just wrote a server and client for xmlrpc test.<br><br>if server and client run in the same machine, everything is fine.<br>but if server and client run in different machine, the speed is unbearably slow.<br>i tried several times, and the approx time is about
18.5 sec to invoke server.test() 5 times.<br>i had turned off the firewall in windows before running those tests.<br><br>but what interesting is, if i run the server in a FreeBSD machine, the speed boosts up<br>to less than 1 sec to invoke
server.test() 5 times. approx 20 times faster.<br><br>any suggestions? thanks in advance.<br><br>here is my source code.<br><br>############# server.py #############<br>from SimpleXMLRPCServer import SimpleXMLRPCServer<br>
import SocketServer<br><br>port = 31281<br><br>a = 1<br><br>def test():<br> global a<br> a += 1<br> print a<br> return a<br><br>def main():<br> # Create server<br> print 'listening at port', port
<br> server = SimpleXMLRPCServer(("", port))<br> server.register_introspection_functions()<br><br> server.register_function(test)<br><br> server.serve_forever()<br><br>if __name__ == '__main__':
<br> main()<br><br><br><br>############# client.py #############<br clear="all">import xmlrpclib<br>from datetime import datetime<br><br>server = xmlrpclib.Server("http://%s:%d" % ('<a href="http://192.168.0.92">
192.168.0.92</a>', 31281))<br>start = datetime.now()<br>print server.test()<br>print server.test()<br>print server.test()<br>print server.test()<br>print 'total: ', datetime.now() - start<br><br>-- <br>Best Regards,
<br>Leo Jay