Permalink
Browse files

Checking in changes prior to tagging of version 0.01. Changelog diff is:

  • Loading branch information...
1 parent 344da26 commit 662ae3a6f72efad31628e8fd08655a7a5911c578 @miyagawa committed Oct 13, 2009
Showing with 36 additions and 6 deletions.
  1. +1 −0 MANIFEST
  2. +3 −0 Makefile.PL
  3. +26 −6 README
  4. +6 −0 lib/Plack/Server/Coro.pm
  5. 0 t/{Plack-Server → }/coro.t
View
@@ -25,6 +25,7 @@ MANIFEST This list of files
META.yml
README
t/00_compile.t
+t/coro.t
xt/perlcritic.t
xt/pod.t
xt/podspell.t
View
@@ -2,6 +2,9 @@ use inc::Module::Install;
name 'Plack-Server-Coro';
all_from 'lib/Plack/Server/Coro.pm';
readme_from 'lib/Plack/Server/Coro.pm';
+requires 'Coro';
+requires 'Net::Server::Coro';
+requires 'Plack';
build_requires 'Test::More';
use_test_base;
auto_include_deps;
View
32 README
@@ -1,17 +1,37 @@
NAME
- Plack::Server::Coro -
+ Plack::Server::Coro - Coro cooperative multithread web server
SYNOPSIS
- use Plack::Server::Coro;
+ plackup -i Coro
DESCRIPTION
- Plack::Server::Coro is
+ 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
+ the simple Hello World app, and 300 requests to serve 2MB photo files
+ when used with AIO modules. Brilliantly fast.
+
+ This web server sets "psgi.multithread" env var on.
AUTHOR
- Tatsuhiko Miyagawa <miyagawa@bulknews.net>
+ Tatsuhiko Miyagawa
LICENSE
- This library is free software; you can redistribute it and/or modify it
- under the same terms as Perl itself.
+ This module is licensed under the same terms as Perl itself.
SEE ALSO
+ Coro Net::Server::Coro Coro::AIO
+
View
@@ -1,5 +1,7 @@
package Plack::Server::Coro;
use strict;
+use 5.008_001;
+our $VERSION = "0.01";
sub new {
my $class = shift;
@@ -137,6 +139,10 @@ This web server sets C<psgi.multithread> env var on.
Tatsuhiko Miyagawa
+=head1 LICENSE
+
+This module is licensed under the same terms as Perl itself.
+
=head1 SEE ALSO
L<Coro> L<Net::Server::Coro> L<Coro::AIO>
File renamed without changes.

0 comments on commit 662ae3a

Please sign in to comment.