TPCServer and xdrlib
Nick Craig-Wood
nick at craig-wood.com
Tue May 20 04:30:05 EDT 2008
Henrique Dante de Almeida <hdante at gmail.com> wrote:
> On May 19, 10:28?am, Laszlo Nagy <gand... at shopzeus.com> wrote:
> > I cannot predict "acceptable speed" requirements, but I can tell that
> > there will be some clients downloading 100MB report files from the
> > server, so I presume that I will need a progress bar. I think that I
> > need to develop my own protocol for this, and probably the underlying
>
> Okay, so you need to wrap large binary files in some kind of message,
> without pre processing them. I think developing your own protocol
> using XDR is a safe bet.
You might want to consider using netstrings rather than XDR
http://cr.yp.to/proto/netstrings.txt
They are very simple and would be minimal overhead if all you are
passing is a file and a bit of metadata.
You'll find several modules for python with a bit of searching. Also
I believe twisted supports them directly or you could easily roll your
own.
--
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
More information about the Python-list
mailing list