I'm new to Twisted and really enjoying the event driven approach, especially with the availability of in-line callbacks to avoid callback hell.  So thanks to all of you who have worked on Twisted.

The program I'm writing uses AMP for peer to peer communication. I like AMP because it's natively asynchronous, has multi-language support, and efficient, not wasting resources on HTTP headers, etc.  There are times when I need to send files, 1-2 MB over the connection.  AMP provides a binary type, but it's limited to 64k, so I'd have to split the files up and make 16+ calls to transfer a single file.  So I need to switch to a more appropriate (not yet determined) protocol for the transfer, and then back to AMP.  AMP provides a protocol switch command, which is great, but then I'd need to switch back to AMP and I have no idea what approach to take here.  It  doesn't help that I don't have a file transfer protocol selected.

Speaking of file transfer protocol , Twisted's FTP seems like overkill for my simple scenario, though if I could harness the functionality I need, I'd use it.  I've also read up on Twisted's Producer/Consumer approach, which I'm thinking if I have to roll my own, this is the path I should take.  However, I surely can't be the first person in more than a decade to want to transfer a file while speaking AMP.

So, how do I switch back from a file transfer protocol to AMP and what existing protocol, if any, should I use for the transfer?

Thanks so much.

-Randall


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to