SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
Perl
LINE NEWS
LINE (@nipotan)
@nipotan
nipotan
https://github.com/nipotan
LINE 3
http://nipotan.com
livedoor News LINE NEWS
•
•
•
•
LINE
livedoor News livedoor Blog
BLOGOS LINE NEWS
Perl
Sledge Sledge
Pickles Amon2
LINE NEWS
●
● Amon2
● JSON API
● Web
● Admin CMS
Jul 2013
MAU
300
( 2012 2 )
LINE NEWS
LINE NEWS DIGEST
LINE Messaging API -
https://developers.line.me/ja/docs/messaging-api/reference/
MAU
600
LINE NEWS DIGEST
● Perl
● Imager
●
●
LINE NEWS DIGEST
use strict;
use warnings;
use utf8;
use Imager;
use Imager::Font;
my $header = Imager->new(xsize => 1040, ysize => 140); #
$header->box(filled => 1, color => '#ffffff');
my $logo = Imager->new(file => '/path/to/line-news-logo.png'); #
$header->compose(src => $logo, tx => 36, ty => 40);
#
my $hiragino_w3 = Imager::Font->new(file => ‘/path/to/hiragino-kakugo-w3.otf');
my $hiragino_w6 = Imager::Font->new(file => '/path/to/hiragino-kakugo-w6.otf');
#
my $go = 'YAPC::Okinawa ';
my $bbox = $hiragino_w3->bounding_box(string => $go, size => 28); #
my $x = 1040 - 36 - $bbox->pos_width; # 36 px
$header->string(
font => $hiragino_w3,
text => $go,
x => $x,
y => 80,
size => 28,
color => '#a0a0a0',
aa => 1,
);
LINE NEWS DIGEST
LINE NEWS DIGEST
0%
55%
my $headline = Imager->new(file => '/path/to/yapcjapan2018.png');
# y 370 793 423 px
# 0% 55%
# 1040x1
my $line = Imager->new(
xsize => 1040,
ysize => 1,
channels => 4, # alpha channel
);
$line->box(filled => 1, color => '#000000'); #
my $opacity = 0.00;
my $increment_per_line = (0.55 - $opacity) / 423; # 1 px
for my $y (370 .. 793) {
$headline->compose(
src => $line,
tx => 0,
ty => $y,
opacity => $opacity,
);
$opacity += $increment_per_line;
}
LINE NEWS DIGEST
#
my $tp = Imager->new(
xsize => 1040,
ysize => 794,
channels => 4, # alpha channel
);
#
my $title = 'YAPC::Japan ';
#
my $description = '2018 3 3 OIST@ Perl ';
#
$tp->string(
font => $hiragino_w6,
text => $title,
x => 36,
y => 684,
size => 70,
color => '#000000',
aa => 1,
);
$tp->string(
font => $hiragino_w3,
text => $description,
x => 36,
y => 748,
size => 40,
color => '#000000',
aa => 1,
);
# 43%
$headline->compose(src => $tp, tx => 0, ty => 0, opacity => 0.43);
LINE NEWS DIGEST
$headline->string(
font => $hiragino_w6,
text => $title,
x => 36,
y => 682,
size => 70,
color => '#ffffff',
aa => 1,
);
$headline->string(
font => $hiragino_w3,
text => $description,
x => 36,
y => 746,
size => 40,
color => '#ffffff',
aa => 1,
);
LINE NEWS DIGEST
my $img01 = Imager->new(file => '/path/to/ao-no-doukutsu.jpg');
my $line = Imager->new(
xsize => 386,
ysize => 1,
channels => 4,
);
$line->box(filled => 1, color => '#000000');
my $opacity = 0.00;
my $increment_per_line = (0.55 - $opacity) / 203;
for my $y (171 .. 374) {
$img01->compose(
src => $line,
tx => 0,
ty => $y,
opacity => $opacity,
);
$opacity += $increment_per_line;
}
my $tp = Imager->new(
xsize => 386,
ysize => 375,
channels => 4,
);
$tp->string(
font => $hiragino_w3,
text => ' ',
x => 36,
y => 338,
size => 40,
color => '#000000',
aa => 1,
);
$img01->compose(src => $tp, tx => 0, ty => 0, opacity => 0.43);
$img01->string(
font => $hiragino_w3,
text => ' ',
x => 36,
y => 336,
size => 40,
color => '#ffffff',
aa => 1,
);
LINE NEWS DIGEST
my @titles = (
‘ ’, ' ',
‘ ', ' ',
' ',
);
my @text_news;
for my $i (0 .. 4) {
my $text = Imager->new(xsize => 654, ysize => 150); #
$text->box(filled => 1, color => '#ffffff');
my $line = Imager->new(xsize => 654, ysize => 2); #
$line->box(filled => 1, color => '#dde0e6');
$text->paste(left => 0, top => 148, img => $line);
$text->string(
font => $hiragino_w3,
text => $titles[$i],
x => 36,
y => 91,
size => 41,
color => '#000000',
aa => 1,
);
push @text_news, $text;
}
LINE NEWS DIGEST
#
my $footer = Imager->new(xsize => 1040, ysize => 140);
$footer->box(filled => 1, color => '#ffffff');
my $arrow = Imager->new(file => '/path/to/arrow.png');
$footer->compose(src => $arrow, tx => 984, ty => 53);
$footer->string(
font => $hiragino_w6,
text => ' ',
x => 36,
y => 84,
size => 36,
color => '#284096',
aa => 1,
);
LINE NEWS DIGEST
#
my $base = Imager->new(xsize => 1040, ysize => 1824);
$base->box(filled => 1, color => '#ffffff');
$base->paste(left => 0, top => 0, img => $header);
$base->paste(left => 0, top => 140, img => $headline);
$base->paste(left => 0, top => 934, img => $img01);
$base->paste(left => 0, top => 1309, img => $img02);
my $y = 934;
for my $i (0 .. 4) {
$base->paste(left => 386, top => $y + $i * 150, img => $text_news[$i]);
}
$base->paste(left => 0, top => 1684, img => $footer);
LINE NEWS DIGEST
Imager
Apr 2016Apr 2015
LINE
Web App
Feb 2017
LINE 5
Dec 2015
LINE
LINE NEWS
MAU
1200
MAU
2200
MAU
4100
MAU
5900
…
● LINE NEWS DIGEST
●
Request count
1 LINE NEWS
By Facebook
Instant
Articles
By Google
AMP
By SmartNews
Smart
View
0.5
●
● SPA (Single-Page Application)
● HTML
●
● id auto paging
●
● + localStorage
0.5
UIT++
●
● CDN
● CDN
●
● Cache-Control
● HTTP/2
● origin HTTP/1.1 CDN
● static content proxy connection reuse
0.5
● KVS
● HTTP
● PSGI
●
● Primary Key Array
●
● Primary Key get() || get_multi()
0.5
MISSION COMPLETED
LINE NEWS
● LINE NEWS vs Perl
● Perl
● Java
● Perl 5 vs Java 9
● Perl & Java 3
● Perl
● Perl …
LINE NEWS
● Perl:Java 6:4 ( )
●
● Web API http://d.hatena.ne.jp/naoya/20060228/1141094456
●
●
● Java
● Java
● Perl
● Perl Web API Java
● “ ” …
LINE NEWS
● Perl
● Java GOOD
● Perl
● LINE Perl
●
LINE
● Shibuya Perl Mongers #1 (Jan 31, 2003)
● 15 20 Perl
● YAPC::Asia (2006 2015) Perl
● 40 …
● Okinawa Perl Mongers
●
THANK YOU

Mais conteúdo relacionado

Mais procurados

London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)Dennis Knochenwefel
 
Metropolitan Information Architecture
Metropolitan Information ArchitectureMetropolitan Information Architecture
Metropolitan Information ArchitectureJohn Tolva
 
WordPress 3.1 at DC PHP
WordPress 3.1 at DC PHPWordPress 3.1 at DC PHP
WordPress 3.1 at DC PHPandrewnacin
 
PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenicsGiorgio Cefaro
 
(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and ProfitOlaf Alders
 
Desenvolvimento web usando django
Desenvolvimento web usando djangoDesenvolvimento web usando django
Desenvolvimento web usando djangoyurimalheiros
 
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)James Titcumb
 
Connecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup LanguageConnecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup LanguageMarkku Laine
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門Yusuke Wada
 
Apresentação 4T09 - EN
Apresentação 4T09 - ENApresentação 4T09 - EN
Apresentação 4T09 - ENCR2
 

Mais procurados (20)

London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)
 
Noticias Pirata
Noticias PirataNoticias Pirata
Noticias Pirata
 
Metropolitan Information Architecture
Metropolitan Information ArchitectureMetropolitan Information Architecture
Metropolitan Information Architecture
 
WordPress 3.1 at DC PHP
WordPress 3.1 at DC PHPWordPress 3.1 at DC PHP
WordPress 3.1 at DC PHP
 
PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenics
 
(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit
 
Educacion fisica
Educacion fisicaEducacion fisica
Educacion fisica
 
wget.pl
wget.plwget.pl
wget.pl
 
Retrato de xavi.
Retrato de xavi.Retrato de xavi.
Retrato de xavi.
 
Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01
 
MIPS Merge Sort
MIPS Merge SortMIPS Merge Sort
MIPS Merge Sort
 
Php
PhpPhp
Php
 
Morley Residence brochure
Morley Residence brochureMorley Residence brochure
Morley Residence brochure
 
Noticias Pirata
Noticias PirataNoticias Pirata
Noticias Pirata
 
Desenvolvimento web usando django
Desenvolvimento web usando djangoDesenvolvimento web usando django
Desenvolvimento web usando django
 
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
 
Connecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup LanguageConnecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup Language
 
Theme verdadeiro
Theme verdadeiroTheme verdadeiro
Theme verdadeiro
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門
 
Apresentação 4T09 - EN
Apresentação 4T09 - ENApresentação 4T09 - EN
Apresentação 4T09 - EN
 

Semelhante a Perlで実装されたLINE NEWSの裏側

Drawing on canvas
Drawing on canvasDrawing on canvas
Drawing on canvassuitzero
 
Developing applications for performance
Developing applications for performanceDeveloping applications for performance
Developing applications for performanceLeon Fayer
 
WordPress Cuztom Helper
WordPress Cuztom HelperWordPress Cuztom Helper
WordPress Cuztom Helperslicejack
 
Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本a5494535
 
WordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixWordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixMark Jaquith
 
Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)Mark Jaquith
 
Internationalizing CakePHP Applications
Internationalizing CakePHP ApplicationsInternationalizing CakePHP Applications
Internationalizing CakePHP ApplicationsPierre MARTIN
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-KjaerCOMMON Europe
 
WordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme buildingWordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme buildingJonny Allbut
 
WordPress-Powered Portfolios
WordPress-Powered PortfoliosWordPress-Powered Portfolios
WordPress-Powered PortfoliosTyler Sticka
 
PHP cart
PHP cartPHP cart
PHP carttumetr1
 
Array Methods.pptx
Array Methods.pptxArray Methods.pptx
Array Methods.pptxstargaming38
 
Miniproject on Employee Management using Perl/Database.
Miniproject on Employee Management using Perl/Database.Miniproject on Employee Management using Perl/Database.
Miniproject on Employee Management using Perl/Database.Sanchit Raut
 
Php tips-and-tricks4128
Php tips-and-tricks4128Php tips-and-tricks4128
Php tips-and-tricks4128PrinceGuru MS
 

Semelhante a Perlで実装されたLINE NEWSの裏側 (20)

Drawing on canvas
Drawing on canvasDrawing on canvas
Drawing on canvas
 
Inc
IncInc
Inc
 
Developing applications for performance
Developing applications for performanceDeveloping applications for performance
Developing applications for performance
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
WordPress Cuztom Helper
WordPress Cuztom HelperWordPress Cuztom Helper
WordPress Cuztom Helper
 
Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本
 
PHP Tutorial (funtion)
PHP Tutorial (funtion)PHP Tutorial (funtion)
PHP Tutorial (funtion)
 
WordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixWordPress Security - WordCamp Phoenix
WordPress Security - WordCamp Phoenix
 
Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)
 
Internationalizing CakePHP Applications
Internationalizing CakePHP ApplicationsInternationalizing CakePHP Applications
Internationalizing CakePHP Applications
 
Coding part
Coding partCoding part
Coding part
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
WordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme buildingWordCamp Bristol 2019 - WordPress custom theme building
WordCamp Bristol 2019 - WordPress custom theme building
 
Daily notes
Daily notesDaily notes
Daily notes
 
WordPress-Powered Portfolios
WordPress-Powered PortfoliosWordPress-Powered Portfolios
WordPress-Powered Portfolios
 
PHP cart
PHP cartPHP cart
PHP cart
 
Substitution Cipher
Substitution CipherSubstitution Cipher
Substitution Cipher
 
Array Methods.pptx
Array Methods.pptxArray Methods.pptx
Array Methods.pptx
 
Miniproject on Employee Management using Perl/Database.
Miniproject on Employee Management using Perl/Database.Miniproject on Employee Management using Perl/Database.
Miniproject on Employee Management using Perl/Database.
 
Php tips-and-tricks4128
Php tips-and-tricks4128Php tips-and-tricks4128
Php tips-and-tricks4128
 

Mais de LINE Corporation

JJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LTJJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LTLINE Corporation
 
Reduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin CoroutinesReduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin CoroutinesLINE Corporation
 
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみたKotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみたLINE Corporation
 
Use Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extensionUse Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extensionLINE Corporation
 
The Magic of LINE 購物 Testing
The Magic of LINE 購物 TestingThe Magic of LINE 購物 Testing
The Magic of LINE 購物 TestingLINE Corporation
 
UI Automation Test with JUnit5
UI Automation Test with JUnit5UI Automation Test with JUnit5
UI Automation Test with JUnit5LINE Corporation
 
Feature Detection for UI Testing
Feature Detection for UI TestingFeature Detection for UI Testing
Feature Detection for UI TestingLINE Corporation
 
LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享LINE Corporation
 
​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享LINE Corporation
 
LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣LINE Corporation
 
日本開發者大會短講分享
日本開發者大會短講分享日本開發者大會短講分享
日本開發者大會短講分享LINE Corporation
 
LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享LINE Corporation
 
在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed KubernetesLINE Corporation
 
LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧LINE Corporation
 
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹LINE Corporation
 
LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享LINE Corporation
 
LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗LINE Corporation
 
LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務LINE Corporation
 
Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發LINE Corporation
 

Mais de LINE Corporation (20)

JJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LTJJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LT
 
Reduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin CoroutinesReduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin Coroutines
 
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみたKotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
 
Use Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extensionUse Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extension
 
The Magic of LINE 購物 Testing
The Magic of LINE 購物 TestingThe Magic of LINE 購物 Testing
The Magic of LINE 購物 Testing
 
GA Test Automation
GA Test AutomationGA Test Automation
GA Test Automation
 
UI Automation Test with JUnit5
UI Automation Test with JUnit5UI Automation Test with JUnit5
UI Automation Test with JUnit5
 
Feature Detection for UI Testing
Feature Detection for UI TestingFeature Detection for UI Testing
Feature Detection for UI Testing
 
LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享
 
​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享
 
LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣
 
日本開發者大會短講分享
日本開發者大會短講分享日本開發者大會短講分享
日本開發者大會短講分享
 
LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享
 
在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes
 
LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧
 
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
 
LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享
 
LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗
 
LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務
 
Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Perlで実装されたLINE NEWSの裏側

  • 3. livedoor News LINE NEWS • • • • LINE
  • 4. livedoor News livedoor Blog BLOGOS LINE NEWS Perl Sledge Sledge Pickles Amon2
  • 6. ● ● Amon2 ● JSON API ● Web ● Admin CMS Jul 2013 MAU 300
  • 7. ( 2012 2 ) LINE NEWS
  • 8. LINE NEWS DIGEST LINE Messaging API - https://developers.line.me/ja/docs/messaging-api/reference/ MAU 600
  • 11. use strict; use warnings; use utf8; use Imager; use Imager::Font; my $header = Imager->new(xsize => 1040, ysize => 140); # $header->box(filled => 1, color => '#ffffff'); my $logo = Imager->new(file => '/path/to/line-news-logo.png'); # $header->compose(src => $logo, tx => 36, ty => 40); # my $hiragino_w3 = Imager::Font->new(file => ‘/path/to/hiragino-kakugo-w3.otf'); my $hiragino_w6 = Imager::Font->new(file => '/path/to/hiragino-kakugo-w6.otf'); # my $go = 'YAPC::Okinawa '; my $bbox = $hiragino_w3->bounding_box(string => $go, size => 28); # my $x = 1040 - 36 - $bbox->pos_width; # 36 px $header->string( font => $hiragino_w3, text => $go, x => $x, y => 80, size => 28, color => '#a0a0a0', aa => 1, ); LINE NEWS DIGEST
  • 13. my $headline = Imager->new(file => '/path/to/yapcjapan2018.png'); # y 370 793 423 px # 0% 55% # 1040x1 my $line = Imager->new( xsize => 1040, ysize => 1, channels => 4, # alpha channel ); $line->box(filled => 1, color => '#000000'); # my $opacity = 0.00; my $increment_per_line = (0.55 - $opacity) / 423; # 1 px for my $y (370 .. 793) { $headline->compose( src => $line, tx => 0, ty => $y, opacity => $opacity, ); $opacity += $increment_per_line; } LINE NEWS DIGEST
  • 14. # my $tp = Imager->new( xsize => 1040, ysize => 794, channels => 4, # alpha channel ); # my $title = 'YAPC::Japan '; # my $description = '2018 3 3 OIST@ Perl '; # $tp->string( font => $hiragino_w6, text => $title, x => 36, y => 684, size => 70, color => '#000000', aa => 1, ); $tp->string( font => $hiragino_w3, text => $description, x => 36, y => 748, size => 40, color => '#000000', aa => 1, ); # 43% $headline->compose(src => $tp, tx => 0, ty => 0, opacity => 0.43); LINE NEWS DIGEST
  • 15. $headline->string( font => $hiragino_w6, text => $title, x => 36, y => 682, size => 70, color => '#ffffff', aa => 1, ); $headline->string( font => $hiragino_w3, text => $description, x => 36, y => 746, size => 40, color => '#ffffff', aa => 1, ); LINE NEWS DIGEST
  • 16. my $img01 = Imager->new(file => '/path/to/ao-no-doukutsu.jpg'); my $line = Imager->new( xsize => 386, ysize => 1, channels => 4, ); $line->box(filled => 1, color => '#000000'); my $opacity = 0.00; my $increment_per_line = (0.55 - $opacity) / 203; for my $y (171 .. 374) { $img01->compose( src => $line, tx => 0, ty => $y, opacity => $opacity, ); $opacity += $increment_per_line; } my $tp = Imager->new( xsize => 386, ysize => 375, channels => 4, ); $tp->string( font => $hiragino_w3, text => ' ', x => 36, y => 338, size => 40, color => '#000000', aa => 1, ); $img01->compose(src => $tp, tx => 0, ty => 0, opacity => 0.43); $img01->string( font => $hiragino_w3, text => ' ', x => 36, y => 336, size => 40, color => '#ffffff', aa => 1, ); LINE NEWS DIGEST
  • 17. my @titles = ( ‘ ’, ' ', ‘ ', ' ', ' ', ); my @text_news; for my $i (0 .. 4) { my $text = Imager->new(xsize => 654, ysize => 150); # $text->box(filled => 1, color => '#ffffff'); my $line = Imager->new(xsize => 654, ysize => 2); # $line->box(filled => 1, color => '#dde0e6'); $text->paste(left => 0, top => 148, img => $line); $text->string( font => $hiragino_w3, text => $titles[$i], x => 36, y => 91, size => 41, color => '#000000', aa => 1, ); push @text_news, $text; } LINE NEWS DIGEST
  • 18. # my $footer = Imager->new(xsize => 1040, ysize => 140); $footer->box(filled => 1, color => '#ffffff'); my $arrow = Imager->new(file => '/path/to/arrow.png'); $footer->compose(src => $arrow, tx => 984, ty => 53); $footer->string( font => $hiragino_w6, text => ' ', x => 36, y => 84, size => 36, color => '#284096', aa => 1, ); LINE NEWS DIGEST
  • 19. # my $base = Imager->new(xsize => 1040, ysize => 1824); $base->box(filled => 1, color => '#ffffff'); $base->paste(left => 0, top => 0, img => $header); $base->paste(left => 0, top => 140, img => $headline); $base->paste(left => 0, top => 934, img => $img01); $base->paste(left => 0, top => 1309, img => $img02); my $y = 934; for my $i (0 .. 4) { $base->paste(left => 386, top => $y + $i * 150, img => $text_news[$i]); } $base->paste(left => 0, top => 1684, img => $footer); LINE NEWS DIGEST
  • 21. Apr 2016Apr 2015 LINE Web App Feb 2017 LINE 5 Dec 2015 LINE LINE NEWS MAU 1200 MAU 2200 MAU 4100 MAU 5900
  • 22. … ● LINE NEWS DIGEST ●
  • 25. ● ● SPA (Single-Page Application) ● HTML ● ● id auto paging ● ● + localStorage 0.5 UIT++
  • 26. ● ● CDN ● CDN ● ● Cache-Control ● HTTP/2 ● origin HTTP/1.1 CDN ● static content proxy connection reuse 0.5
  • 27. ● KVS ● HTTP ● PSGI ● ● Primary Key Array ● ● Primary Key get() || get_multi() 0.5
  • 30. ● LINE NEWS vs Perl ● Perl ● Java ● Perl 5 vs Java 9 ● Perl & Java 3 ● Perl ● Perl … LINE NEWS
  • 31. ● Perl:Java 6:4 ( ) ● ● Web API http://d.hatena.ne.jp/naoya/20060228/1141094456 ● ● ● Java ● Java ● Perl ● Perl Web API Java ● “ ” … LINE NEWS
  • 32. ● Perl ● Java GOOD ● Perl ● LINE Perl ● LINE
  • 33. ● Shibuya Perl Mongers #1 (Jan 31, 2003) ● 15 20 Perl ● YAPC::Asia (2006 2015) Perl ● 40 … ● Okinawa Perl Mongers ●