Valts Mazurs wrote:
...........
> 
> Any reason you went for processes rather than thread ?
> 
> Robust, stable, no issues with GIL.
> 
......
We run flup+apache+django with many hosts and only had problems when trying to 
run threaded. We are running different virtual machines into the same socket ie 
only one server.

As for the long running process problem the solution seems to be

1) fork an external process that runs the long running part

2) in the parent return a view that queries the long running part (obviously 
you 
need to keep track of the PID etc etc). We have used javascript timeouts to 
call 
back to the server every few seconds.

3) when the long running part finishes any views that are polling the job see 
some kind of end marker and then stop polling.

There are obvious dangers here.

First off you don't want to be rerunning the jobs that are already running so 
some kind of queue might be useful.

Secondly you really ought to kill running jobs for which no query has been 
received recently.

Finally you ought to limit the resources consumed by the background jobs to 
keep 
the server response time reasonably fast.
-- 
Robin Becker

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to