C Python Network Performance

2007-07-11 Thread GM M
Hello, I am writing an application bulk of which is sending and receving UDP data. I was evaluating which language will be a better fit for the job. I wrote following small pieces of code in Python and C respectively: from socket import * import sys if __name__ == '__main__': s = socket(AF

Re: Network performance

2005-08-24 Thread Richie Hindle
[Roland] > The client sends a number of lines (each ending with \n) and ends one > set of lines with a empty line. > [...] > I was surprised to find that the performance was [poor]. Are you sending all the lines in a single packet: >>> sock.send('\n'.join(lines)) or sending them one at a time

Re: Network performance

2005-08-23 Thread Roland Hedberg
23 aug 2005 kl. 15.14 skrev Sion Arrowsmith: > Roland Hedberg <[EMAIL PROTECTED]> wrote: > > > The easy solutions are to either change: > > >> def send( self, rdf ): >> self.s.send( rdf ) >> self.s.send( "\n" ) >> > > to > > def send( self, rdf ): > self.s.send( r

Re: Network performance

2005-08-23 Thread Sion Arrowsmith
Roland Hedberg <[EMAIL PROTECTED]> wrote: > [ ... ] >The client sends a number of lines (each ending with \n) and ends one >set of lines with a empty line. >When the client sends a line with only a "." it means "I'm done close >the connection". > >Letting the client open the connection and sen

Re: Network performance

2005-08-23 Thread Roland Hedberg
23 aug 2005 kl. 10.14 skrev Michael Sparks: > Roland Hedberg wrote: > >> I was surprised to find that the performance was equal to what >> Twisted/XMLRPC did. Around 200 ms per set, not significantly less. >> > > That should tell you two things: >* Twisted/XMLRPC is as efficient as you can ha

Re: Network performance

2005-08-23 Thread Michael Sparks
Roland Hedberg wrote: > What the protocol has to accomplish is extremely simple; the client > sends a number of lines (actually a RDF) and the server accepts or > rejects the packet. That's all ! ... > Now, presently I'm using ( why so is a long > history which I will not go into here) and that is

Network performance

2005-08-23 Thread Roland Hedberg
Hi! I need a fast protocol to use between a client and a server, both sides written i Python. What the protocol has to accomplish is extremely simple; the client sends a number of lines (actually a RDF) and the server accepts or rejects the packet. That's all ! Now, presently I'm using