[Twisted-Python] Question: Resuming a failed TCP transfer
Hi, I'm wondering, is there some built-in Twisted functionality (or any other existing implementation using Twisted) for doing resumable/disruption tolerant file transfer? Sample scenario: A sends file to B, session fails for whatever reason. B saved whatever data was received in some temporary structure, and knows to resume transfer from where it left off or alternatively request specific chunks that it is missing. Wanted to know this before I start implementing such functionality on my own. Thanks! Nadav
On Sun, 2008-05-18 at 18:47 -0400, Nadav Aharony wrote:
I'm wondering, is there some built-in Twisted functionality (or any other existing implementation using Twisted) for doing resumable/disruption tolerant file transfer?
Sample scenario: A sends file to B, session fails for whatever reason. B saved whatever data was received in some temporary structure, and knows to resume transfer from where it left off or alternatively request specific chunks that it is missing.
Wanted to know this before I start implementing such functionality on my own.
Yes, that's what the client factory is for - to store data that needs to last beyond the life of a single connection. For example see infrastructure used by twisted.web.client.downloadPage for resumable downloads.
Itamar Shtull-Trauring wrote:
On Sun, 2008-05-18 at 18:47 -0400, Nadav Aharony wrote:
I'm wondering, is there some built-in Twisted functionality (or any other existing implementation using Twisted) for doing resumable/disruption tolerant file transfer?
Sample scenario: A sends file to B, session fails for whatever reason. B saved whatever data was received in some temporary structure, and knows to resume transfer from where it left off or alternatively request specific chunks that it is missing.
Wanted to know this before I start implementing such functionality on my own.
Yes, that's what the client factory is for - to store data that needs to last beyond the life of a single connection. For example see infrastructure used by twisted.web.client.downloadPage for resumable downloads.
This is exactly what I was looking for, thanks! Can I safely assume that the part that was initially received is all contiguous and correct? (if so this would be because of the TCP CRC check for each packet, right?) -Nadav
participants (2)
-
Itamar Shtull-Trauring
-
Nadav Aharony