Corona
view release on metacpan or search on metacpan
12345678910111213Revision history
for
Perl extension Corona
0.1004 Sun Mar 28 14:37:03 PDT 2010
- Implemented corona -v
0.1003 Fri Mar 19 19:20:27 PDT 2010
- Fixed the namespace in Coro.pm (I suck)
0.1002 Fri Mar 19 00:43:40 PDT 2010
- Add
$VERSION
to Plack::Server::Coro
0.1001 Tue Mar 16 18:57:15 PDT 2010
- Include Plack::Server::Coro, now it's an empty subclass of Handler::Corona
123456789101112.gitignore
bin/corona
Changes
inc/Module/Install.pm
inc/Module/Install/AuthorTests.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/Fetch.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/ReadmeFromPod.pm
inc/Module/Install/Repository.pm
151617181920212223242526272829inc/Module/Install/WriteAll.pm
lib/Corona.pm
lib/Corona/Server.pm
lib/Plack/Handler/Corona.pm
lib/Plack/Server/Coro.pm
Makefile.PL
MANIFEST This list of files
META.yml
README
t/00_compile.t
t/corona.t
xt/perlcritic.t
xt/pod.t
xt/podspell.t
xt/synopsis.t
Makefile.PL view on Meta::CPAN
123456789101112use
inc::Module::Install;
name
'Corona'
;
all_from
'lib/Corona.pm'
;
readme_from
'lib/Corona.pm'
;
requires
'Coro'
;
requires
'Net::Server::Coro'
, 0.5;
requires
'Plack'
, 0.99;
build_requires
'Test::More'
;
install_script
'bin/corona'
;
author_tests(
'xt'
);
auto_set_repository;
WriteAll;
1234567891011121314151617181920212223NAME
Corona - Coro based PSGI web server
SYNOPSIS
corona --
listen
:9090 app.psgi
DESCRIPTION
Corona is a Coro based Plack web server. It uses Net::Server::Coro under
the hood, which means we have coroutines (threads)
for
each
socket
,
active connections and a main loop.
Because it's Coro based your web application can actually block
with
I/O
wait
as long as it yields
when
being blocked, to the other coroutine
# your web application
my
$content
= LWP::Simple::get(
$url
);
# this yields to other threads when IO blocks
Corona also uses Coro::AIO (and IO::AIO)
if
available, to
send
the
static filehandle using sendfile(2).
The simple benchmark shows this server gives 2000 requests per second in
91011121314151617181920212223242526272829303132}
my
$runner
= Plack::Runner->new(
server
=>
'Corona'
,
env
=>
'deployment'
,
version_cb
=> \
&version
);
$runner
->parse_options(
@ARGV
);
$runner
->run;
__END__
=head1 NAME
corona - Corona launcher
=head1 SYNOPSIS
corona --listen :9090
C<corona> is basically an alias for C<plackup -s Corona -E
deployment>. Run C<plackup -h> to see more options.
=head1 SEE ALSO
L<Corona> L<plackup>
=cut
lib/Corona.pm view on Meta::CPAN
45678910111213141516171819202122232425262728293031323334our
$VERSION
=
'0.1004'
;
__END__
=head1 NAME
Corona - Coro based PSGI web server
=head1 SYNOPSIS
corona --listen :9090 app.psgi
=head1 DESCRIPTION
Corona is a Coro based Plack web server. It uses L<Net::Server::Coro>
under the hood, which means we have coroutines (threads) for each
socket, active connections and a main loop.
Because it's Coro based your web application can actually block with
I/O wait as long as it yields when being blocked, to the other
coroutine either explicitly with C<cede> or automatically (via Coro::*
magic).
# your web application
use Coro::LWP;
my $content = LWP::Simple::get($url); # this yields to other threads when IO blocks
Corona also uses L<Coro::AIO> (and L<IO::AIO>) if available, to send
the static filehandle using sendfile(2).
The simple benchmark shows this server gives 2000 requests per second
( run in 0.280 second using v1.01-cache-2.11-cpan-0f795438458 )