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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
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
The Invisible Side of Design
smashingmag
301
52k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Product Roadmaps are Hard
iamctodd
55
13k
Embracing the Ebb and Flow
colly
88
5.2k
Ethics towards AI in product and experience design
skipperchong
2
360
Music & Morning Musume
bryan
47
7.4k
Side Projects
sachag
455
43k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
New Earth Scene 8
popppiees
3
2.5k
Are puppies a ranking factor?
jonoalderson
2
3.9k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
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%が 地方大学出身!
スモールビジネスを、世界の主役に。