SlideShare a Scribd company logo
1 of 30
Download to read offline
SWIFT AT SCALE
WAR STORIES FROM
KAMILAH TAYLOR, SENIOR SOFTWARE ENGINEER, LINKEDIN
#SwiftSummit 2016 @kamilah
I SINCERELY PROMISE TO
KEEP MY SWIFT 3 MIGRATION
COMPLAINTS TO A MINIMUM.
@kamilah
SO THIS TALK... #SwiftSummit
REALLY I PROMISE EVEN THOUGH THIS IS HOW I DREAM OF XCODE NOW
@kamilah #SwiftSummit
SWIFT AT LINKEDIN
WHAT I MEAN WHEN I SAY AT SCALE
▸ In January 2015, we started the
complete rewrite of our flagship
app in Swift, as part of project
Voyager
▸ It's not just one app, it's a growing
family of apps
▸ It's not just a family of apps, it's a
growing set of libraries, internally
and open sourced
▸ ~100 iOS devs, ~40 on flagship
@kamilah #SwiftSummit
SWIFT AT LINKEDIN
THE WORKFLOW
▸ Weekly release cycles
▸ Large unit and integration test suites
▸ First version of Swift embraced - the betas (https://
engineering.linkedin.com/ios/our-swift-experience-
slideshare)
▸ Number of Swift files in our flagship app - over 4500
@kamilah #SwiftSummit
HOW DO WE HAVE
IT ALL?
SPOILER ALERT: WE DON'T.
THIS IS HARD. HERE ARE
SOME STORIES.
@kamilah #SwiftSummit
THE COMPILER
STORIES
<- THIS NEVER STOPS
BEING TRUE
@kamilah #SwiftSummit
THE COMPILE TIME STORIES
DEVELOPER HAPPINESS + PRODUCTIVITY
▸ Compile times very very very long for large codebase (~25
min for a cold build on 15” rMBP)
▸ This has improved with each Xcode version
▸ Three workarounds
▸ code structure
▸ hardware
▸ objective-c (yes, really)
@kamilah #SwiftSummit
THE COMPILE TIME STORIES
THE SOLUTION FOR VOYAGER
▸ Mac Pros for everyone! (12 cores gave us a 2x speed boost over the top
of the line MBP)
▸ Switched generated models to ObjC (to reduce the number of Swift files)
▸ Code structure
▸ Dropped iOS 7 support
▸ Modularized using Cocoapod's devpods
▸ This broke debug symbols
▸ Converted devpods into dynamic frameworks
@kamilah #SwiftSummit
@kamilah
THE XCODE PROJECT FILE
FIELD NOTE NUMBER 12:
SOMETIMES YOU MAY NEED
DARK MAGIC TO EDIT THE
PROJECT FILE
#SwiftSummit
THE XCODE PROJECT FILE
DARK MAGIC IS NOT AN EXAGGERATION
@kamilah #SwiftSummit
THAT SEGFAULT 11 THOUGH
http://classicprogrammerpaintings.com/post/142796894989/c-
developers-aiding-a-comrade-facing-segfault
@kamilah #SwiftSummit
THAT SEGFAULT 11 THOUGH
SOMETIMES THE XCODE COMPILER JUST CRASHES
▸ The problem (on LinkedIn Learning): Our builds started to
flakily fail because of a compiler crash once we added a
full test suite, as we geared up for our launch
▸ Even locally, the compiler would occasionally crash with a
segfault 11
▸ The solution: Back to manipulating the xcode project
settings, a skill I don't remember needing in the objective-
c days
@kamilah #SwiftSummit
THE BUILD ALWAYS NEEDS WORK
FAILED TO AUTHORIZE RIGHTS (0X1) WITH STATUS: -60007
▸ The problem: Our builds started to flakily fail because of a
compiler crash (Xcode 7.3) - for everyone's app
▸ Really bad side effect - missing when an actual bad
commit went in while the trunk is red
▸ The solution: Our tools team found a work around by
splitting the test build (done in xcodebuild) and running
tests, now via xctool
▸ Funny follow up: had to revert this patch for Swift 3
@kamilah #SwiftSummit
THE SWIFT
MIGRATION STORIES
<- IF ONLY THIS WERE
NOT SO APT
@kamilah #SwiftSummit
SWIFT BETA - SWIFT 2
THE EARLY DAYS OF MIGRATING
▸ Pre Swift 2
▸ This mostly affected Slideshare, our first Swift app
▸ No migrator tool so all manual
@kamilah #SwiftSummit
SWIFT BETA - SWIFT 2
THE EARLY DAYS OF MIGRATING
▸ Swift 2 migration
▸ Needed Xcode 7 for the improved build times
▸ 2 months before launch
▸ Migration tool crashed on large codebase (okay for
smaller apps at LinkedIn)
▸ (What we thought was) Lengthy, manual migration to
new Swift version for Voyager
@kamilah #SwiftSummit
BEYOND SWIFT 2
AND THEN 2016 CAME...WITH SWIFT 2.3 AND SWIFT 3
@kamilah #SwiftSummit
SWIFT 2 - SWIFT 2.3
IT WAS ONLY KIND OF A PAIN FREE MIGRATION
▸ Swift 2.3
▸ Again, we needed to upgrade to Xcode 8
▸ Actually quite painful for Voyager
▸ 14 Swift libraries, 4500 Swift files in Voyager
▸ For LinkedIn Learning, actually not so bad
▸ Took me about 1 week since libraries had already
been migrated and migrator "worked"
@kamilah #SwiftSummit
THAT INITIAL ERROR COUNT OF
666 WAS THE FIRST SIGN.
@kamilah
MIGRATING TO SWIFT 3 #SwiftSummit
SWIFT 3
QUITE POSSIBLY THE WORST DEVELOPER EXPERIENCE
▸ The migrator tool, pretty much useless
▸ Saving grace: http://swift.ayaka.me/posts/2016/6/17/
running-the-swift-30-migrator-on-a-standalone-swift-file
▸ Had a script that ran this for an entire directory
▸ The battle had only begun
▸ Massive effort to upgrade all the swift libraries from the
infra and voyager team
@kamilah #SwiftSummit
SWIFT 3 MIGRATION
QUITE THE COORDINATED EFFORT
@kamilah #SwiftSummit
THE SWIFT 3 MIGRATION
THESE ARE ACTUAL COMMIT MESSAGES FROM THE VOYAGER TEAM
@kamilah #SwiftSummit
SWIFT 3
QUITE POSSIBLY THE WORST DEVELOPER EXPERIENCE
▸ Voyager
▸ Froze the trunk for nearly two weeks
▸ LinkedIn Learning
▸ Still ongoing, even on our much smaller codebase (~800
Swift files) the migrator crashed
@kamilah #SwiftSummit
THE SWIFT 3 MIGRATION
OKAY A FEW MORE COMMIT MESSAGES
@kamilah #SwiftSummit
SO HOW DO WE DO SWIFT
AT SCALE AT LINKEDIN?
@kamilah #SwiftSummit
ALMOST DONE...
SO HOW HAVE WE DONE SWIFT AT SCALE AT LINKEDIN?
▸ Early adoption -> hard earned learnings both from our
developers and tools team
▸ Communicate communicate communicate
▸ Frequent knowledge sharing across the company
▸ Internal iOS meetups
▸ Many slack channels, including a dedicated one for swift 3
▸ Open sourced a swift style guide
@kamilah #SwiftSummit
ALMOST DONE...
SO HOW HAVE WE DONE SWIFT AT SCALE AT LINKEDIN?
▸ Constant experimentation on how to improve our build
and compile times
▸ Shout out to our tools team who are always trying to
improve the process, test new versions of Xcode
@kamilah #SwiftSummit
NOW I'M DONE
LEARNINGS
▸ This won't come for free
▸ Invest in your tools and infra teams
▸ Swift does require more developer time for maintenance,
though less time for training and actual coding
▸ Be ready with much patience and all the humor
@kamilah #SwiftSummit
@kamilah #SwiftSummit
SO LONG AND THANKS
FOR ALL THE SWIFT FUN

More Related Content

What's hot

Creating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with VaporCreating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with Vapor🔴 Keli'i Martin
 
CocoaPods for private libraries
CocoaPods for private librariesCocoaPods for private libraries
CocoaPods for private librariesCocoaHeads France
 
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...Codemotion
 
Development environment agile way
Development environment agile wayDevelopment environment agile way
Development environment agile wayIzzet Mustafaiev
 
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a Bar
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a BarAtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a Bar
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a BarAtlassian
 
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...PROIDEA
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017Matt Raible
 
Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019
Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019
Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019Matt Raible
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
 Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK... Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...Matt Raible
 
Build An Automated Testing Pipeline
Build An Automated Testing PipelineBuild An Automated Testing Pipeline
Build An Automated Testing PipelineMohamed Labouardy
 
The Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppThe Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppChristopher Nguyen
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small TeamsJoe Ferguson
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017Matt Raible
 
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT Quentin Adam
 
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...Frank van der Linden
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017Matt Raible
 
Full Stack Reactive with React and Spring WebFlux - PWX 2019
Full Stack Reactive with React and Spring WebFlux - PWX 2019Full Stack Reactive with React and Spring WebFlux - PWX 2019
Full Stack Reactive with React and Spring WebFlux - PWX 2019Matt Raible
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 

What's hot (20)

Creating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with VaporCreating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with Vapor
 
CocoaPods for private libraries
CocoaPods for private librariesCocoaPods for private libraries
CocoaPods for private libraries
 
Grails Spring Boot
Grails Spring BootGrails Spring Boot
Grails Spring Boot
 
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
Web is the New Mobile: Building Progressive Web Apps - Erica Stanley - Codemo...
 
Development environment agile way
Development environment agile wayDevelopment environment agile way
Development environment agile way
 
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a Bar
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a BarAtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a Bar
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a Bar
 
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
 
Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019
Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019
Full Stack Reactive with React and Spring WebFlux - Dublin JUG 2019
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
 Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK... Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
 
Build An Automated Testing Pipeline
Build An Automated Testing PipelineBuild An Automated Testing Pipeline
Build An Automated Testing Pipeline
 
The Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web AppThe Hitchhiker's Guide to Building a Progressive Web App
The Hitchhiker's Guide to Building a Progressive Web App
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small Teams
 
Ionic
IonicIonic
Ionic
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017
 
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
 
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
Full Stack Reactive with React and Spring WebFlux - PWX 2019
Full Stack Reactive with React and Spring WebFlux - PWX 2019Full Stack Reactive with React and Spring WebFlux - PWX 2019
Full Stack Reactive with React and Spring WebFlux - PWX 2019
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 

Similar to Swift at Scale

Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous DeliverySpinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous DeliveryAndrew Phillips
 
Spring Cloud Stream with Kafka
Spring Cloud Stream with KafkaSpring Cloud Stream with Kafka
Spring Cloud Stream with KafkaDavid Kiss
 
Try! Swift Tokyo2017
Try! Swift Tokyo2017Try! Swift Tokyo2017
Try! Swift Tokyo2017Amy Cheong
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityDamien Coraboeuf
 
Effectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple PlatformsEffectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple PlatformsDonny Wals
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerAjeet Singh Raina
 
Getting out of the Job Jungle with Jenkins
Getting out of the Job Jungle with JenkinsGetting out of the Job Jungle with Jenkins
Getting out of the Job Jungle with JenkinsSonatype
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekDr. Felix Raab
 
What is Codename One - Transcript.pdf
What is Codename One - Transcript.pdfWhat is Codename One - Transcript.pdf
What is Codename One - Transcript.pdfShaiAlmog1
 
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SKJavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SKDavid Wesst
 
Essentials in JavaScript App Bundling with Webpack
Essentials in JavaScript App Bundling with WebpackEssentials in JavaScript App Bundling with Webpack
Essentials in JavaScript App Bundling with WebpackKhaled Al-Ansari
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS LebowskiThe Big Cloud native FaaS Lebowski
The Big Cloud native FaaS LebowskiQAware GmbH
 
Belgium jenkins-meetup-job-jungle-0.1
Belgium jenkins-meetup-job-jungle-0.1Belgium jenkins-meetup-job-jungle-0.1
Belgium jenkins-meetup-job-jungle-0.1Damien Coraboeuf
 
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Andrea Scuderi
 
Spring Tooling: What's new and what's coming
Spring Tooling: What's new and what's comingSpring Tooling: What's new and what's coming
Spring Tooling: What's new and what's comingmartinlippert
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Chris Ciborowski
 
MODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptxMODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptxVeerannaKotagi1
 
Deploy made easy (even on Friday)
Deploy made easy (even on Friday)Deploy made easy (even on Friday)
Deploy made easy (even on Friday)Riccardo Bini
 
From Consumer to Creator, A Guide to iOS Open Source
From Consumer to Creator, A Guide to iOS Open SourceFrom Consumer to Creator, A Guide to iOS Open Source
From Consumer to Creator, A Guide to iOS Open SourceMax Cobb
 

Similar to Swift at Scale (20)

Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous DeliverySpinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
 
Spring Cloud Stream with Kafka
Spring Cloud Stream with KafkaSpring Cloud Stream with Kafka
Spring Cloud Stream with Kafka
 
Try! Swift Tokyo2017
Try! Swift Tokyo2017Try! Swift Tokyo2017
Try! Swift Tokyo2017
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalability
 
Bringing swift to cloud
Bringing swift to cloudBringing swift to cloud
Bringing swift to cloud
 
Effectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple PlatformsEffectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple Platforms
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 
Getting out of the Job Jungle with Jenkins
Getting out of the Job Jungle with JenkinsGetting out of the Job Jungle with Jenkins
Getting out of the Job Jungle with Jenkins
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
 
What is Codename One - Transcript.pdf
What is Codename One - Transcript.pdfWhat is Codename One - Transcript.pdf
What is Codename One - Transcript.pdf
 
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SKJavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
 
Essentials in JavaScript App Bundling with Webpack
Essentials in JavaScript App Bundling with WebpackEssentials in JavaScript App Bundling with Webpack
Essentials in JavaScript App Bundling with Webpack
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS LebowskiThe Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski
 
Belgium jenkins-meetup-job-jungle-0.1
Belgium jenkins-meetup-job-jungle-0.1Belgium jenkins-meetup-job-jungle-0.1
Belgium jenkins-meetup-job-jungle-0.1
 
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020
 
Spring Tooling: What's new and what's coming
Spring Tooling: What's new and what's comingSpring Tooling: What's new and what's coming
Spring Tooling: What's new and what's coming
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 
MODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptxMODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptx
 
Deploy made easy (even on Friday)
Deploy made easy (even on Friday)Deploy made easy (even on Friday)
Deploy made easy (even on Friday)
 
From Consumer to Creator, A Guide to iOS Open Source
From Consumer to Creator, A Guide to iOS Open SourceFrom Consumer to Creator, A Guide to iOS Open Source
From Consumer to Creator, A Guide to iOS Open Source
 

Recently uploaded

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 

Recently uploaded (20)

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 

Swift at Scale

  • 1. SWIFT AT SCALE WAR STORIES FROM KAMILAH TAYLOR, SENIOR SOFTWARE ENGINEER, LINKEDIN #SwiftSummit 2016 @kamilah
  • 2. I SINCERELY PROMISE TO KEEP MY SWIFT 3 MIGRATION COMPLAINTS TO A MINIMUM. @kamilah SO THIS TALK... #SwiftSummit
  • 3. REALLY I PROMISE EVEN THOUGH THIS IS HOW I DREAM OF XCODE NOW @kamilah #SwiftSummit
  • 4. SWIFT AT LINKEDIN WHAT I MEAN WHEN I SAY AT SCALE ▸ In January 2015, we started the complete rewrite of our flagship app in Swift, as part of project Voyager ▸ It's not just one app, it's a growing family of apps ▸ It's not just a family of apps, it's a growing set of libraries, internally and open sourced ▸ ~100 iOS devs, ~40 on flagship @kamilah #SwiftSummit
  • 5. SWIFT AT LINKEDIN THE WORKFLOW ▸ Weekly release cycles ▸ Large unit and integration test suites ▸ First version of Swift embraced - the betas (https:// engineering.linkedin.com/ios/our-swift-experience- slideshare) ▸ Number of Swift files in our flagship app - over 4500 @kamilah #SwiftSummit
  • 6. HOW DO WE HAVE IT ALL? SPOILER ALERT: WE DON'T. THIS IS HARD. HERE ARE SOME STORIES. @kamilah #SwiftSummit
  • 7. THE COMPILER STORIES <- THIS NEVER STOPS BEING TRUE @kamilah #SwiftSummit
  • 8. THE COMPILE TIME STORIES DEVELOPER HAPPINESS + PRODUCTIVITY ▸ Compile times very very very long for large codebase (~25 min for a cold build on 15” rMBP) ▸ This has improved with each Xcode version ▸ Three workarounds ▸ code structure ▸ hardware ▸ objective-c (yes, really) @kamilah #SwiftSummit
  • 9. THE COMPILE TIME STORIES THE SOLUTION FOR VOYAGER ▸ Mac Pros for everyone! (12 cores gave us a 2x speed boost over the top of the line MBP) ▸ Switched generated models to ObjC (to reduce the number of Swift files) ▸ Code structure ▸ Dropped iOS 7 support ▸ Modularized using Cocoapod's devpods ▸ This broke debug symbols ▸ Converted devpods into dynamic frameworks @kamilah #SwiftSummit
  • 10. @kamilah THE XCODE PROJECT FILE FIELD NOTE NUMBER 12: SOMETIMES YOU MAY NEED DARK MAGIC TO EDIT THE PROJECT FILE #SwiftSummit
  • 11. THE XCODE PROJECT FILE DARK MAGIC IS NOT AN EXAGGERATION @kamilah #SwiftSummit
  • 12. THAT SEGFAULT 11 THOUGH http://classicprogrammerpaintings.com/post/142796894989/c- developers-aiding-a-comrade-facing-segfault @kamilah #SwiftSummit
  • 13. THAT SEGFAULT 11 THOUGH SOMETIMES THE XCODE COMPILER JUST CRASHES ▸ The problem (on LinkedIn Learning): Our builds started to flakily fail because of a compiler crash once we added a full test suite, as we geared up for our launch ▸ Even locally, the compiler would occasionally crash with a segfault 11 ▸ The solution: Back to manipulating the xcode project settings, a skill I don't remember needing in the objective- c days @kamilah #SwiftSummit
  • 14. THE BUILD ALWAYS NEEDS WORK FAILED TO AUTHORIZE RIGHTS (0X1) WITH STATUS: -60007 ▸ The problem: Our builds started to flakily fail because of a compiler crash (Xcode 7.3) - for everyone's app ▸ Really bad side effect - missing when an actual bad commit went in while the trunk is red ▸ The solution: Our tools team found a work around by splitting the test build (done in xcodebuild) and running tests, now via xctool ▸ Funny follow up: had to revert this patch for Swift 3 @kamilah #SwiftSummit
  • 15. THE SWIFT MIGRATION STORIES <- IF ONLY THIS WERE NOT SO APT @kamilah #SwiftSummit
  • 16. SWIFT BETA - SWIFT 2 THE EARLY DAYS OF MIGRATING ▸ Pre Swift 2 ▸ This mostly affected Slideshare, our first Swift app ▸ No migrator tool so all manual @kamilah #SwiftSummit
  • 17. SWIFT BETA - SWIFT 2 THE EARLY DAYS OF MIGRATING ▸ Swift 2 migration ▸ Needed Xcode 7 for the improved build times ▸ 2 months before launch ▸ Migration tool crashed on large codebase (okay for smaller apps at LinkedIn) ▸ (What we thought was) Lengthy, manual migration to new Swift version for Voyager @kamilah #SwiftSummit
  • 18. BEYOND SWIFT 2 AND THEN 2016 CAME...WITH SWIFT 2.3 AND SWIFT 3 @kamilah #SwiftSummit
  • 19. SWIFT 2 - SWIFT 2.3 IT WAS ONLY KIND OF A PAIN FREE MIGRATION ▸ Swift 2.3 ▸ Again, we needed to upgrade to Xcode 8 ▸ Actually quite painful for Voyager ▸ 14 Swift libraries, 4500 Swift files in Voyager ▸ For LinkedIn Learning, actually not so bad ▸ Took me about 1 week since libraries had already been migrated and migrator "worked" @kamilah #SwiftSummit
  • 20. THAT INITIAL ERROR COUNT OF 666 WAS THE FIRST SIGN. @kamilah MIGRATING TO SWIFT 3 #SwiftSummit
  • 21. SWIFT 3 QUITE POSSIBLY THE WORST DEVELOPER EXPERIENCE ▸ The migrator tool, pretty much useless ▸ Saving grace: http://swift.ayaka.me/posts/2016/6/17/ running-the-swift-30-migrator-on-a-standalone-swift-file ▸ Had a script that ran this for an entire directory ▸ The battle had only begun ▸ Massive effort to upgrade all the swift libraries from the infra and voyager team @kamilah #SwiftSummit
  • 22. SWIFT 3 MIGRATION QUITE THE COORDINATED EFFORT @kamilah #SwiftSummit
  • 23. THE SWIFT 3 MIGRATION THESE ARE ACTUAL COMMIT MESSAGES FROM THE VOYAGER TEAM @kamilah #SwiftSummit
  • 24. SWIFT 3 QUITE POSSIBLY THE WORST DEVELOPER EXPERIENCE ▸ Voyager ▸ Froze the trunk for nearly two weeks ▸ LinkedIn Learning ▸ Still ongoing, even on our much smaller codebase (~800 Swift files) the migrator crashed @kamilah #SwiftSummit
  • 25. THE SWIFT 3 MIGRATION OKAY A FEW MORE COMMIT MESSAGES @kamilah #SwiftSummit
  • 26. SO HOW DO WE DO SWIFT AT SCALE AT LINKEDIN? @kamilah #SwiftSummit
  • 27. ALMOST DONE... SO HOW HAVE WE DONE SWIFT AT SCALE AT LINKEDIN? ▸ Early adoption -> hard earned learnings both from our developers and tools team ▸ Communicate communicate communicate ▸ Frequent knowledge sharing across the company ▸ Internal iOS meetups ▸ Many slack channels, including a dedicated one for swift 3 ▸ Open sourced a swift style guide @kamilah #SwiftSummit
  • 28. ALMOST DONE... SO HOW HAVE WE DONE SWIFT AT SCALE AT LINKEDIN? ▸ Constant experimentation on how to improve our build and compile times ▸ Shout out to our tools team who are always trying to improve the process, test new versions of Xcode @kamilah #SwiftSummit
  • 29. NOW I'M DONE LEARNINGS ▸ This won't come for free ▸ Invest in your tools and infra teams ▸ Swift does require more developer time for maintenance, though less time for training and actual coding ▸ Be ready with much patience and all the humor @kamilah #SwiftSummit
  • 30. @kamilah #SwiftSummit SO LONG AND THANKS FOR ALL THE SWIFT FUN