ruby - Streaming web uploads to socket with Rack -


i have sinatra app running in fcgi handler. want write handler sit within rackup file (probably in front of sinatra app) , stream big file uploads server via sockets (without buffering on disk first) , in interlock request. kind of stream-decode-send workflow without param preparsing. i've read somewhere there problem because due way rails team wants see middleware pipeline uploads in rack have been made rewindable implies upload buffered, not cannot provide upload progress within rack have buffer file on disk , send downstream.

is there cross-backend solution ties request loop of webserver rack responder , not force rewinding on input (and not force in-memory buffering of upload absolute stupid madness)? current approaches kind of problem?

you right: rack spec mandates rewindable input, implies buffering. seems rack not tool job.

you may want try fastcgi, indeed allow non-buffered streaming. or maybe java servlet. 2¢: need it? if not, don't worry, disk space cheap. if so, need in ruby?

edit: mongrel::httprequest not support unbuffered large streaming inputs (without monkeypatching)


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -