FIle transfer over network - with Pyro?
Dan Stromberg
strombrg at gmail.com
Thu Jun 3 14:58:17 EDT 2010
On Jun 3, 10:47 am, Nathan Huesken <pyt... at lonely-star.org> wrote:
> Hi,
>
> I am writing a network application which needs from time to time do
> file transfer (I am writing the server as well as the client).
> For simple network messages, I use pyro because it is very comfortable.
> But I suspect, that doing a file transfer is very inefficient over
> pyro, am I right (the files are pretty big)?
>
> I somehow need to ensure, that the client requesting a file transfer is
> the same client getting the file. So some sort of authentication is
> needed.
>
> What library would you use to do the file transfer?
> Regards,
> Nathan
I've never used Pyro, but for a fast network file transfer in Python,
I'd probably use the socket module directly, with a cache oblivious
algorithm:
http://en.wikipedia.org/wiki/Cache-oblivious_algorithm
It doesn't use sockets, it uses files, but I recently did a Python
progress meter application that uses a cache oblivious algorithm that
can get over 5 gigabits/second throughput (that's without the network
in the picture, though if it were used on 10 Gig-E with a suitable
transport it could probably do nearly that), on a nearly-modern PC
running Ubuntu with 2 cores It's at:
http://stromberg.dnsalias.org/~strombrg/gprog/ .
For a simple example of using sockets in python (without a cache
oblivious algorithm, unfortunately), you could glance at this:
http://stromberg.dnsalias.org/~strombrg/pnetcat.html
HTH :)
More information about the Python-list
mailing list