Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
YAPC::Fukuoka lunch session
YAPC::Fukuoka ランチスポンサーセッション
2017-07-01
Harukasan
PRO
July 01, 2017
More Decks by Harukasan
See All by Harukasan
Building a Standalone Programming Environment
harukasan
PRO
1
92
Successor to PicoRabbit: Ruby Programming Envorinment / RubyKaigi 2025 follow up
harukasan
PRO
1
240
Write your own mrbgem, Create your own device
harukasan
PRO
1
340
PicoRabbit: a Tiny Presentation Device Powered by Ruby
harukasan
PRO
2
740
pixivを支える技術 / 技育CAMPアカデミア
harukasan
PRO
3
580
20240401 新卒研修 - ピクシブにおける技術領域
harukasan
PRO
1
920
ピクシブのコンテンツ配信基盤技術 / pixiv TECH SALON
harukasan
PRO
5
5.9k
Goにおける画像ファイル処理 / golang.tokyo #19
harukasan
PRO
7
6.8k
WebRTC動画をトランスコードする / Transcoding video streams from WebRTC
harukasan
PRO
5
1.7k
Other Decks in Technology
See All in Technology
Route 53 Global Resolver で高額課金発生!
otanikohei2023
0
110
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
140
2026年、知っておくべき最新 サーバレスTips10選/serverless-10-tips
slsops
13
5.2k
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
410
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
2
2.6k
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
130
生成AIが変える SaaS の競争原理と弁護士ドットコムのプロダクト戦略
bengo4com
1
1.4k
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
170
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
390
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
100
Azure Static Web Apps の自動ビルドがタイムアウトしやすくなった状況に対応した件/global-azure2026
thara0402
0
420
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
290
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Being A Developer After 40
akosma
91
590k
Heart Work Chapter 1 - Part 1
lfama
PRO
6
35k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
200
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
Chasing Engaging Ingredients in Design
codingconduct
0
170
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
740
Automating Front-end Workflow
addyosmani
1370
200k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
A Soul's Torment
seathinner
6
2.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
The agentic SEO stack - context over prompts
schlessera
0
750
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ϓϩΩγΛॻ͍ͨΓը૾มΛ࠷దԽͨ͠Γ ָ͍͠৬Ͱ͢ ౦ژͰԬͰಇ͚·͢ ϐΫγϒԬΦϑΟε ϐΫγϒ౦ژຊࣾ