Plack-Server-Coro

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

inc/Test/Base/Filter.pm
inc/Test/Builder.pm
inc/Test/Builder/Module.pm
inc/Test/More.pm
lib/Plack/Server/Coro.pm
Makefile.PL
MANIFEST			This list of files
META.yml
README
t/00_compile.t
t/coro.t
xt/perlcritic.t
xt/pod.t
xt/podspell.t
xt/synopsis.t

README  view on Meta::CPAN

NAME
    Plack::Server::Coro - Coro cooperative multithread web server

SYNOPSIS
      plackup --server Coro

DESCRIPTION
    This 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 "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

    This server 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

lib/Plack/Server/Coro.pm  view on Meta::CPAN


Plack::Server::Coro - Coro cooperative multithread web server

=head1 SYNOPSIS

  plackup --server Coro

=head1 DESCRIPTION

This 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

This server 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.360 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )