Perl in Japan

120b74af626c2b23f954926ef68ac5d6?s=47 papix
August 07, 2019

Perl in Japan

120b74af626c2b23f954926ef68ac5d6?s=128

papix

August 07, 2019
Tweet

Transcript

  1. Perl in Japan by papix (Shibuya.pm) PerlCon 2019 (7 August)

  2. Self Introduction • Takayuki Fukumoto a.k.a papix • https://papix.net •

    CPAN: https://metacpan.org/author/PAPIX • Board member of Japan Perl Association • Vice chairman of next YAPC::Japan • Attended YAPC::EU 2015 (Granada)
  3. Perl in Japan: Agenda • Introduce 2 topics about "Perl

    in Japan" • Web Service Development • Community
  4. Perl in Japan ~Web Service Development~

  5. Current status of Perl in Japan • About 10 years

    ago, Perl was very popular programming language in Japan • Some large SNS / portal service were using Perl: Livedoor, DeNA and mixi • Many study sessions were held • JPA established in 2008
  6. Current status of Perl in Japan • In 2019, Perl

    is not popular in Japan as a language for web service development • Around 2010, several WAF became popular in Japan • Rails 3, CakePHP 2.0, Symphony 2.0 etc. • Many engineer want to use these WAF
  7. Current status of Perl in Japan • Now, many engineers

    use Ruby (RoR), PHP, Go, Python, Scala etc. • Static typing language is very popular in Japan • And many Perl code was replaced other language
  8. But... • We are using Perl! • JPA is still

    active • My company is one of them • In this section, I'd like to talk about some techniques when we use Perl • Architecture, CPAN modules, tools...
  9. And... • I don't know much about the Perl outside

    Japan. • I want to discuss with you! • common / different point with us...
  10. None
  11. Hatena Co., Ltd. • Founded in 2001 • "Hatena" means

    "?" in Japanese • Located in Kyoto and Tokyo • Developing many web services using Perl and other languages • For example...
  12. Hatena Bookmark

  13. Hatena Bookmark • Social bookmarking platform in Japan • Similar

    to Reddit, Hacker News, delicious... • Replaced from Perl to hybrid of Scala & Perl • see also: How we replaced a 10-year-old Perl product using Scala
 https://speakerdeck.com/tanishiking/how-we-replaced-a-10-year-old-perl-product-using-scala
  14. Mackerel

  15. Mackerel • Server monitoring and management SaaS • https://mackerel.io •

    Replacement for Zabbix, Nagios... • Using Scala and Go
  16. None
  17. Hatena Blog • Self-publishing blog service in Japan • Similar

    to WordPress, Tumblr, Medium... • Released in 2011 • Small developer team • 5 engineers, 2 designers, 1 SRE
  18. Hatena Blog: Technology stack • Perl • (some subcomponents use

    Go/Scala) • JavaScript / TypeScript • React.js... • MySQL, Redis, Memcache / Nginx, Varnish • Some AWS's service • GitHub, Slack, Mackerel, Sentry, Jenkins, etc...
  19. Hatena Blog: Code • Perl ... About 130,000 lines •

    Test code ... 20,000 lines • JavaScript ... About 43,000 lines
  20. Hatena Blog: Our Philosophy of Code • "Minimize the code

    to read by developer" • So, we don't use existing WAF! • like Mojolicious, Amon2... • Build tiny WAF using several CPAN modules: • Plack + Router::Simple... • Text::Xslate, JSON::XS...
  21. Hatena Blog: Our Philosophy of Code • In addition, we

    don't use convenient ORM • like DBIx::Class, Class::DBI... • We use DBIx::Sunny (simple DBI wrapper) • see also: Strongest Web Service Framework I Thought
 https://www.slideshare.net/cho45/yapc-asia-2011 (Japanese)
  22. Useful Tools We Use

  23. Smart::Args • author: TOKUHIROM • Module for function's argument validation

  24. AWS X-Ray • Analyze and debug production • Tracing our

    web service and show details: • Time taken to process • Show external HTTP request • SQL query / fetched row
  25. Awesome!

  26. but...

  27. None
  28. AWS doesn't provide X-Ray SDK for Perl!!!!!!!!!!!

  29. Don't worry!

  30. AWS X-Ray + Perl • FUJIWARA did it!!!!!! • Devel::KYTProf

    • Devel::KYTProf::Logger::XRay • AWS::XRay • Plack::Middleware::XRay
  31. Devel::KYTProf • Lightweight profiler for Perl • author: ONISHI •

    KYT means "Kyoto" • (because he lives in Kyoto)
  32. Devel::KYTProf • Usage is very simple! • Just use "Devel::KYTProf"

    on your code • Then... • ↑ Furl's profile by Devel::KYTProf
  33. Devel::KYTProf • Devel::KYTProf supports for... • Cache::Memcached::Fast • DBI •

    LWP::UserAgent • Furl::HTTP • MogileFS::Client • Redis::Fast • Fluent::Logger • AWS::CLIWrapper
  34. AWS::XRay • AWS::XRay is AWS X-Ray SDK for Perl •

    author: FUJIWARA • Simple SDK, don't profiling
  35. Devel::KYTProf::Logger::XRay • Connect Devel::KYTProf and AWS::XRay • author: FUJIWARA

  36. Plack::Middleware::XRay • Plack Middleware for using these modules • author:

    FUJIWARA
  37. None
  38. None
  39. None
  40. Cool!!!

  41. App::PRT • Command line Perl Refactoring Tool • author: HITODE

    • Replace any package, subroutine, variable name • using PPI
  42. App::PRT • For example... • I want to replace "Message.pm"

    to "SampleMessage.pm"
  43. App::PRT • Message.pm is...

  44. App::PRT • and Sample.pm is...

  45. App::PRT • execute prt command • then...

  46. App::PRT • Completed!!! • All "Message" was replaced to "SampleMessage"

  47. CPANܑ͞Μ • ňCPANܑ͞Μʼn means "Super CPAN Bros." • Display CPAN

    modules needing update • Implemented by Ruby
  48. CPANܑ͞Μ

  49. App::ccu • ccu = cpanfile-check-updates
 https://github.com/akiym/cpanfile-check-updates • Display renewable modules

    and those changes by parsing cpanfile / snapshot
  50. And Others... • We use many CPAN modules... • Sentry::Raven

    • Class::Accessor::Lite::Lazy • LWPx::ParanoidHandler • Class::Enumemon
  51. Perl in Japan ~Community~

  52. Perl Community in Japan • As above, Perl is not

    popular language in Japan • However, some people still use and enjoy using Perl! • I'd like to talk about approach to support Perl Mongers in Japan
  53. Japan Perl Association (JPA) • JPA is a Perl user

    group in Japan • Some companies are participating in JPA • And they are nominates board member • Board member operate JPA • Funds are supported from sponsors
  54. Japan Perl Association (JPA) • Our mission is... • Operate

    YAPC::Japan (Conference) • Support local communities
  55. YAPC::Japan • Conference on Perl in Japan • Until 2015,

    JPA operated YAPC::Asia • In 2016, rebooted as YAPC::Japan • YAPC::Japan is operated by JPA and some volunteer staff
  56. YAPC::Japan • Held in some cities: • YAPC::Hokkaido 2016 Sapporo

    • YAPC::Kansai 2017 Osaka • YAPC::Fukuoka 2017 Hakata • YAPC::Okinawa 2017 Onnason • YAPC::Tokyo 2018
  57. YAPC::Japan • YAPC::Japan is small conference • 1-2 times in

    a year, 1 conference = 1.5 days • About 150-200 attendees, 20-30 speakers
  58. YAPC::Japan • JPA and sponsors support students • We provide

    some costs of attending • We want them to know Perl and learn a lot!!!
  59. YAPC::Japan • In YAPC::Japan, we talk about various topics •

    YAPC::Japan is conference of Perl and some topics related to Perl • For example, infrastructure, team management, security, education...
  60. YAPC::Japan • Of course, there are many advanced talks about

    Perl!!! • Takahiro Shimizu's "How to build traditional Perl interpreters" is one of them • This is spoken at YAPC::Tokyo 2019
  61. YAPC::Japan • Next YAPC::Japan is...

  62. YAPC::Japan • Next YAPC::Japan is... • YAPC::Kyoto 2020 !!!!!!!!!!!! •

    in 27-28 March
  63. Local Communities • There are some pm in Japan •

    Hokkaido.pm, Shibuya.pm, Kichijoji.pm, Kansai.pm, Fukuoka.pm, Okinawa.pm... • JPA supports these communities • Detach a famous Perl Monger to study session • Support operational cost
  64. Perl Entrance • Introductory class for Perl • Teach Perl

    to inexperienced people • JPA supports this community • I spoke in YAPC::EU 2015
 https://speakerdeck.com/papix/teaching-and-learning-perl
  65. Conclusion

  66. Conclusion • I talked about current status of Perl in

    Japan • Web service developing and Community • I'm grad if our knowledge is helpful for you • I think we have many things in common and differences • I'd like to interact with you about them!
  67. Thank you for listening!