Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Checking in changes prior to tagging of version 0.1000. Changelog dif…

…f is:

diff --git a/Changes b/Changes
index de3b969..cac7e3c 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,15 @@
 Revision history for Perl extension Twiggy

+0.1000 Mon Feb 15 17:56:33 PST 2010
+        - Renamed the distribution to Twiggy
+        - Fixed a busyloop bug (hidekiy)
+        - Fixed write_real_fh for linux (hidekiy)
+        - Reverted the psgi.input to buffer the POST body
+        - Dropped ContentLength middleware
+        - Support listening on multiple sockets and UNIX sockets
+        - Implemented psgix.io and psgix.input.buffered
+        - Removed undocumented poll_cb on writer
+
 0.03  Wed Nov 11 21:33:16 PST 2009
         - Merged nothingmuch's fork to make the socket handling much faster (twice as fast!)
         - Fixed poll_cb and writer shutdown
  • Loading branch information...
commit 987c95a5bb007a0eaf3dba1be408dd289dcec614 1 parent eee3325
@miyagawa authored
Showing with 143 additions and 5 deletions.
  1. +10 −0 Changes
  2. +20 −2 MANIFEST
  3. +1 −1  Makefile.PL
  4. +9 −2 README
  5. +103 −0 lib/Twiggy.pm
View
10 Changes
@@ -1,5 +1,15 @@
Revision history for Perl extension Twiggy
+0.1000 Mon Feb 15 17:56:33 PST 2010
+ - Renamed the distribution to Twiggy
+ - Fixed a busyloop bug (hidekiy)
+ - Fixed write_real_fh for linux (hidekiy)
+ - Reverted the psgi.input to buffer the POST body
+ - Dropped ContentLength middleware
+ - Support listening on multiple sockets and UNIX sockets
+ - Implemented psgix.io and psgix.input.buffered
+ - Removed undocumented poll_cb on writer
+
0.03 Wed Nov 11 21:33:16 PST 2009
- Merged nothingmuch's fork to make the socket handling much faster (twice as fast!)
- Fixed poll_cb and writer shutdown
View
22 MANIFEST
@@ -1,5 +1,19 @@
.gitignore
+bin/twiggy
Changes
+eg/chat-websocket/chat.psgi
+eg/chat-websocket/static/DUI.js
+eg/chat-websocket/static/jquery-1.3.2.min.js
+eg/chat-websocket/static/jquery.cookie.js
+eg/chat-websocket/static/jquery.ev.js
+eg/chat-websocket/static/jquery.md5.js
+eg/chat-websocket/static/jquery.oembed.js
+eg/chat-websocket/static/pretty.js
+eg/chat-websocket/static/screen.css
+eg/chat-websocket/static/Stream.js
+eg/chat-websocket/templates/index.mt
+eg/chat-websocket/templates/room.mt
+eg/chat-websocket/templates/test.js
inc/Module/Install.pm
inc/Module/Install/AuthorTests.pm
inc/Module/Install/Base.pm
@@ -10,6 +24,7 @@ inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/ReadmeFromPod.pm
inc/Module/Install/Repository.pm
+inc/Module/Install/Scripts.pm
inc/Module/Install/TestBase.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
@@ -19,8 +34,10 @@ inc/Test/Base/Filter.pm
inc/Test/Builder.pm
inc/Test/Builder/Module.pm
inc/Test/More.pm
-lib/Plack/Server/AnyEvent.pm
-lib/Plack/Server/AnyEvent/Writer.pm
+lib/AnyEvent/Server/PSGI.pm
+lib/Plack/Handler/Twiggy.pm
+lib/Twiggy.pm
+lib/Twiggy/Server.pm
Makefile.PL
MANIFEST This list of files
META.yml
@@ -28,6 +45,7 @@ README
t/00_compile.t
t/anyevent.t
t/anyevent_extensions.t
+t/anyevent_slow_post.t
xt/perlcritic.t
xt/pod.t
xt/podspell.t
View
2  Makefile.PL
@@ -2,8 +2,8 @@ use inc::Module::Install 0.91;
name 'Twiggy';
all_from 'lib/Twiggy.pm';
readme_from 'lib/Twiggy.pm';
+requires 'Plack', 0.99;
requires 'AnyEvent';
-requires 'Plack::Util';
requires 'HTTP::Status';
requires 'Try::Tiny';
requires 'HTTP::Parser::XS';
View
11 README
@@ -2,9 +2,13 @@ NAME
Twiggy - AnyEvent HTTP server for PSGI (like Thin)
SYNOPSIS
- use Twiggy;
+ twiggy --listen :8080
- my $server = Twiggy->new(
+ See "twiggey -h" for more details.
+
+ use Twiggy::Server;
+
+ my $server = Twiggy::Server->new(
host => $host,
port => $port,
);
@@ -26,6 +30,9 @@ DESCRIPTION
jobs or delayed responses such as long-poll, WebSocket or streaming
content (server push).
+ This software used to be called Plack::Server::AnyEvent but was
+ renamed to Twiggy. See "NAMING" for details.
+
Fast header parser
Uses XS/C based HTTP header parser for the best performance.
View
103 lib/Twiggy.pm
@@ -0,0 +1,103 @@
+package Twiggy;
+use strict;
+use warnings;
+use 5.008_001;
+our $VERSION = '0.1000';
+
+1;
+__END__
+
+=head1 NAME
+
+Twiggy - AnyEvent HTTP server for PSGI (like Thin)
+
+=head1 SYNOPSIS
+
+ twiggy --listen :8080
+
+See C<twiggey -h> for more details.
+
+ use Twiggy::Server;
+
+ my $server = Twiggy::Server->new(
+ host => $host,
+ port => $port,
+ );
+ $server->register_service($app);
+
+ AE::cv->recv;
+
+=head1 DESCRIPTION
+
+Twiggy is a lightweight and fast HTTP server with unique features such
+as:
+
+=over 4
+
+=item PSGI
+
+Can run any PSGI applications. Fully supports I<psgi.nonblocking> and
+I<psgi.streaming> interfaces.
+
+=item AnyEvent
+
+This server uses AnyEvent and runs in a non-blocking event loop, so
+it's best to run event-driven web applications that runs I/O bound
+jobs or delayed responses such as long-poll, WebSocket or streaming
+content (server push).
+
+This software used to be called Plack::Server::AnyEvent but was
+renamed to Twiggy. See L</NAMING> for details.
+
+=item Fast header parser
+
+Uses XS/C based HTTP header parser for the best performance.
+
+=item Lightweight and Fast
+
+The memory required to run twiggy is 6MB and it can serve more than
+4000 req/s with a single process on Perl 5.10 with MacBook Pro 13"
+late 2009.
+
+=back
+
+=head1 NAMING
+
+=head2 Twiggy?
+
+Because it is like L<Thin|http://code.macournoyer.com/thin/>, Ruby's
+Rack web server using EventMachine. You know, Twiggy is thin :)
+
+=head2 Why the cute name instead of more descriptive namespace? Are you on drugs?
+
+I'm sick of naming Perl software like
+HTTP::Server::PSGI::How::Its::Written::With::What::Module and people
+call it HSSPHIWWWM on IRC. It's hard to say on speeches and newbies
+would ask questions what they stand for every day. That's crazy.
+
+This module actually includes the longer alias and an empty subclass
+L<AnyEvent::Server::PSGI> for those who like to type more ::'s. It
+would actually help you find this software by searching for I<PSGI
+Server AnyEvent> on CPAN, which i believe is a good thing.
+
+Yes, maybe I'm on drugs. We'll see.
+
+=head1 LICENSE
+
+This module is licensed under the same terms as Perl itself.
+
+=head1 AUTHOR
+
+Tatsuhiko Miyagawa
+
+Tokuhiro Matsuno
+
+Yuval Kogman
+
+Hideki Yamamura
+
+=head1 SEE ALSO
+
+L<Plack> L<AnyEvent> L<Tatsumaki>
+
+=cut
Please sign in to comment.
Something went wrong with that request. Please try again.