[Twisted-Python] Synchronous byte streaming

Darren Govoni darren at ontrenet.com
Sun Mar 7 10:10:51 EST 2010


Hi,
  I received some great advice in the past about using
Int32StringReceiver to be able to send a reliable message of bytes
from the client to the server without hassling with unordered or partial
messages. Seems to work.

But I have one problem. My client iterates over a file sending 7MB byte
messages to transport.sendString() to a server.
What i see is that the client seems to buffer or wait to send those.
After a few hundred sendStrings() still the server has not received one
message. The result is my client gets throttled bad in terms of disk and
memory. After all my sendString writes, then eventually the server
receives the first message. But my computer is 100% max'd out.  highly
undesirable.

What I want is for each on-the-wire send to complete, before sendString
returns so resources can be managed properly.

Is there _any_ way in Twisted to do this?

thanks for any tips!!

Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100307/9d06698d/attachment.htm 


More information about the Twisted-Python mailing list