21 messages in org.apache.httpd.devRe: Is async the answer
FromSent OnAttachments
Akins, BrianJan 18, 2008 10:51 am 
Justin ErenkrantzJan 18, 2008 11:16 am 
Colm MacCarthaighJan 18, 2008 11:20 am 
Akins, BrianJan 18, 2008 11:26 am 
Akins, BrianJan 18, 2008 11:30 am 
Colm MacCarthaighJan 18, 2008 12:07 pm 
Akins, BrianJan 18, 2008 1:16 pm 
Colm MacCarthaighJan 18, 2008 1:28 pm 
Ruediger PluemJan 18, 2008 2:30 pm 
Justin ErenkrantzJan 18, 2008 4:33 pm 
Niklas EdmundssonJan 19, 2008 3:53 am 
Graham LeggettJan 19, 2008 4:45 am 
Davi ArnautJan 19, 2008 6:57 am 
Jim JagielskiJan 19, 2008 7:04 am 
Graham LeggettJan 19, 2008 8:01 am 
Henrik NordströmJan 19, 2008 1:14 pm 
Henrik NordströmJan 19, 2008 1:19 pm 
Davi ArnautJan 19, 2008 3:29 pm 
Graham LeggettJan 20, 2008 7:44 am 
Akins, BrianJan 22, 2008 10:03 am 
Akins, BrianJan 22, 2008 10:07 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Is async the answerActions...
From:Niklas Edmundsson (nik@acc.umu.se)
Date:Jan 19, 2008 3:53:31 am
List:org.apache.httpd.dev

On Fri, 18 Jan 2008, Ruediger Pluem wrote:

The proxy that the LiveJournal folks wrote, I think, copies all the data from the origin server into a file and then uses sendfile to send to the client...

Erm, so does the one we wrote, mod_disk_cache ;p

IMHO it doesn't for the first request of the entity (the request that causes the entity to be cached)

Which is why it doesn't scale with large files, and I hacked it to do that to be usable with DVD images on ftp.acc.umu.se (http://issues.apache.org/bugzilla/show_bug.cgi?id=39380 - you might remember the first try to merge some of it). Yes, it has its flaws, but it solves the problem for us. I think that some people has tried it in a proxy setting too with pretty OK result. But this was really off-topic ;)

Getting to the point, I share Brians concerns with going async just for the async sake, for similar reasons:

- People are having problems with making modules even thread safe (see mod_example), forcibly adding async to the mix will raise the bar even higher for people who needs to whip up a simple module. - Callback semantics are messy when they go wrong, debugging can be a pain. - Threads are rather cheap, even on linux since the advent of NPTL. - Performance benefits are unclear.

Given that, there are obvious optimisations that can be, and have been, made. The ones in trunk aimed at not hogging a worker thread for simply writing the remaining data to the client for example. From what I've understood this class of changes doesn't really affect modules.

Also, if there is a way of adding async having it optional in modules then I see no problem with adding it as long as there are cases where it actually helps, other than adding it to the supported buzzwords list ;)