
Lloyd Carothers <lloyd@passcal.nmt.edu> writes:
For such a use case I'm surprised not to find an example. I think I just need a push in the right direction. Is producers/consumers the right approach? It's a bit dated at this point, but maybe this might spark some ideas: http://twistedmatrix.com/pipermail/twisted-python/2007-July/015738.html
It's producer/consumer, which yes, is very efficient for streaming transfers. The code the post was based on is actually still in active use, but against an older twisted 2.5.0 installation, so I'm not sure how much tweaking it may need to adjust to the latest Twisted version. This looks pretty close to what I need and definitely a good starting
In practice this is paired with a separate set of code that implements a PB-based control channel over which the files to upload are negotiated. Would you be willing to share this as well? The binary transfer itself just has a small header in front of the data containing some authentication and size information, so it's derived from LineReceiver and switches to raw mode for the transfer. While I tend to prefer a separate control channel (though it certainly doesn't need to be PB based), you could also in-line the control information (so it becomes more like an HTTP transfer) if you wished. Gotcha. Maybe this is new since you wrote the above, but is FileSender the
BTW, passive FTP should be quite firewall friendly, unless you're talking about really locked down locations where the only thing allowed out is HTTP or something. But if you're not using passive mode yet, that might also be a quicker fix to your existing code base. Indeed, I use passive mode exclusively as clients often come from NATed nets. Generally FTP works ok but some organizations firewalls do strange
On 10/23/13 7:30 PM, David Bolen wrote: point for me. I can make use of session specific information too, which will be nice. As you've been using it for a while, have you had any issues. Is it robust/stable? producer to use here? Perhaps its not fully developed but should there not also be a compliment FileReceiver to consume the file and write it out? things with that traffic, and even the good connections seem to have sporadic drops which often aren't handled well, at least with proftp.
-- David
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python