On 9/25/07, Mike Scott <[EMAIL PROTECTED]> wrote:
> It should be threadsafe - [... ] web applications [...] pretty much
> [become] a threaded application

Mike,

There are two issues here.  Thread safe and concurrent operation, and
they are very different issues (though there is overlap).

Django DOES supports concurrent operation (separate processes on the
same or multiple servers).

Django DOES NOT support threaded operation (and from what I've
gathered in past discussions on this list, is not likely to).

This is why Apache must be configured to use the prefork model instead
of the worker model.

In practice this doesn't tend to pose a problem for web deployments.
Both FCGI and Apache are designed so that they can work with non
thread-safe applications.

Where you may run into some difficulty is if you want to make a
multi-threaded backend application.

If you'd like to discuss this issue further, please bring it up on django-users.



> I think more research should be done into this sort of operation

Database locking has been discussed previously on this list and in a
number of related tickets in Trac.  This is currently the recommended
approach for ensuring data integrity in a Django app.  It is, however,
true that there are still some race conditions that require special
attention (get_or_create is one of them).

I agree that there should probably be more information about how to
handle massively parallel web applications, but that's not a
Django-specific concern.  Many web developers don't understand how to
handle these issues, and I haven't found a good resource to point
people toward (suggestions welcome).


I hope this helps to clarify things a bit.

 - Ben

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to