Thanks Roberto. I noticed this thread:
lists.unbit.it/pipermail/uwsgi/2011-August/002477.html You mentioned that reading from environ['wsgi.input'] blocks, so what's the recommended way to do make slow & large file uploads go async? My projects mainly use Django but it's acceptable to use another WSGI app for the uploading part. On Fri, Mar 8, 2013 at 12:08 AM, Roberto De Ioris <[email protected]> wrote: > > > Hi guys, > > > > so I am writing a django service accepting large, slow file uploads, this > > process is blocking so I want to go async. > > > > 1. server accepts connection, read a chunk of uploaded data > > 2. calculate the chunk md5 hash > > 3. establish a connection to Amazon S3 and start upload the chunk > > > > Loop the 1, 2, 3 steps, and I want as soon as the file upload is complete > > retuern response saying OK and continue step 2 and 3 if unfinished. > > > > After all done write the file md5 hash and s3 URL to database. > > > > So should I use uWSGI's Gvent plugin, or should I use uWSGI's async > > feature? Or other suggestions? > > The gevent plugin is the one having the biggest user base and is the more > solid. > > The plain async mode could make your development harder for a little gain. > > > > > Could all of this be done in a django view function instead of writing a > > separate WSGI app? > > if you use all gevent-friendly library you can safely write code in your > view. > > > > > Thanks in advance! > > > > btw anyone know an async Amazon S3 libraray? Should I just Gevent monkey > > patch Boto? > > > > boto is a another popular choice > > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
