Ax2 is turning into a pretty sweet pure perl httpd (whether you want XML processing or not).
I've been working a bit this week on a couple of things - getting the uri_to_filename translation working correctly (thanks to Jörg for a lot of work there) according to how Apache works, and then lots on performance and stability.
It serves about 500 requests/second here on localhost transfers (benchmarking locally with apachebench) with a 2K file. That's not very impressive, but then most httpds don't really hit their maximum requests-per-second transfers anyway - they are bottlenecked by numbers of connections and the speed of the network.
So in testing large files, the throughput causes apachebench to overflow integers. It does about 110MB/sec throughput. That's enough throughput to saturate even the fattest of pipes (well ok, it won't saturate an OC48, but if you're doing that much throughput you can probably afford another box!).
This sort of throughput is achieved using AIO. All the stat()s and open() calls are asynchronous (using the excellent IO::AIO) when I'm doing this benchmark.
Now in theory I could build a faster httpd if I just removed a lot of overhead (logging, and all the nice hooks) but those things are worth having. It has hooks like apache has for uri_translation, auth, fixup, etc, making web app development very simple.
As a long time mod_perl user (I realised I've been using mod_perl for 8 years! yikes) I value its flexibility but always thought things could be a bit simpler. And I find Ax2 simpler to develop for. Partly that's the "I wrote it" factor, but it's so much easier to stop and start with "ctrl-c", then "./axkit" than it ever was to do that via "apachectl stop; sleep 5; apachectl start"... and make test starts the server much faster than Apache::Test can (because we can hook right into the module). Debugging can be done with perl -d axkit. Profiling with perl -MDevel::Profiler axkit. Lots of niceties for those developing web apps.
Now how can I get the Jifty and Catalyst communities interested in using this as their primary web server?
Getting Jifty (Score:2)
Re: (Score:2)
Re: (Score:2)
You can get jifty-trunk at: http://svn.jifty.org/svn/jifty.org/jifty/trunk [jifty.org]
Wifty is a demo-app wiki:
http://svn.jifty.org/svn/jifty.org/wifty/trunk [jifty.org]
Apache emulation (Score:2)
Re: (Score:2)
This is also basically how the SAWA plugin works - it fakes up an Apache::Request-a-like and passes it in.
Pointer to the Code? (Score:1)
Where can we look at the code? Sorry if I missed a previous post with the link, but I didn't get it.
I ask because I also want to make this work with Catalyst.
life is short
Re: (Score:2)
svn://axkit.org/axkit2 to download
(it's on CPAN too, but there have been lots of changes since then)
DBI (Score:1)
Re: (Score:2)
But yes, likely some sort of separate process we can marshal requests to/from. I'd like to make it as transparent as possible, so what I might do is implement a DBD driver that does this natively.
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
Can it be Abstracted from the XML Stuff? (Score:2)
—Theory
Re: (Score:2)
Of course why you would want a web server without XML::LibXML installed is beyond me
Re: (Score:2)
My thought is that it'd be cool if it was a Web server that supports plugins and nothing but a Web server that supports plugins.
Oh, another q: Would it be possible to allow plugins to be CPAN modules, and then we can just tell the Web server to use a CPAN module as the plugin for a particular Location.
—Theory
Re: (Score:2)
Just do:
Plugin Foo::Bar
and it loads it from @INC if the plugin name contains '::'.
Re: (Score:2)
—Theory