[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [apache-plusplus] Process model ideas for C++ Apache.



Dean Gaudet wrote:

> For example, NT's completion ports restart the most
> recently blocked thread because it's most likely to still be
> in the caches.

Sounds like a recipe for starvation of other threads. And I'm
not sure haow effective that would be - threads block for a
reason, and if that reason still exists, that thread can't run
and may be subsequently flushed from the cache before the reason
is satisfied.

> There's another point to remember as well. Hardware is cheaper
> than labour ... So if it's easier to program in an implicit
> state model then the benefits are greater ... and I think it
> is easier to program in this model.

I agree completely that the start-to-end, implicit state model
is easier to understand - which brings me back to why this
discussion is happening in apache-plusplus instead of
new-httpd: The complexity of handling state machines, concurrency,
message- and connection-pools is facilitated by C++ conventions.
If performance (not yet demonstrated) and capabilities can be
enhanced by these complexities, a hybrid C/C++ development may
be the way to go.

I am no great fan of pure object model programming, as has
already been discussed, but I believe the use of C++ as
"a better C" has real merit.

-- 
Mike Anderson
mka@redes.int.com.mx
+52 473 23730 voice/fax
Guanajuato, GTO, Mexico

"If it looks like a bug, waddles like a bug,
and quacks like a bug, its a quack!"