[Web-SIG] (sendfile was: PEP222 and python on the server?)

Shannon -jj Behrens jjinux at gmail.com
Fri Jun 10 04:05:24 CEST 2005


(Off topic:)

It's too bad sendfile isn't very consistent among the platforms, and
it's also too bad Python doesn't come with a sendfile module builtin
:-/

-jj

On 6/9/05, Rene Dudfield <renesd at gmail.com> wrote:
> Is not possible to use something like sendfile(2) with wsgi?
> 
> Where you need a socket file descriptor to use it.
> 
> If not, then you can't send files very efficiently.
> 
> 
> On 6/10/05, Phillip J. Eby <pje at telecommunity.com> wrote:
> > At 03:34 PM 6/9/2005 -0700, mso at oz.net wrote:
> > >The only limitation in WSGI I've found is you can't serialize it for IPC
> > >since it contains an open file descriptor.
> >
> > That's quite a generalization there.  First, many WSGI implementations
> > don't have a file descriptor involved.  Second, there are lots of ways to
> > serialize things, including e.g. transmitting file descriptors via
> > Unix-domain sockets.  Third, nothing stops you from reading the data and
> > sending *that* via your IPC mechanism.  Fourth, you can always do IPC via
> > HTTP.  :)
> >
> > But if what you meant was that pickle, marshal, and XML-RPC won't handle
> > some kinds of file-like objects very well, then, yes, and disregard the
> > previous paragraph.  :)
> >
> _______________________________________________
> Web-SIG mailing list
> Web-SIG at python.org
> Web SIG: http://www.python.org/sigs/web-sig
> Unsubscribe: http://mail.python.org/mailman/options/web-sig/jjinux%40gmail.com
> 


-- 
I have decided to switch to Gmail, but messages to my Yahoo account will
still get through.


More information about the Web-SIG mailing list