There are no reviews yet. Be the first to send feedback to the community and the maintainers!
NAME Tatsumaki - Non-blocking web framework based on Plack and AnyEvent SYNOPSIS ### app.psgi use Tatsumaki::Error; use Tatsumaki::Application; use Tatsumaki::HTTPClient; use Tatsumaki::Server; package MainHandler; use parent qw(Tatsumaki::Handler); sub get { my $self = shift; $self->write("Hello World"); } package FeedHandler; use parent qw(Tatsumaki::Handler); __PACKAGE__->asynchronous(1); use JSON; sub get { my($self, $query) = @_; my $client = Tatsumaki::HTTPClient->new; $client->get("http://friendfeed-api.com/v2/feed/$query", $self->async_cb(sub { $self->on_response(@_) })); } sub on_response { my($self, $res) = @_; if ($res->is_error) { Tatsumaki::Error::HTTP->throw(500); } my $json = JSON::decode_json($res->content); $self->write("Fetched " . scalar(@{$json->{entries}}) . " entries from API"); $self->finish; } package StreamWriter; use parent qw(Tatsumaki::Handler); __PACKAGE__->asynchronous(1); use AnyEvent; sub get { my $self = shift; $self->response->content_type('text/plain'); my $try = 0; my $t; $t = AE::timer 0, 0.1, sub { $self->stream_write("Current UNIX time is " . time . "\n"); if ($try++ >= 10) { undef $t; $self->finish; } }; } package main; my $app = Tatsumaki::Application->new([ '/stream' => 'StreamWriter', '/feed/(\w+)' => 'FeedHandler', '/' => 'MainHandler', ]); return $app->psgi_app; And now run it with: plackup -s Twiggy app.psgi WARNINGS This is considered as alpha quality software. Most of the stuff are undocumented since it's considered unstable and will likely to change. You should sometimes look at the source code or example apps in *eg* directory to see how this thing works. Feel free to hack on it and ask me if you have questions or suggestions at IRC: #plack on irc.perl.org. DESCRIPTION Tatsumaki is a toy port of Tornado for Perl using Plack (with non-blocking extensions) and AnyEvent. It allows you to write a web application that does a immediate response with template rendering, IO-bound delayed response (like fetching third party API or XML feeds), server push streaming and long-poll Comet in a clean unified API. PSGI COMPATIBILITY When "asynchronous" is declared in your application, you need a PSGI server backend that supports "psgi.streaming" response style. If your application does server push with "stream_write", you need a server that supports "psgi.nonblocking" (and "psgi.streaming") as well. Currently Tatsumaki asynchronous application is supposed to run on Twiggy, Feersum, Corona and POE::Component::Server::PSGI. If "asynchronous" is not used, your application is supposed to run in any PSGI standard environments, including blocking multiprocess environments like Starman or Starlet. TATSUMAKI? Tatsumaki is a Japanese for Tornado. Also, it might sound familiar from "Tatsumaki Senpuukyaku" of Ryu from Street Fighter II if you loved the Capcom videogame back in the day :) AUTHOR Tatsuhiko Miyagawa <[email protected]> LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO AnyEvent Plack PSGI
cpanminus
cpanminus - get, unpack, build and install modules from CPANStarman
Starman is a high-performance preforking Perl PSGI web servergithub-growler
Growl github updateshubot-cron
Crontab like scheduling messages for Hubotplagger
Pluggable RSS/Atom aggregatorTabelog-HonestStars
Make Tabelog Stars more honestplack-handbook
Carmel
CPAN Artifact Repository Managerremedie
perl based pluggable media center applicationTwiggy
AnyEvent based non-blocking PSGI web server (like Thin)web-scraper
Perl web scraping toolkitheroku-buildpack-perl
Heroku buildpack to run Perl/PSGI apps using Starman HTTP serverhubot-standup
Agile style standup bot with hubot, ala tendercpanfile
Yet another way to declare CPAN dependenciesfaraday-cookie_jar
Client-side cookie management for Faradayripdiko
Rip radiko programsrack-vcr
Rack middleware to capture incoming HTTP requests/responses with VCRDist-Milla
Opinionated and Unobtrusive distribution builderAnyEvent-Redis
Asynchronous Redis clientAnyEvent-Twitter-Stream
AnyEvent based Twitter stream consumerCorona
Coro based high-performance, asynchronous PSGI web serverplenv-contrib
Filesys-Notify-Simple
Simple and dumb file system watcherxml-atom
XML::Atom perl modulefatbundle
Fat bundle for your Ruby scriptdocker-plenv-vanilla
plack-dispatching-samples
Examples of Plack dispatcher using various CPAN modulesgistp
Yet another gist command line tool (like gisty)Webhook-Growler
Receives Web hooks over Reverse HTTP and notifies via GrowlHTTPx-Weblet
the Request/Response objects formerly known as the-old-Plack::Requestfastpass
Tiny, XS free, standalone and preforking FastCGI daemon for PSGIPlack-Middleware-Debug
Debug panel middleware for PlackCatalyst-Engine-PSGI
PSGI engine for Catalystresque-top
top for ResqueTheSchwartz-Web
Web UI to list and control TheSchwartz jobsMT-PubSubHubbub
PubSubHubbub plugin for Movable TypePlack-Middleware-InteractiveDebugger
Interactive on-browser debugger for Plack ala Werkzeugdaily_digest
Daily Digest for Pocket (with Readability, calibre and IFTTT)Hash-MultiValue
Hash with multiple values per key, inspired by MultiDict.py of WebObplackperl.org
plackperl.org website filesSubfeedr
Open PubSubHubbub Hub that does polling for you, built on top of Tatsumaki and AnyEventdircaster
Generate RSS 2.0 podcast out of directory with *.mp3sperl-app-builder
Turns your perl script into .app using Platypushubot-lingr
asana_digest
Asana digest to Hipchatcpanf
Query and install CPAN modules realtime from the fresh mirrorcatalyst-view-json
Not maintained: see https://github.com/shadowcat-mst/catalyst-view-jsonData-Section-Simple
read data from DATA for inline templates and morejquery-fitimage
jQuery plugin to fit images while keeping the width/height ratioNet-Twitter-OAuth
Net::Twitter with OAuth-based authenticationFakehose
Fake Twitter streaming API serveryapcasia2015
Piglet
This is an incomplete project - DO NOT USE ITPlack-App-PAR
Run .par as a PSGI applicationcpanmetadb
CPAN metadata DB on Google AppEngineforkprove
Forking prove that allows you to preload modules with -Mdayone_import_tweets
Simple ruby script to import tweets into @dayoneappgoogle-contacts-gravatar
Import avatar photos from Gravatar to Google Contactswww-nicovideo-download
Download videos from nicovideo.jpyelp-bookmarks-vcards
Export Yelp bookmarks to vCardcpan-module-bootstrap
HTTP-Tinyish
HTTP::Tiny compatible wrappers for LWP, curl, wgetmodule-install-repository
Module::Install plugin to auto-set repository URLSunaba
Plack/PSGI wrapper for dankogai's lleval sandboxCGI-PSGI
Enable PSGI in your CGI.pm aware appsDevel-StackTrace-AsHTML
Display stacktrace in HTMLcpan-timeline
Gives you a dashboard listing your friends activities on CPANHTTP-Server-Simple-PSGI
Semi dependency free PSGI web serverAnyEvent-ReverseHTTP
reversehttp client using AnyEventPerlbal-Plugin-PSGI
Perlbal plugin to run PSGI applicationstest-synopsis
Test your code in SYNOPSIStheschwartz-simple
Lightweight TheSchwartz job dispatcher using plain DBIAnyEvent-DBI-Abstract
AnyEvent::DBI + SQL::AbstractAcme-Test-VW
Makes your tests always pass under CIgeo-coder-google
Geo::Coder::Googleperldocjp-site
Module-Install-CPANfile
Include dependencies from cpanfile to replace META filesPlack-Middleware-File-Sass
PSGI middleware for Sass templateshubot-webhook
Generic webhook plugin for Hubotcpan-realtime-bot
Bot behind friendfeed.com/cpancpan-command-repo
Adds a new 'repo' command to CPAN shellPlack-Middleware-REPL
REPL shell when your PSGI application raises exceptionscpan-listchanges
List changes for CPAN modulesbtbattery
Get BatteryPercent of your all BlueTooth devicesMac-Spotlight
CPAN Mac::Spotlight maint repocpan-mini-growl
Growl mirrored updates with minicpanFile-Spotlight
List files from Smart Folder by reading .savedSearch filesXML-Liberal
Patch XMLCGI-Compile
Compile .cgi script into a subAnyEvent-FriendFeed-Realtime
Subscribe to FriendFeed real-time updatesLWP-Protocol-PSGI
hijack LWP stack with your own PSGI applicationHTML-Selector-XPath
Net-DNSSD
XS binding for dns_sd.h DNS Service Discovery (aka Bonjour)Date-Japanese-Era
CPAN-Any
Install Perl modules using any CPAN clientscamp
stuffPlack-Middleware-Hoptoad
Send application errors to Hoptoadphp-session
reads and writes PHP4 session filesApp-PAUSE-Comaint
Make someone comaint of your module on PAUSEnightflight
yakan-hiko.com โ Gmail โ Mailgun โ Heroku โ IFTTTLove Open Source and this site? Check out how you can help us