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

4,830 views

Published on

talk at YAPC::EU 2015
3 sep 14:30, Aula Magna hall

Published in: Software

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

  1. 1. Great Tools Heavily Used In Japan, You Don't Know.
  2. 2. I am Junichi Ishida (aka uzulla) Tokyo/Japan Hachioji.pm
  3. 3. I am not lestrrat ! (I wear glasses)
  4. 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
  5. 5. YUSUKEBE • He is a famous perl monger in japan. • He'll talk this YAPC::EU. today 15:00 at Aula F1
  6. 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.
  7. 7. WebService::Simple • Simple Interface To Web Services APIs • popular for beginners • but very useful
  8. 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;
  9. 9. that's all ! • this is very simple. i like this a lot.
  10. 10. MOZNION • His project "Perl::Lint" was accepted for TPF Grant.
  11. 11. Perl::Lint • "Yet Another Perl Source Code Linter" • faster than other lint tools. • Next up His talk in this hall. so, skip!
  12. 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
  13. 13. • "why need fast ?" • "Because we are japanese !!!!"
  14. 14. PAPIX • he gives perl classes as a hobby • He will talk about His teaching experience at tomorrow(4 sep) Aula F2
  15. 15. WebService::Mackerel • Control Panel API Client for mackerel.io • Change Server label on mackerel • add/remove watch servers. • (this is not agent)
  16. 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.
  17. 17. SONGMU • He will talk at 4 sep 15:00 Aula F2
  18. 18. 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
  19. 19. 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
  20. 20. 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!
  21. 21. KARUPANERU RA • He will talk about performance tuning, at 4 sep 12:00 in Salon de Grados
  22. 22. mRuby (perl module) • https://metacpan.org/pod/mRuby • mRuby is mruby binding for perl5. • (mruby is lightweight and easily embeddable Ruby interpreter)
  23. 23. example use mRuby; my $mruby = mRuby->new(file => $filename); my $ret = $mruby->run();
  24. 24. 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).
  25. 25. LESTRRAT • "It's not me." • He already talked (at today 12:00 in Salon de Grados).
  26. 26. STF • STF is HTTP based S3-like storage. • http://stf-storage.github.io/
  27. 27. metrics from 2014 jun • 100 TB • 600,000,000 objects • it's serving 400Mbps at peak hours without a hitch.
  28. 28. MIYAGAWA • oh men, He is not Japanese(sawyerx said at today's keynote!) • and...too famous. skip!
  29. 29. • That's all, japanese perl monger that they came to this YAPC::EU.
  30. 30. Ofcourse, More Perl monger in japan
  31. 31. KAZUHO • Author of H2O (HTTP/2 support optimized httpd)
  32. 32. Test::mysqld • mysqld runner for tests • Makes new temporary empty mysqld process. • mysqld process will be terminate on the end of execute.
  33. 33. 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'), );
  34. 34. 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
  35. 35. Requirements a (your) server program. • Support Gracefull shutdown • Use socket FD passed from server starter to app
  36. 36. 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.
  37. 37. Starlet • "a simple, high-performance PSGI/Plack HTTP server" • Very heavily used in japan.
  38. 38. example $ plackup -s Starlet app.psgi • some available parameters for performance tuning. • https://github.com/kazuho/Starlet
  39. 39. use Server::Starter usage $ start_server --port=8000 -- plackup -s Starlet app.psgi • this is very popular style in japan.
  40. 40. KAZEBURO
  41. 41. 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.
  42. 42. install • (skip, sorry!) • http://kazeburo.github.io/GrowthForecast/ #install • (Need RRDtool. it install may be bit hard)
  43. 43. 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!
  44. 44. result • easy! simple! convenient! • You can add graph in a minute !
  45. 45. HRForecast • Usage similar as GrowthForecast • Difference between Growthforcast are: • Resolution is per hour. • Can post past date metric data. • Does not need RRDtool.
  46. 46. Cookie::Baker • "Cookie string generator / parser" • It can cook cookies!
  47. 47. • "Why do you need this ?" • "This is CGI.pm free" • "understand."
  48. 48. Gazelle • Very fast psgi server • faster than Starman, Starlet.
  49. 49. x2 Faster than starman • https://github.com/kazeburo/Gazelle/wiki/ Benchmark
  50. 50. • "why does it need to be so fast ?" • "because we are japanese !!!!!"
  51. 51. TOKUHIROM
  52. 52. Web::Query • "Yet another scraping library like jQuery" • very friendly scraping
  53. 53. example use Web::Query; wq('http://hachiojipm.org/') ->find('h2.entry-title a') ->each(sub { my $i = shift; printf("%d %sn", $i+1, $_->text); }); • this is like a jQuery
  54. 54. Furl • "Lightning-fast URL fetcher" • Simple and Fast http client
  55. 55. GET example use Furl; my $furl = Furl->new( agent => 'MyGreatUA/2.0', timeout => 10, ); my $res = $furl->get('http://example.jp/'); print $res->content;
  56. 56. 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;
  57. 57. why not LWP?? • "Why does it need to be faster ?" • "because, we are japanese !!!!" Ofcourse, we need that.
  58. 58. 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, ....
  59. 59. 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
  60. 60. Awesome Perl: Patches Welcome • I am waiting for your pull-requests!
  61. 61. Finally! that's all !! • If my talk too fast... • (Why? because...) • this slide uploaded here. • http://bit.ly/uzulla_yapceu2015

×