Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
YAPC::Fukuoka lunch session
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Harukasan
PRO
July 01, 2017
Technology
3.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
YAPC::Fukuoka lunch session
YAPC::Fukuoka ランチスポンサーセッション
2017-07-01
Harukasan
PRO
July 01, 2017
More Decks by Harukasan
See All by Harukasan
Harucom Follow-up
harukasan
PRO
1
42
Building a Standalone Programming Environment
harukasan
PRO
1
2.1k
Successor to PicoRabbit: Ruby Programming Envorinment / RubyKaigi 2025 follow up
harukasan
PRO
1
1.4k
Write your own mrbgem, Create your own device
harukasan
PRO
1
470
PicoRabbit: a Tiny Presentation Device Powered by Ruby
harukasan
PRO
2
1.9k
pixivを支える技術 / 技育CAMPアカデミア
harukasan
PRO
3
630
20240401 新卒研修 - ピクシブにおける技術領域
harukasan
PRO
1
960
ピクシブのコンテンツ配信基盤技術 / pixiv TECH SALON
harukasan
PRO
5
6k
Goにおける画像ファイル処理 / golang.tokyo #19
harukasan
PRO
7
6.9k
Other Decks in Technology
See All in Technology
SREの視点で考えるSIEM活用術 〜AWS環境でのセキュリティ強化〜
cscengineer
PRO
0
100
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
240
beyond jj: config & tools ecosystem
indirect
0
4.1k
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
190
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
3
1.7k
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
2
550
リアーキテクチャ後の障害ゼロを目指したShadow Testingの取り組み
nihonbuson
PRO
1
160
人間はどの意思決定を手放せるのか
kawasima
15
7.3k
JSONataとAWS Step Functionsで目指すRuntimelessな世界
mu7889yoon
0
170
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
2.1k
Reactの設計論
uhyo
24
14k
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
600
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
The untapped power of vector embeddings
frankvandijk
2
1.9k
Music & Morning Musume
bryan
48
7.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Skip the Path - Find Your Career Trail
mkilby
1
230
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
810
Designing for Performance
lara
611
70k
Transcript
ଵଦͰ͋ΔΤϯδχΞͷͨΊͷΫϥυը૾มαʔϏε @harukasan / MICHII Shunsuke 2017-07-01 :"1$'VLVPLBϥϯνεϙϯαʔηογϣϯ
)BSVLBTBOಓҪढ़հ ϐΫγϒ ג ϦʔυΤϯδχΞ *NBHF'MVYࣄۀऀ ԬΦϑΟεͰͳ͘౦ژຊࣾۈ Ԭݝٱཹถࢢੜ·Ε ٱཹถߴઐˠେ ൧௩ ˠஜେӃˠϐΫγϒೖࣾ
3VCZͱ(Pͱ͢͜͠4DBMBΛॻ͘ΠϯϑϥܥΤϯδχΞ ීஈࣇͷ
None
࡞׆ಈ͕ͬͱָ͘͠ͳΔॴΛͭ͘Δ
None
ϥϯνηογϣϯ
None
ϖ Image ϖ Image ϖ Image ϖ Image ϖ Image
ϖ Image
ϨΠΞτΛม͍͑ͨ ৽͍͠αΠζͷαϜωΠϧ͕΄͍͠ ৽͍͠σόΠεʹରԠ͍ͨ͠ ͍··ͰͷαϜωΠϧͩͱখ͍͞ ͖Ε͍ʹݟ͑ΔΑ͏ʹ͍ͨ͠ ը࣭Λམͱͣ͞ʹॖখ͍ͨ͠ දࣔΛ͍ͨ͘͠ WebPͰ৴͍ͨ͠
զʑΤϯδχΞͰ͋ΔͷͰ ͜ΕΒͷʹରͯ͋͠Δఔ·Ͱ ಠྗͰର߅͢Δ͜ͱ͕Ͱ͖Δ
ͨͱ͑Image::MagickΛ͏ use Image::Magick; $img = Image::Magick->new(); $img->Read("input.jpg"); $img->Resize( geometry =>
"400x400", ); ... $img->Write("output.jpg");
ͨͱ͑CSSͰ͏·͍͜ͱ߹ΘͤΔ .img { background-image: url("input.jpg"); /* style attributeͰࢦఆ͢Δͷ͕Ұൠత */ background-size:
cover; background-position: center center; width: 400px; height: 400px; }
ͨͱ͑ngx_small_lightΛ͏ server { listen 8000; server_name localhost; small_light on; small_light_pattern_define
square dw=400,dh=400,da=l,q=95,e=imagemagick,jpeghint=y; # http://localhost:8000/small_light(p=square)/input.jpg location ~ small_light[^/]*/(.+)$ { set $file $1; rewrite ^ /$file; } }
දࣔͰ͖ͯΔ͔ΒͱΓ͍͍͚͋͑ͣͲ͜ΕͰਖ਼͍͠ͷʁ ImageMagickʹresizeɺscaleͱthumbnail͕͋Δ͚Ͳ ͳΜ͔ಛఆͷϒϥβͰݟΔͱ৭͕มΘͬͯݟ͑Δ͚Ͳ ͕ࣗΊͨޙ୭͕ϝϯςͰ͖ΔΜͩΖ͏……
૿͑ଓ͚͍ͯ͘αʔϏε ͯ͢ͷWebαʔϏε͕ ը૾ॲཧΛ࣮/ӡ༻͢Δඞཁ͕͋Δͷ͔ʁ
ੲαʔόύʔπΛങ͍͚ͬͯͭͬͯͨ͘Ͳ……
ଵଦͰ͋ΔΤϯδχΞͷͨΊͷΫϥυը૾มαʔϏε
HTTP/S3ετϨʔδ ը૾มॲཧ ΦϦδφϧը૾Λऔಘ มޙΩϟογϡΛ৴ ΤϯυϢʔβ ίϯςϯπΩϟογϡ URLΛม͑Δ͚ͩͰը૾ม https://example.imageflux.jp/w=400,h=400/input.jpg ͍··Ͱ͍ͬͯͨ ετϨʔδΛͦͷ··͑Δ
ͭ·Γɺ͍͍ͩͨ small light as a service
ࣾͰར༻͍ͯͨ͠ը૾มγεςϜ͕ϕʔε ϐΫγϒ͕UGCը૾ϑΝΠϧͱઓ͖ͬͯͨྺ࢙ ࣾͰ͍͠B2BαʔϏε ͘͞ΒΠϯλʔωοτͱڞಉͰ։ൃɺӡ༻ ImageMagickΛ͍ͬͯͳ͍
LVS LB / DSR nginx HTTP front server ৴Ϋϥελ ཧαʔό
GRPC HTTP API Traffic Server HTTP front server Golang Thumbnailing server Golang Fetching server Golang Master server Scala Console / API
ͳͥGoͰॻ͍͍ͯΔͷ͔: - ܰྔεϨου(goroutine) - ඇಉظॲཧΛॎʹॻ͚Δʢωετ͠ͳ͍͍ͯ͘ʣ - γϯάϧόΠφϦ - CͷίʔυΛݺΔ
cgo package main // // int fortytwo() // { //
return 42; // } // import "C" import "fmt" func main() { fmt.Println(int(C.fortytwo())) // Output: 42 } ίϝϯτ෦ʹCͷίʔυΛهड़
cgo ίϝϯτ෦ʹCͷίʔυΛهड़ʢͪΐͬͱ͖ͪΘΔ͍ʣ Go͔ΒCͷܕΛ͑Δ - C.int - C.MyFunc
net/http libjpeg-turbo scale libpng CͷϥΠϒϥϦ GoͷHTTPαʔό࣮ GoͱCͷ͍͍ͱ͜ͲΓ
౦ژɺԬͷ྆ํʹ։ൃऀ/Ϛωʔδϟ͕͍·͢ appear.inͰ౦ژ-ԬΛ24࣌ؒଓ ͘͞Β౦ژɺϐΫγϒ౦ژɺ͘͞ΒେࡕɺϐΫγϒԬ ͰςϨΧϯ͢Δָ͍͠৬Ͱ͢ Tokyo Osaka Fukuoka
ImageFluxͰΤϯδχΞΛืू͍ͯ͠·͢ʂ Wantedlyɺฐࣾ࠾༻αΠτɺ࠙͘͠ձͰ HTTPϓϩΩγΛॻ͍ͨΓը૾มΛ࠷దԽͨ͠Γ ָ͍͠৬Ͱ͢ ౦ژͰԬͰಇ͚·͢ ϐΫγϒԬΦϑΟε ϐΫγϒ౦ژຊࣾ