Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Cooperatively reading/writing a request/response in Django
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Roberto De Ioris  
View profile  
 More options Oct 17 2012, 2:42 pm
From: "Roberto De Ioris" <robe...@unbit.it>
Date: Wed, 17 Oct 2012 20:41:58 +0200
Local: Wed, Oct 17 2012 2:41 pm
Subject: Re: [gevent] Cooperatively reading/writing a request/response in Django

> Hello.

> I have a Django application that does uploads and downloads of files.
> Since these are slow requests, I don't want a thread or a process per
> request, so I was thinking of using greenlets.

> I have setup a uWSGI server with the Gevent loop, and I can do long
> polling requests just fine. I wait for a Gevent.Event and the thread
> switches to another greenlet which handles other requests meanwhile. The
> problem is that it seems read()s from the Django request object are not
> cooperative, as also response writes. Is there anyway to make these
> cooperative as well?

> Thanks,
> André Cruz

Be sure to not have post-buffering option in your uWSGI config. Buffering
request body to disk is not async in uWSGI.

--
Roberto De Ioris
http://unbit.it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.