Great Tools Heavily Used In Japan You Don't Know


The Presentation inside:

Slide 0

Great Tools Heavily Used In Japan, You Don't Know.


Slide 1

I am Junichi Ishida (aka uzulla) Tokyo/Japan Hachioji.pm


Slide 2


Slide 3

I am not lestrrat ! (I wear glasses)


Slide 4

by the way. • many Japanese perl mongers came to this YAPC::EU. • Please go talk to them if you have any questions. • Let's introduce some modules by people who are here


Slide 5

YUSUKEBE • He is a famous perl monger in japan. • He'll talk this YAPC::EU. today 15:00 at Aula F1


Slide 6

App::revealup • "HTTP Server application for viewing Markdown formatted text as slides" • This is Cool Markdown based presentation tool. • Yusukebe will talk about this tool at today 15:00 in Aula F1 . so, I skip this.


Slide 7

WebService::Simple • Simple Interface To Web Services APIs • popular for beginners • but very useful


Slide 8

example use WebService::Simple; # make instance my $flickr = WebService::Simple->new( base_url => "http://api.flickr.com/services/rest/", param => { api_key => "your_api_key", } ); # send GET request with params my $response = $flickr->get( { method => "flickr.test.echo", name => "value" } ); # parse respose my $thing = $response->parse_response;


Slide 9

that's all ! • this is very simple. i like this a lot.


Slide 10

MOZNION • His project "Perl::Lint" was accepted for TPF Grant.


Slide 11

Perl::Lint • "Yet Another Perl Source Code Linter" • faster than other lint tools. • Next up His talk in this hall. so, skip!


Slide 12

Perl::PrereqScanner::Lite • a lightweight prereq scanner for perl. • that is x30 faster than Perl::PrereqScanner • http://moznion.hatenadiary.com/entry/ 2014/03/21/231805


Slide 13

• "why need fast ?" • "Because we are japanese !!!!"


Slide 14

PAPIX • he gives perl classes as a hobby • He will talk about His teaching experience at tomorrow(4 sep) Aula F2


Slide 15

WebService::Mackerel • Control Panel API Client for mackerel.io • Change Server label on mackerel • add/remove watch servers. • (this is not agent)


Slide 16

Mackerel ? • Mackerel.io is Performance monitor tool on cloud. • "A Revolutionary New Kind of Application Performance Management" • Some popular japanese servicers are starting to use it.


Slide 17


Slide 18


Slide 19

SONGMU • He will talk at 4 sep 15:00 Aula F2


Slide 20

Riji • markdown and git based blog tool. • Builtin httpd server for entry preview • static HTML file generate • entries are version controlled by git • Atom feed support


Slide 21

how to setup, add entry, and see preview. $ $ $ $ $ $ $ cpanm Riji mkdir some_dir; cd some_dir riji setup vi article/entry/start.md git add . ; git commit -a riji server open http://localhost:3650/entry/start.html


Slide 22

publish static files # edit blog meta data once.(author, title...) $ vi riji.yml # generate htmls in blog dir $ riji publish • Of course, Static files are fast and secure!


Slide 23

KARUPANERU RA • He will talk about performance tuning, at 4 sep 12:00 in Salon de Grados


Slide 24

mRuby (perl module) • https://metacpan.org/pod/mRuby • mRuby is mruby binding for perl5. • (mruby is lightweight and easily embeddable Ruby interpreter)


Slide 25

example use mRuby; my $mruby = mRuby->new(file => $filename); my $ret = $mruby->run();


Slide 26

why need mruby? • mRuby can be used to share code in web and mobile apps(Android,iOS) (ex: calculation score). • also, Some web server can using mruby as module, that for nginx, Apache, H2O(httpd).


Slide 27

LESTRRAT • "It's not me." • He already talked (at today 12:00 in Salon de Grados).


Slide 28

STF • STF is HTTP based S3-like storage. • http://stf-storage.github.io/


Slide 29

metrics from 2014 jun • 100 TB • 600,000,000 objects • it's serving 400Mbps at peak hours without a hitch.


Slide 30

MIYAGAWA • oh men, He is not Japanese(sawyerx said at today's keynote!) • and...too famous. skip!


Slide 31

• That's all, japanese perl monger that they came to this YAPC::EU.


Slide 32

Ofcourse, More Perl monger in japan


Slide 33

KAZUHO • Author of H2O (HTTP/2 support optimized httpd)


Slide 34

Test::mysqld • mysqld runner for tests • Makes new temporary empty mysqld process. • mysqld process will be terminate on the end of execute.


Slide 35

example use DBI; use Test::mysqld; my $mysqld = Test::mysqld->new( my_cnf => { 'skip-networking' => '', # no TCP socket } ); my $dbh = DBI->connect( $mysqld->dsn(dbname => 'test'), );


Slide 36

Server::Starter • "a superdaemon for hot-deploying server programs" • Gracefull restart(hot-deploying) • Only exit old process if new process is successfully booted.(safe!) • No resource leak


Slide 37

Requirements a (your) server program. • Support Gracefull shutdown • Use socket FD passed from server starter to app


Slide 38

usage (with Starman) start_server \ --interval 5 \ --port 8000 \ --signal-on-hup=QUIT \ # for Starman -- \ starman --preload-app myapp.psgi • start_server command will install when install Server::Starter.


Slide 39

Starlet • "a simple, high-performance PSGI/Plack HTTP server" • Very heavily used in japan.


Slide 40

example $ plackup -s Starlet app.psgi • some available parameters for performance tuning. • https://github.com/kazuho/Starlet


Slide 41

use Server::Starter usage $ start_server --port=8000 -- \ plackup -s Starlet app.psgi • this is very popular style in japan.


Slide 42

KAZEBURO


Slide 43

GrowthForecast • http://kazeburo.github.io/GrowthForecast/ • "Lightning Fast Graphing/Visualization" • Make a graph all sorts of metrics via a WebAPI • Easiest way to draw some metrics graph.


Slide 44

install • (skip, sorry!) • http://kazeburo.github.io/GrowthForecast/ #install • (Need RRDtool. it install may be bit hard)


Slide 45

set cron (sample task) */5 * * * * \ curl \ -F number=`mysql -BN -e 'select count(*) from member' game` \ http://gf.host/api/game/member/register 2>&1 > /dev/null • count some table row num • ... and send metric to GF server every 5min. • /game/member/register is graph name • zero-conf!


Slide 46

result • easy! simple! convenient! • You can add graph in a minute !


Slide 47

HRForecast • Usage similar as GrowthForecast • Difference between Growthforcast are: • Resolution is per hour. • Can post past date metric data. • Does not need RRDtool.


Slide 48

Cookie::Baker • "Cookie string generator / parser" • It can cook cookies!


Slide 49

• "Why do you need this ?" • "This is CGI.pm free" • "understand."


Slide 50

Gazzle • Very fast psgi server • faster than Starman, Starlet.


Slide 51

x2 Faster than starman • https://github.com/kazeburo/Gazelle/wiki/ Benchmark


Slide 52

• "why does it need to be so fast ?" • "because we are japanese !!!!!"


Slide 53

TOKUHIROM


Slide 54

Web::Query • "Yet another scraping library like jQuery" • very friendly scraping


Slide 55

example use Web::Query; wq('http://hachiojipm.org/') ->find('h2.entry-title a') ->each(sub { my $i = shift; printf("%d %s\n", $i+1, $_->text); }); • this is like a jQuery


Slide 56

Furl • "Lightning-fast URL fetcher" • Simple and Fast http client


Slide 57

GET example use Furl; my $furl = Furl->new( agent => 'MyGreatUA/2.0', timeout => 10, ); my $res = $furl->get('http://example.jp/'); print $res->content;


Slide 58

POST example use Furl; my $furl = Furl->new( agent => 'MyGreatUA/2.0', timeout => 10, ); my $res = $furl->post( 'http://example.jp/', # URL [ X-MY-HEADER=>'ohmy' ], # headers [ foo => 'bar' ], # form data (HashRef/FileHandle are also okay) ); print $res->content;


Slide 59

why not LWP?? • "Why does it need to be faster ?" • "because, we are japanese !!!!" Ofcourse, we need that.


Slide 60

That's it for now I want introduce you more, but that's all the time I have. Router::Boom, DBIx::QueryLog, Mojolicious::Plugin::Web::Auth, Test::Time, Test::Time::At, Text::LTSV, App::PRT, Plack::App::PHPCGI, DBIx::Sunny, Proclet, Harriet, DBIx::TransactionManager, Data::MessagePack, Teng, Daiku, Minilla, DBIx::Schema::DSL, App::Watcher, HTTP::Parser::XS, XML::Tree::PP, Test::TCP, ....


Slide 61

Awesome Perl • Awesome-list for perl • awesome-list is a list of nice module/tools. • https://github.com/hachiojipm/awesome-perl • maintain by hachioji.pm


Slide 62

Awesome Perl: Patches Welcome • I am waiting for your pull-requests!


Slide 63

Finally! that's all !! • If my talk too fast... • (Why? because...) • this slide uploaded here. • http://bit.ly/uzulla_yapceu2015


Slide 64


×

HTML:





Ссылка: