Pythonic way of web-programming
Jp Calderone
exarkun at intarweb.us
Sun Apr 6 18:41:11 EDT 2003
On Sun, Apr 06, 2003 at 07:01:35PM +0000, Neil Schemenauer wrote:
> Graham Fawcett <graham__fawcett at hotmail.com> wrote:
> > [...] what kinds of applications? We are talking only about
> > Web application frameworks, which are request handlers and are
> > therefore event-driven by definition.
>
> For example, we have a web application that interacts with
> FedEx's servers in order to create new shipping labels, track
> packages, etc. With an event driven system, waiting for a
> response for FedEx would freeze the entire server. Obviously
> that can be fixed the hooking into the event loop. It's just a
> matter of programming, right?
>
Hmm, you point this out as a problem, then say it is easily fixable. I'm
not sure what point you're trying to make here.
> Another example: we have an application that does some CPU
> intensive operations. We have multiple CPUs in our server. An
> event driven system would not (normally) take full use of the
> processors. Also, clients who have IO bound requests would be
> blocked by one CPU bound request.
Threads and multiple processes solve this easily. So do event-based IO
APIs, such as kqueue and AIO (Yes, I know AIO isn't ready for use in a
production system yet).
>
> I have nothing against the event driven model. However, it is
> not the solution to every network server problem.
No doubt. "Canonical" doesn't mean "universal" or "solitary".
Jp
--
No, `Eureka' is Greek for `This bath is too hot.'
-- Dr. Who
--
up 17 days, 19:01, 5 users, load average: 0.00, 0.20, 0.23
More information about the Python-list
mailing list