> A web server itself is not a good place to do
> long-running work that isn't being served directly to a browser.

I agree with Ned on this one. If there is some intensive work that
needs to be done, it would best be done by a process separate from the
web server. The web server should write whatever it needs to a
database or to a file and send a quick response back to the user. You
can have a separate process (written in Python, Java, COBOL, whatever
you like) that runs periodically to do the intensive work.

Relying on Javascript for a rather straightforward flow puts business
logic in the user's browser and is probably not the best route. There
are very few cases where Ajax is actually functionally required.

On Sep 15, 8:20 am, Donn <[EMAIL PROTECTED]> wrote:
> > Displaying an html page straight away after the user hits submit
> > (telling the user that they will be notified by email when their job
> > has finished running), whilst running the time-intensive task in the
> > background.
>
> Good job for javascript and Aja[xj]
> Submit the form via something like jQuery and instantly popup a div saying
> things are underway. Then you can use a timed javascript function to pull the
> status from the server.
>
> But this does keep the webserver busy in a loop - and perhaps forking it all
> out to a cronjob and another Python instance is better. That stuff is also
> vague to me.
>
> \d
--~--~---------~--~----~------------~-------~--~----~
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