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
freee請求書プロダクトにおけるFiber活用/Utilization of Fiber...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
hachi (Hayao Kimura)
December 06, 2024
170
1
Share
freee請求書プロダクトにおけるFiber活用/Utilization of Fiber in the freee Invoice Product
hachi (Hayao Kimura)
December 06, 2024
More Decks by hachi (Hayao Kimura)
See All by hachi (Hayao Kimura)
Integration of PRK Firmware and R2P2
hayaokimura
1
55
PicoRuby で拓く電子工作の世界/The World of Electronics Projects Opened by PicoRuby
hayaokimura
2
970
RISC-V CPU emulator made with Ruby
hayaokimura
2
92
Ruby で作る RISC-V CPU エミュレーター / RISC-V CPU emulator made with Ruby
hayaokimura
5
2.1k
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
810
社内でGemを読む会をして捗っている/Progressing Well: A Gem Reading Session at Work
hayaokimura
1
72
Raw HID とOLEDで広げるキーボードの可能性/Expanding Keyboard Possibilities with Raw HID and OLED
hayaokimura
0
140
いいチームでいるためにやっていること/Things we are doing to remain a good team
hayaokimura
2
740
やりたいことを仕事でやる技術 / The Technique of Turning Your Passion into Your Profession
hayaokimura
0
11k
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Amusing Abliteration
ianozsvald
1
150
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
A Soul's Torment
seathinner
6
2.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
250
Transcript
freee請求書プロダクトにおけるFiber活⽤ 2024.12.06
3⾏サマリ
Railsプロダクトで 並列リクエストを投げて 爆速ユーザー体験 🎉🎉🎉
freeeについて
…と思ったんですが
6
割愛!
freee請求書について
9
10 freee請求書とは ‧請求書をはじめとした各種帳票の作成‧管理‧送付サービス ‧もちろん電⼦帳簿保存法対応 ‧freee会計との連携で記帳もバッチリ ‧無料でも使えるので事業を始めたばかりでも安⼼
課題
12 CSVインポートのパフォーマンス ‧CSVから⼤量の請求書を作れる ‧社内の別サービスからの⼤量のデータ取得が遅い
解決策
14 並列リクエストによる社内サービス間データ取得 freee請求書 freee会計 Request A Request B Request C
Request D freee請求書 freee会計 Request A, B, C, D Before After
15 Faraday Em::Synchrony adapter ‧Faraday で em-synchrony を使えるadapter ‧em-synchrony gem:
‧EventMachine gem と Fiber を使って簡単に並⾏処理が書ける ‧Faraday::Connection#in_parallel で並列リクエスト可能に
実装
17 簡単に実装可能
結果
19 Before After
99.9%tile で倍の速さを実現 🎉🎉🎉 20
まとめ
22 まとめ ‧Faraday Em::Synchrony adapter で簡単並列リクエスト ‧ユーザーの体験が向上してハッピー ‧注意 ‧faraday-retry との相性
‧同時並列数の設定がない ‧可能なら async-http-faraday gem 使うほうがいいかも ‧faraday v2.5.0 以上が少なくとも必要そう
⾃⼰紹介とお知らせ
24 • freee 2022年4⽉⼊社 • 関⻄拠点所属 • freee でやってること
◦ freee請求書の開発 ◦ freee会計の開発 • 趣味 ◦ ダイビング、本、ゲーム、netflix ◦ Ruby、電⼦⼯作、キーボード hachi フリー株式会社 エンジニア ⽊村駿⽣/ Kimura Hayao
25
26 ⼤阪の Ruby コミュニティ Kyobashi.rb ‧昨⽇登壇した ydah san と⼀緒にやってます ‧毎⽉開催(したいと思っている)
‧⼤阪にお⽴ち寄りの際はぜひ参加してください
最後の最後に
28 ▶ freee新卒エンジニア募集中 本選考及び3Daysインターンシップ⽣を募集しています! 「ユーザー価値の追求」や「チームで作り上げていくこと」に 興味のある⽅、「シンプルにエンジニアリングが好き」な⽅は 是⾮⼀度説明会に遊びに来てください!お待ちしています! <対象> ‧2026年/2027年4⽉にご⼊社可能な⽅ ‧プログラミング経験(独学可)が3カ⽉以上の⽅
‧⼊社時点で29歳以下の⽅ 「🔍freee 新卒採⽤」で検索! 新卒エンジニアの 約50%が 地方大学出身!
スモールビジネスを、世界の主役に。