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
Working effectively at scale
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Francisco Díaz
November 29, 2019
Programming
330
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Working effectively at scale
Presented at BA:Swiftable in November, 2019.
Francisco Díaz
November 29, 2019
More Decks by Francisco Díaz
See All by Francisco Díaz
Inteligencia Artificial en PedidosYa - Una mirada pragmática
fdiaz
0
36
I hate public speaking. So why do I keep doing it?
fdiaz
0
170
Definiendo límites
fdiaz
1
160
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
180
Move fast and keep your code quality
fdiaz
1
420
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
180
Setting Boundaries
fdiaz
1
200
Swift Values
fdiaz
0
170
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
160
Other Decks in Programming
See All in Programming
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
霧の中の代数的エフェクト
funnyycat
1
320
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
120
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
360
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
260
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.8k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.7k
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
170
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
500
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
370
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
300
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
640
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Thoughts on Productivity
jonyablonski
76
5.2k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
So, you think you're a good person
axbom
PRO
2
2.1k
Technical Leadership for Architectural Decision Making
baasie
3
440
Discover your Explorer Soul
emna__ayadi
2
1.2k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Building AI with AI
inesmontani
PRO
1
1.1k
Transcript
Working e!ectively at scale
Francisco Díaz franciscodiaz.cl - @fco_diaz
Startups 2011 - 2017
Airbnb 2017 - today
None
None
None
None
None
None
None
None
None
organizations ... are constrained to produce designs which are copies
of the communication structures of these organizations — Conway's law
How do you divide your codebase?
Architectural layer
User Flow
What about Airbnb?
None
1 million lines of Swift
~80 commits to master on any given day to the
repo (Android + iOS)
Bigger buckets
None
A user should be able to wishlist a listing from
the booking flow
How do they relate with each other?
None
None
None
50 min local clean builds
~30 min !
Buck HTTP Cache https://github.com/airbnb/BuckSample
None
~5 min !
None
None
Dependency inversion
‣High-level modules should not depend on low- level modules. Both
should depend on abstractions. ‣Abstractions should not depend on details. Details (concrete implementations) should depend on abstractions.
None
A user should be able to wishlist a listing from
the booking flow
None
Easy! WishListDataSource + interface!
None
WishListDataSource is still visible
None
Socializing best practices
!
+60 iOS developers
Automating best practices
Groups Modules
Groups Modules Module Types
Module Types Feature + Interface Service + Interface
Feature A screen or a flow in the app
Service Manage shared state or resources
None
None
How do we enforce these best practices?
/services /service_interfaces /features /feature_interfaces
def service_interface( name, deps): max_visibility = [ "//ios/feature_interfaces/...", "//ios/features/...", "//ios/service_interfaces/...",
"//ios/services/...", ]
service_interface( name = "Networking", deps = [ "//ios/service_interfaces/Logging", ], )
feature( name = "Booking", deps = [ "//ios/service_interfaces/Networking", "//ios/service_interfaces/WishListService", ],
)
iOS Platform
Module creation needs to be easy
None
None
rake make:module
> Provide the type of module you want to create:
1: Non Platform 2: Feature 3: Feature Interface 4: Service 5: Service Interface 4 > New module name: Swiftable > Provide a high level description of this module: This is a module to present at Swiftable
Buck Human readable dependencies https://github.com/airbnb/BuckSample
feature( name = "Booking", deps = [ "//ios/service_interfaces/Networking", "//ios/service_interfaces/WishListService", "//ios/feature_interfaces/HelpCenter",
], )
None
Feature A screen or a flow in the app
None
None
None
Dev Apps
~1 min Dev Apps
Big buckets Small playgrounds
None
How do we get there?
~100 modules One module type: /libraries
libraries/AirbnbBooking libraries/AirbnbBusinessTravel libraries/AirbnbHelpCenter libraries/AirbnbListings libraries/AirbnbNetworking libraries/AirbnbWishLists ...
Before iOS Platform /libraries
On the iOS Platform /services /service_interfaces /features /feature_interfaces
How to get everybody on the iOS Platform?
Remove libraries/ and start over
!
Progressively migrate
Let's migrate WishLists Data Source
libraries/WishLists
None
None
None
What are the dependency rules for libraries/?
None
Inbound dependencies Outbound dependencies
Inbound dependencies Outbound dependencies
None
The interface module has stricter rules
Migrate all the call sites
As the owner of WishLists We don't control these
None
Calculated tech debt
Inbound dependencies Outbound dependencies
None
we know our usage of Networking
We control our dependencies
Allow inbound dependencies from libraries/ Don't allow outbound dependencies to
libraries/
libraries/ has access to the iOS Platform
The iOS Platform doesn't have access to libraries/
Code on the iOS Platform has good boundaries
while we allow for easier migration
def service_interface( name, visibility = []): max_visibility = [ "//ios/feature_interfaces/...",
"//ios/features/...", "//ios/service_interfaces/...", "//ios/services/...", ] add_visibility_for_legacy_module_structure(max_visibility)
def add_visibility_for_legacy_module_structure(visibility): visibility.extend([ "//ios/libraries/...", ])
We started migrating from the bottom up
Try it ourselves !rst
Pilot with others teams
Should I implement this?
Most likely NO
There's no silver bullet
Adapt
Summary 1. Figure out where you're struggling 2.Create and document
best practices 3.Automate best practices where needed
¡Gracias! franciscodiaz.cl/talks