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
Mercari iOSにおける きらやばArchitectureとAutomation
Search
kagemiku
November 22, 2019
Technology
0
1.4k
Mercari iOSにおける きらやばArchitectureとAutomation
kagemiku
November 22, 2019
Tweet
Share
More Decks by kagemiku
See All by kagemiku
WWDC20 Recap of SwiftUI & Combine
kagemiku
0
4.6k
WWDC19 Recap of ML
kagemiku
0
590
Other Decks in Technology
See All in Technology
AWS re:Invent 2024 Recap in ZOZO - Serverless で好きなものをしゃべってみた
chongmyungpark
0
1.1k
12 Days of OpenAIから読み解く、生成AI 2025年のトレンド
shunsukeono_am
0
1k
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
210
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
0
190
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
180
20241220_S3 tablesの使い方を検証してみた
handy
4
870
いまからでも遅くないコンテナ座学
nomu
0
200
3年でバックエンドエンジニアが5倍に増えても破綻しなかったアーキテクチャ そして、これから / Software architecture that scales even with a 5x increase in backend engineers in 3 years
euglena1215
11
4.3k
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
720
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
130
実践! ソフトウェアエンジニアリングの価値の計測 ── Effort、Output、Outcome、Impact
nomuson
0
1.2k
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
6
1.5k
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
850
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Scaling GitHub
holman
459
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Rails Girls Zürich Keynote
gr2m
94
13k
Code Review Best Practice
trishagee
65
17k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
A better future with KSS
kneath
238
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
112
50k
Thoughts on Productivity
jonyablonski
68
4.4k
Transcript
1 Mercari iOSにおける きらやばArchitectureとAutomation Akira Fukunaga (@kagemiku) iOS Engineer 2019/11/25
2 Today’s Outlines 01 • 自己紹介 02 03 • MercariにおけるiOS
Engineer • きらやばArchitectureとAutomation
3 01 自己紹介
4 Akira Fukunaga (@kagemiku) Software Engineer (iOS) Tech Lead at
NewBiz & Category
5 人生 学校 Mercari 東京工業大学 情報理工学院 2018.04 休学 2018.07 退学
2019.03 Merpay Integration 2018.08 (サマーインターン) Merpay Integration 2018.09 - 2019.02 (内定者インターン) 退学旅行 2019.03 新卒入社 2019.04 New Customer Growth 2019.07 - 09 NewBiz 2019.10 - (Tech Lead)
6 • Merpay Integration (2018.08 - 2019.02) ◦ メルカリアプリへのメルペイ導入を行うチーム ▪
サイドメニュー撤廃 & 下タブ導入 ▪ マイページ追加 ▪ タイムラインUIの変更 ▪ その他、必要な作業すべて ... • (Sub) Developer Menu Rearchitecture ◦ 社内向けの開発者機能の Rearchitecture (後述) ◦ Objc-C && 1 Storyboard でやばかったので勝手にやった インターン時代 (2018.08 - 2019.02)
7 • New Customer Growth (2019.07 - 2019.09) ◦ 新規お客様向けの施策チーム
▪ 新規会員登録 ▪ 各種オンボーディング ▪ まだ A/B テスト段階のため、詳細は割愛 • NewBiz & Category (2019.10 - ) ◦ 新規領域の開拓やカテゴリ特化を行う施策チーム ▪ 絶賛新機能開発中 ◦ iOSのTech Lead 新卒入社後 (2019.04 -)
8 02 MercariにおけるiOS Engineer
9 • お客様に機能を届ける最後のまとめ役 ◦ どんなに良いUI DesignやMLのモデルがあっても クライアントアプリに落とし込まないとお客様へは届けられない ◦ スーパー大事 •
バックグラウンド・国籍は様々 ◦ 現在は全員で27人ほど (Mercari JPのみ) ◦ PR・Slack・Document 全てにおいて英語 iOS Engineerについて
10 チーム構成 mercari-ios Productivity Technical Problems Architect Client Feature1 Feature1
Feature1 Feature1 Feature N CI & CD
11 チーム構成 mercari-ios Productivity Technical Problems Architect Client Feature1 Feature1
Feature1 Feature1 Feature N CI & CD 20数人で同時に 開発、無理では
12 03 きらやばArchitectureとAutomation
13 03 きらやばArchitectureとAutomation
14 きらやばArchitecture = MVVM + μVC + Store (※僕が勝手にそう呼んでるだけです )
15 MVVM ViewController (VC) ViewModel Model
16 MVVM + μVC VC View Model Model View Model
View Model View Model VC VC VC
17 MVVM + μVC VC VC μVC μVC μVC VC
μVC μVC Component oriented architecture, like React
18 MVVM + μVC
19 • Rearchitectureチームの発足とコードベースの刷新 (2018年) ◦ iOSエンジニアが100人体制になっても スピードを落とさずに開発できるようなコードベースを作る ◦ 現在はその役割の一部を Architectチームが担う
◦ 共同開発でありがちな XIB(View)ファイルのconflictを見ることはほぼなくなった ◦ 事実として、現在20数人が同時に一つのアプリを開発できている => ✅成功 • 参考 ◦ メルカリJP初のiOSリアーキテクチャは、なぜ「最高に楽しい」のか ◦ MicroViewControllerで無限にスケールするiOS開発 - iOSDC 2018 MVVM + μVC
20 MVVM + μVC VM VM VM VM VM VM
VM VM State State State State State State State State Each VM has own State It’s hard to pass state changes to other VMs...
21 MVVM + μVC + Store Root VM VM VM
VM VM VM VM VM State Store Dispatcher Action Introduce Store like Flux own
22 Architectureの歴史 2013: Pure MVC (Objc-C) 2014: Pure MVC (Objc-C)
2015: Pure MVC, heading to MVVM (Objc-C) 2016: MVVM (Objc-C + Swift) 2017: MVVM (Objc-C + Swift) 2018: MVVM + μVC (Swift) 2019: MVVM + μVC + Store (Swift) 2020: heading to SwiftUI + Combine… Swift SwiftUI
23 きらやばArchitecture = MVVM + μVC + Store (※僕が勝手にそう呼んでるだけです )
24 03 きらやばArchitectureとAutomation
25 Automation 一ヶ月で約665 commitsが developに入る develop branchとのconflict解 決がやばいのでは
26 Automation (GitHub Label) • In House Dev ◦ 内製のバイナリ配布システムにより
commit されるたび自動配布 • Nightly Merge ◦ 自動的にdevelopのmergeを行うPRを毎 晩作成する • Auto Merge ◦ CIが終わり次第、自動で mergeする
27 • Nightly Merge + Auto Mergeの組み合わせが強力 ◦ CIがNightly Merge
PR作成時に、conflictがない場合は自動で mergeする ◦ 朝会社に来ると 「feature branchは既に最新のdevelop branchに追従した状態」になっている ◦ つまり、勝手にdevelop branchとの差分が解消されているため、 develop へ mergeする際 に大量のconflictが発生することがほとんどなくなる Automation (GitHub Label) 最高
28 • 最強のBotを社内で飼っている ◦ Binary Submit, App Release, Crash Report,
Distribute Binary, etc…. ◦ 諸般の事情により、その姿をお見せすることはまだできない。。。。 ◦ (最強すぎるため) Automation (Bot)
29 • Mercari iOSのコードベースは日々進化を遂げている ◦ 100人で同時に開発できるスケーラブルな Architectureを目指して ◦ 数々の技術的な挑戦が積み重なっている •
Automationもがんばってる ◦ GitHub Label系Automation ◦ 社内最強Bot ◦ 参考: Automation/karakuri for increasing engineering productivity - TechBlog • 最高に楽しい ◦ iOS Engineerとして、メルカリ iOSのコードベースや開発環境はとても刺激的 ◦ 技術で世界を殴っていきたい方、お待ちしております。 Wrap up