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
30days Album の裏側 + 表側
Search
Kensuke Nagae
May 23, 2012
Technology
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
30days Album の裏側 + 表側
Mitaka.rb#12 の LT で発表したときの資料です
Kensuke Nagae
May 23, 2012
Transcript
19 slides
30days Album の裏側 + 表側 2011/06/21 Mitaka.rb#12 @kyanny
$ whoami • 長永 健介 <Kensuke Nagae> • 刺身☆ブーメラン •
@kyanny • ペパボでプログラマやってます
30days Album • http://30d.jp/ • 写真共有・保存サービス • 2008年4月リリース
規模は? • 95,000 人のユーザー • 57,000,000 枚の写真 • 113,000,000,000,000 バイトのストレージ
アーキテクチャ
Backend の話 • ストレージについて ◦ MogileFS ◦ Storage API •
ジョブキューについて ◦ TheSchwartz ◦ Job API
Backend (1) • MogileFS ◦ 分散ファイルストレージ ◦ 大手サイトで導入事例多数(らしい) ◦ 詳しくは
google.com/?q=mogilefs
Backend (2) • Storage API ◦ アプリケーションとストレージを繋ぐ ◦ Perl 5.8
+ Catalyst 5.7 ◦ lighttpd + FastCGI ◦ ファイル操作(保存・削除) ◦ 基本的な HTTP メソッドをサポート ◦ なぜわざわざ API? ▪ 疎結合 ▪ ライブラリの実装言語の違い(Perl と Ruby)
Backend (3) • TheSchwartz ◦ Job Queue ◦ delayed_job のようなもの
◦ 写真のリサイズ、動画の変換、ストレージへの保存 ◦ 処理ごとに別のワーカーを稼働 ◦ 各ワーカーは fork してマルチプロセスで処理
Backend (4) • Job API ◦ アプリケーションと TheSchwartz を繋ぐ ◦
パラメータを受け取ってジョブキューに追加 ◦ Storage API とほぼ同じ構成 ◦ わざわざ API な理由もほぼ同じ ◦ こちらは XMLRPC
詳しくは・・・ • 関西オープンソース 2008 30days Albumの裏側 ◦ http://www.slideshare.net/mizzy/2008-30days-album- presentation •
Yapc Asia 2009 ペパボでのPerlの使い方 ◦ http://www.slideshare.net/hiboma/yapc-asia-2009-perl • YAPC Asia 2010 30days Albumの裏側 後日談 ◦ http://www.slideshare.net/kyanny/inside-30days- albumlaterstory-5452817
Frontend の話 • Ruby + Rails • Passenger • Plugins
/ Middlewares • Test
Frontend (1) • Ruby 1.8.6 (MRI) • Ruby on Rails
2.x.x (censored) • どちらもだいぶ古い • バージョンアップしたい!・・・しかしテストが(後述 • Rails の灯を絶やさないように頑張ってます
Frontend (2) • Phusion Passenger • lighttpd + FastCGI から移行
◦ 理由 (1) 省メモリ化したかった ▪ メモリ消費量は変わらなかった・・・ ◦ 理由 (2) 安定化したかった ▪ だいぶ安定した • アプリケーションサーバは2台で運用 ◦ 若干の増減あり(なるべくスケールアップ)
Frontend (3) • Plugins / Middlewares ◦ BackgrounDRb (!) ▪
データベース使わないやつ (!!) ▪ ソースも情報もないオーパーツ状態 ▪ Friends don’t let friends use backgrounDRb. ▪ http://www.engineyard.com/blog/2009/5-tips-for- deploying-background-jobs/ ▪ とはいえたくさん使ってる(非同期処理) ◦ delayed_job ▪ 移行を見据えて一部で導入(メール投稿) ▪ 意外に使いづらい(priority) ▪ resque も試してみたい
Frontend (4) • Test ◦ shoulda ◦ factory_girl (@func09 さんのブログで勉強した)
▪ http://www.func09.com/wordpress/archives/532 ◦ mocha ◦ 書いてます、けど不十分・・・ ◦ RSpec にすべきか年数回くらい悩む
今後について • 正直このスライドにたどり着けると思ってなかった • 開発者目線で今後取り組みたいこと ◦ 継続的インテグレーション ◦ テストの充実 ◦
Rails のバージョンアップ ◦ 「日本一の写真共有サービス」を目指したい ◦ 「日本の代表的な Rails 製サービス」に数えられたい
まさかまだ時間があるなんて • 中途採用やってます! ◦ http://www.paperboy.co.jp/recruit/ ◦ 開発言語は PHP です!(キリッ ◦
むしろ Rubyist 増えて欲しい・・・
ご静聴ありがとうございました
More Decks by Kensuke Nagae
See All by Kensuke Nagae
スタディサプリ開発チームのこれまでとこれから / StudySapuri Product Meetup #1
kyanny
0
2.7k
Tokyo Web Dev hiring discussion session
kyanny
0
13k
sbpayment.rbのご紹介
kyanny
0
2.2k
#AsiaDevNight
kyanny
0
200
Grape による API 実装 in action
kyanny
7
7.4k
<%= link_to "bundle", "update" %> - Make "bundle update" more fun to review
kyanny
2
5.4k
Web Developer Seminar
kyanny
0
2k
Heroku を利用した Quipper の開発事例紹介
kyanny
11
3.5k
Continuous gem dependency updating with Jenkins and Pull Request
kyanny
9
3.5k
Other Decks in Technology
See All in Technology
現場に渡し、構造で守る AI エージェントを活用したセルフサーブのデータ基盤の運用
legalontechnologies
PRO
0
150
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
530
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
5
18k
デザインシステムのフィードバックループをほぼ自動化した話
tongari07
1
1.2k
メルカリの小規模チーム「Pod」で、 エンジニアがデータアナリストなしで、 AIを使ってデータ分析の自走を目指す取り組み
jackojacko_
1
370
想定外の利用がプロダクトの価値を広げる
lycorptech_jp
PRO
0
130
猫でもわかるKiro初心者編(2026年11月版)
kentapapa
1
120
その修正で本当に速くなったのか? k6とOpenTelemetryで確かめる性能改善 / Performance review with k6 and OpenTelemetry
ymotongpoo
3
480
フルTypeScript × AI駆動開発で開発量が数倍に (JSConf JP 2026 スポンサーLT:NCDC株式会社)
keitaibaraki
0
570
AIフレンドリーなGenerative UIをJSXで
uhyo
2
870
Go でトランザクション、どう書いてますか?
knwoop
2
640
ポケモンバトルのAIエージェント
koji_kawamura
0
320
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Mind Mapping
helmedeiros
1
460
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
4.1k
Abbi's Birthday
coloredviolet
5
11k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
The Art of Programming - Codeland 2020
erikaheidi
57
15k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
Optimising Largest Contentful Paint
csswizardry
37
4k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
410
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490