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
hachi (Hayao Kimura)
December 06, 2024
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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)
転職を「転機」にする/Turning a job change into a turning point
hayaokimura
2
140
Integration of PRK Firmware and R2P2
hayaokimura
1
370
PicoRuby で拓く電子工作の世界/The World of Electronics Projects Opened by PicoRuby
hayaokimura
2
1.5k
RISC-V CPU emulator made with Ruby
hayaokimura
2
110
Ruby で作る RISC-V CPU エミュレーター / RISC-V CPU emulator made with Ruby
hayaokimura
5
2.3k
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
1k
社内でGemを読む会をして捗っている/Progressing Well: A Gem Reading Session at Work
hayaokimura
1
89
Raw HID とOLEDで広げるキーボードの可能性/Expanding Keyboard Possibilities with Raw HID and OLED
hayaokimura
0
190
いいチームでいるためにやっていること/Things we are doing to remain a good team
hayaokimura
2
790
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
The agentic SEO stack - context over prompts
schlessera
0
880
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
370
Building an army of robots
kneath
306
46k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
Six Lessons from altMBA
skipperchong
29
4.5k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
680
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Faster Mobile Websites
deanohume
310
32k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
440
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%が 地方大学出身!
スモールビジネスを、世界の主役に。