Corona

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
Revision 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

MANIFEST  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
.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

MANIFEST  view on Meta::CPAN

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
inc/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

1
2
3
4
5
6
7
8
9
10
11
12
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;

README  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
NAME
    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
    either explicitly with "https://metacpan.org/pod/cede">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 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

bin/corona  view on Meta::CPAN

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
}
 
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

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
our $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 )