SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
1
How to feature flag and
run experiments in iOS
and Android
Kody O’Connell
Developer Advocate
Optimizely
Tom Zurkan
Senior Software Engineer
Optimizely
2
Optimizely Introductions
Perri Bronson
Product Marketing
Tom Zurkan
Sr. Software Engineer
Kody O’Connell
Developer Advocate
https://twitter.com/pezbronson https://twitter.com/KodyOConnellhttps://medium.com/@TomZurkan
3
Housekeeping ● We are recording this webinar
● You will be emailed the slides and
recording
● Ask your questions via the webinar
questions box
● We’ll answer all questions at end
4
Agenda
1. Why use feature flags in mobile app development? (Kody)
2. How the iOS and Android SDKs work (Tom)
3. The steps to create free Optimizely feature flags in your iOS app (Kody)
4. How to set up a feature experiment with Full Stack (Kody)
5. Q&A (Tom and Kody)
5
What are feature flags?
Feature Flags
if feature_flag is ‘on’:
do_something()
else:
do_something_else()
7
Controlled Rollouts
100% ROLLOUTGRADUAL
ROLLOUTBETA USERSSTAGING
ENVIRONMENT
LOCAL
DEVELOPMENT
8
How do Feature Flags
fit into CI/CD?
9
Software Development Life Cycle
DEPLOY
BUILD &
TEST
RELEASE
Develop & Iterate Quickly
● Selectively enable test suites
and making data-driven
technical evaluations
● Don’t waste time untangling
messy merge conflicts
Delight Your Customers
● Empower teams to
manage their own releases
● Incident? Minimize time to
solution
Scale Feature Delivery
● Ship faster by decoupling
deploys from releases to
shorten development cycles
● Deploy frequently and safely
10
Faster Development Cycles
Features don’t need to be complete to get merged
● No stale feature branches
● Smaller code reviews
● Safety of a feature flag
BUILD & TEST
11
Seamless Delivery
● Decouple deployment from release
● Stop worrying about when to deploy
● Deploy freeze != Feature freeze
○ E.g. Thanksgiving Weekend
DEPLOY
12
Feature Control
● Empower teams to manage their own
releases
● Test out your feature on a small targeted
audience 🐥
○ Easily manage beta customers
RELEASE
13
Incident Response
It’s 3am, you get paged… 😱
● Smaller changeset → easier investigation
● Roll back, don’t hotfix
● Someone else having an outage? → killswitch
● Don’t roll back an entire version for a single bug
RELEASE
14
Feature Flags on Mobile
Feature Flags
on Mobile
mobile_app_header
Feature Flags
on Mobile
mobile_app_header
search_ranking_algorithm
Feature Flags
on Mobile
mobile_app_header
checkout_flow
search_ranking_algorithm
Feature Flags
on Mobile
19
Beyond Feature Flagging:
Experimentation
mobile_app_header
checkout_flow
search_ranking_algorithm
Feature Experiment
on Mobile
enabled: True
header_color: #F829EA
header_sticky: True
header_height: 20
mobile_app_header
enabled: True
checkout_version: 3
quick_checkout: True
header_height: 20
checkout_flow
enabled: True
fresh_boost: 1.25
profile_boost: 2.10
local_boost: 0.75
search_ranking_algorithm
Feature Experiments
Remote
Configuration
enabled: True
header_color: #F829EA
header_sticky: True
header_height: 20
mobile_app_header
header_message: ‘We
love our users <3’
We love our users <3
SDK polls for new config at
desired frequency
Webhooks deliver new
config in seconds
23
Sounds great, but how does it work?
How Optimizely Full Stack Works
JSON
Datafile
Client SDKs
Server SDKs
Remote
Config
Data
Warehouse
Remotely configure
flags / experiments in Optimizely.
(UI and/or REST API)
Update the JSON datafile
SDKs make decisions locally,
track events asynchronously
for zero latency
Analyze results through
Optimizely and/or exports
and integrations into your
other systems
Optimizely
Event Tracking
Event Tracking
How iOS/tvOS SDK works
Client - Interact directly with the client
DatafileHandler - Responsible for getting, polling and caching datafile
EventHandler - Saves and sends events to Optimizely backend
UPS - User Profile Service holds previous bucketing information
Unique to iOS/tvOS SDK
- Written in Swift with safety first and modern APIs
- No core data (we use file for events by default).
- Event handler has event batching for performance.
- Datafile handler and event handler are unscheduled when
app goes to background.
- Clean Swift API with Objective-C hanging off to the side.
- Take a look at my medium articles on the Swift SDK
design (enums, atomic property, dependency injection,
and exposing Objective-C API)
How the Android SDK works
Manager - Holds the Optimizely instance from the Optimizely Java SDK
DatafileHandler - Implements ProjectConfigManager. Responsible for getting,
polling and caching datafile
EventHandler - Saves and sends events to Optimizely backend
UPS - User Profile Service holds previous bucketing information
Unique to Android SDK
- Datafile handler uses the intents and the JobScheduler to
schedule future updates even in the background
- Events are also uses intents and the scheduler to
schedule attempts at flushing the events.
- Events can be triggered to send after a connection
becomes available.
- Android and iOS features will converge.
- Config diffs instead of full configs.
- IDE Plugins to help with development
(https://plugins.jetbrains.com/plugin/13969-optimizely)
What’s next for our mobile SDKs
30
Let’s create a feature flag and set up
an experiment in Swift.
31
Best Practices
Visibility
● Flag On or Off
● Environment Deployed
● Behavior of flag ON/OFF
Risk Assessment
● Can this feature be
rolled back safely?
● What happens if this
flag were to fail?
Exit Criteria/Expiration
● When is the usefulness
of this flag over?
● How soon should we
remove this flag when it
is no longer needed?
● Who should be
removing this flag?
Communication
● Who should be alerted
when flag is turned ON?
● Who should be
monitoring metrics?
● Who should be alerted if
flag is turned OFF?
32
Resources
iOS
● Swift SDK and demo app on Github https://github.com/optimizely/swift-sdk
● Swift SDK docs https://docs.developers.optimizely.com/full-stack/docs/swift-sdk
● Kody’s blog post https://blog.optimizely.com/2020/02/24/feature-flags-swift-ios/
Android
● Android SDK and demo app on Github https://github.com/optimizely/android-sdk
● Android SDK docs https://docs.developers.optimizely.com/rollouts/docs/android
General
● Optimizely Full Stack product info https://www.optimizely.com/platform/full-stack/
● Optimizely SDK IntelliJ plug-in https://plugins.jetbrains.com/plugin/13969-optimizely
● Tom’s Blog https://medium.com/@TomZurkan
optimize.ly/mobile-rollouts
Free feature flags & controlled rollouts
34
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Building a Self-Service Big Data Pipeline
Building a Self-Service Big Data PipelineBuilding a Self-Service Big Data Pipeline
Building a Self-Service Big Data Pipeline
 
Introduction to spark
Introduction to sparkIntroduction to spark
Introduction to spark
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Autodesk company presentation
Autodesk company presentationAutodesk company presentation
Autodesk company presentation
 
SAFe SCRUMxp Overview
SAFe SCRUMxp OverviewSAFe SCRUMxp Overview
SAFe SCRUMxp Overview
 
Architecting Cloud Applications - the essential checklist
Architecting Cloud Applications - the essential checklistArchitecting Cloud Applications - the essential checklist
Architecting Cloud Applications - the essential checklist
 
The Road to Business Agility
The Road to Business AgilityThe Road to Business Agility
The Road to Business Agility
 
Spark
SparkSpark
Spark
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
Hands-on Agile Webinar #2: Agile Maturity & Agility Assessment
Hands-on Agile Webinar #2: Agile Maturity & Agility AssessmentHands-on Agile Webinar #2: Agile Maturity & Agility Assessment
Hands-on Agile Webinar #2: Agile Maturity & Agility Assessment
 
Hacking Your Head : Managing Information Overload (extended)
Hacking Your Head : Managing Information Overload (extended)Hacking Your Head : Managing Information Overload (extended)
Hacking Your Head : Managing Information Overload (extended)
 
Data centers on the Edge
Data centers on the EdgeData centers on the Edge
Data centers on the Edge
 
Discover Jira Align - Realignment to the Enterprise
Discover Jira Align - Realignment to the EnterpriseDiscover Jira Align - Realignment to the Enterprise
Discover Jira Align - Realignment to the Enterprise
 
PlayFab Advanced Cloud Script
PlayFab Advanced Cloud ScriptPlayFab Advanced Cloud Script
PlayFab Advanced Cloud Script
 
Agile
AgileAgile
Agile
 
IBM Cloud pak for data brochure
IBM Cloud pak for data   brochureIBM Cloud pak for data   brochure
IBM Cloud pak for data brochure
 
Overcome the 6 Antipatterns of Agile Adoption
Overcome the 6 Antipatterns of Agile AdoptionOvercome the 6 Antipatterns of Agile Adoption
Overcome the 6 Antipatterns of Agile Adoption
 
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
Azure Data Factory | Moving On-Premise Data to Azure Cloud | Microsoft Azure ...
 
Are You Being Agile or Doing Agile?
Are You Being Agile or Doing Agile?Are You Being Agile or Doing Agile?
Are You Being Agile or Doing Agile?
 
Agile Development Process
Agile Development ProcessAgile Development Process
Agile Development Process
 

Ähnlich wie How to feature flag and run experiments in iOS and Android

Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
Paul Della-Nebbia
 
ganesh[5+ years] exp _Resume
ganesh[5+ years] exp _Resumeganesh[5+ years] exp _Resume
ganesh[5+ years] exp _Resume
ganesh r
 
CV_Sayani_Updated
CV_Sayani_UpdatedCV_Sayani_Updated
CV_Sayani_Updated
SAYANI ROY
 
Deepak_28feb16_mix
Deepak_28feb16_mixDeepak_28feb16_mix
Deepak_28feb16_mix
Deepak Punia
 
Gnana Prasuna B_5.5 years
Gnana Prasuna B_5.5 yearsGnana Prasuna B_5.5 years
Gnana Prasuna B_5.5 years
Gnana Bocha
 

Ähnlich wie How to feature flag and run experiments in iOS and Android (20)

Manoj singhal resume
Manoj singhal resumeManoj singhal resume
Manoj singhal resume
 
Kasi Viswanath
Kasi ViswanathKasi Viswanath
Kasi Viswanath
 
Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...Get the Jump on Mobilizing your Notes and Domino Applications Today!  (JMP103...
Get the Jump on Mobilizing your Notes and Domino Applications Today! (JMP103...
 
Android automation tools
Android automation toolsAndroid automation tools
Android automation tools
 
Resume(1)
Resume(1)Resume(1)
Resume(1)
 
Failure is an Option: Scaling Resilient Feature Delivery
Failure is an Option: Scaling Resilient Feature DeliveryFailure is an Option: Scaling Resilient Feature Delivery
Failure is an Option: Scaling Resilient Feature Delivery
 
ganesh[5+ years] exp _Resume
ganesh[5+ years] exp _Resumeganesh[5+ years] exp _Resume
ganesh[5+ years] exp _Resume
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Splunk for Developers Breakout Session
Splunk for Developers Breakout SessionSplunk for Developers Breakout Session
Splunk for Developers Breakout Session
 
SplunkLive! Seattle - Splunk for Developers
SplunkLive! Seattle - Splunk for DevelopersSplunkLive! Seattle - Splunk for Developers
SplunkLive! Seattle - Splunk for Developers
 
CV_Sayani_Updated
CV_Sayani_UpdatedCV_Sayani_Updated
CV_Sayani_Updated
 
SURYA_3.6
SURYA_3.6SURYA_3.6
SURYA_3.6
 
Deepak_28feb16_mix
Deepak_28feb16_mixDeepak_28feb16_mix
Deepak_28feb16_mix
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Building a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator PlatformBuilding a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator Platform
 
4 Phases followed by the Android Application Development Company.pdf
4 Phases followed by the Android Application Development Company.pdf4 Phases followed by the Android Application Development Company.pdf
4 Phases followed by the Android Application Development Company.pdf
 
Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience
 
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
 
Gnana Prasuna B_5.5 years
Gnana Prasuna B_5.5 yearsGnana Prasuna B_5.5 years
Gnana Prasuna B_5.5 years
 
Splunk for Developers Breakout Session
Splunk for Developers Breakout SessionSplunk for Developers Breakout Session
Splunk for Developers Breakout Session
 

Mehr von Optimizely

Mehr von Optimizely (20)

Clover Rings Up Digital Growth to Drive Experimentation
Clover Rings Up Digital Growth to Drive ExperimentationClover Rings Up Digital Growth to Drive Experimentation
Clover Rings Up Digital Growth to Drive Experimentation
 
Make Every Touchpoint Count: How to Drive Revenue in an Increasingly Online W...
Make Every Touchpoint Count: How to Drive Revenue in an Increasingly Online W...Make Every Touchpoint Count: How to Drive Revenue in an Increasingly Online W...
Make Every Touchpoint Count: How to Drive Revenue in an Increasingly Online W...
 
The Science of Getting Testing Right
The Science of Getting Testing RightThe Science of Getting Testing Right
The Science of Getting Testing Right
 
Atlassian's Mystique CLI, Minimizing the Experiment Development Cycle
Atlassian's Mystique CLI, Minimizing the Experiment Development CycleAtlassian's Mystique CLI, Minimizing the Experiment Development Cycle
Atlassian's Mystique CLI, Minimizing the Experiment Development Cycle
 
Autotrader Case Study: Migrating from Home-Grown Testing to Best-in-Class Too...
Autotrader Case Study: Migrating from Home-Grown Testing to Best-in-Class Too...Autotrader Case Study: Migrating from Home-Grown Testing to Best-in-Class Too...
Autotrader Case Study: Migrating from Home-Grown Testing to Best-in-Class Too...
 
Zillow + Optimizely: Building the Bridge to $20 Billion Revenue
Zillow + Optimizely: Building the Bridge to $20 Billion RevenueZillow + Optimizely: Building the Bridge to $20 Billion Revenue
Zillow + Optimizely: Building the Bridge to $20 Billion Revenue
 
The Future of Optimizely for Technical Teams
The Future of Optimizely for Technical TeamsThe Future of Optimizely for Technical Teams
The Future of Optimizely for Technical Teams
 
Empowering Agents to Provide Service from Anywhere: Contact Centers in the Ti...
Empowering Agents to Provide Service from Anywhere: Contact Centers in the Ti...Empowering Agents to Provide Service from Anywhere: Contact Centers in the Ti...
Empowering Agents to Provide Service from Anywhere: Contact Centers in the Ti...
 
Experimentation Everywhere: Create Exceptional Online Shopping Experiences an...
Experimentation Everywhere: Create Exceptional Online Shopping Experiences an...Experimentation Everywhere: Create Exceptional Online Shopping Experiences an...
Experimentation Everywhere: Create Exceptional Online Shopping Experiences an...
 
Building an Experiment Pipeline for GitHub’s New Free Team Offering
Building an Experiment Pipeline for GitHub’s New Free Team OfferingBuilding an Experiment Pipeline for GitHub’s New Free Team Offering
Building an Experiment Pipeline for GitHub’s New Free Team Offering
 
AMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server SideAMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server Side
 
Evolving Experimentation from CRO to Product Development
Evolving Experimentation from CRO to Product DevelopmentEvolving Experimentation from CRO to Product Development
Evolving Experimentation from CRO to Product Development
 
Overcoming the Challenges of Experimentation on a Service Oriented Architecture
Overcoming the Challenges of Experimentation on a Service Oriented ArchitectureOvercoming the Challenges of Experimentation on a Service Oriented Architecture
Overcoming the Challenges of Experimentation on a Service Oriented Architecture
 
How The Zebra Utilized Feature Experiments To Increase Carrier Card Engagemen...
How The Zebra Utilized Feature Experiments To Increase Carrier Card Engagemen...How The Zebra Utilized Feature Experiments To Increase Carrier Card Engagemen...
How The Zebra Utilized Feature Experiments To Increase Carrier Card Engagemen...
 
Making Your Hypothesis Work Harder to Inform Future Product Strategy
Making Your Hypothesis Work Harder to Inform Future Product StrategyMaking Your Hypothesis Work Harder to Inform Future Product Strategy
Making Your Hypothesis Work Harder to Inform Future Product Strategy
 
Kick Your Assumptions: How Scholl's Test-Everything Culture Drives Revenue
Kick Your Assumptions: How Scholl's Test-Everything Culture Drives RevenueKick Your Assumptions: How Scholl's Test-Everything Culture Drives Revenue
Kick Your Assumptions: How Scholl's Test-Everything Culture Drives Revenue
 
Experimentation through Clients' Eyes
Experimentation through Clients' EyesExperimentation through Clients' Eyes
Experimentation through Clients' Eyes
 
Shipping to Learn and Accelerate Growth with GitHub
Shipping to Learn and Accelerate Growth with GitHubShipping to Learn and Accelerate Growth with GitHub
Shipping to Learn and Accelerate Growth with GitHub
 
Test Everything: TrustRadius Delivers Customer Value with Experimentation
Test Everything: TrustRadius Delivers Customer Value with ExperimentationTest Everything: TrustRadius Delivers Customer Value with Experimentation
Test Everything: TrustRadius Delivers Customer Value with Experimentation
 
Optimizely Agent: Scaling Resilient Feature Delivery
Optimizely Agent: Scaling Resilient Feature DeliveryOptimizely Agent: Scaling Resilient Feature Delivery
Optimizely Agent: Scaling Resilient Feature Delivery
 

Kürzlich hochgeladen

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Kürzlich hochgeladen (20)

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 

How to feature flag and run experiments in iOS and Android

  • 1. 1 How to feature flag and run experiments in iOS and Android Kody O’Connell Developer Advocate Optimizely Tom Zurkan Senior Software Engineer Optimizely
  • 2. 2 Optimizely Introductions Perri Bronson Product Marketing Tom Zurkan Sr. Software Engineer Kody O’Connell Developer Advocate https://twitter.com/pezbronson https://twitter.com/KodyOConnellhttps://medium.com/@TomZurkan
  • 3. 3 Housekeeping ● We are recording this webinar ● You will be emailed the slides and recording ● Ask your questions via the webinar questions box ● We’ll answer all questions at end
  • 4. 4 Agenda 1. Why use feature flags in mobile app development? (Kody) 2. How the iOS and Android SDKs work (Tom) 3. The steps to create free Optimizely feature flags in your iOS app (Kody) 4. How to set up a feature experiment with Full Stack (Kody) 5. Q&A (Tom and Kody)
  • 6. Feature Flags if feature_flag is ‘on’: do_something() else: do_something_else()
  • 7. 7 Controlled Rollouts 100% ROLLOUTGRADUAL ROLLOUTBETA USERSSTAGING ENVIRONMENT LOCAL DEVELOPMENT
  • 8. 8 How do Feature Flags fit into CI/CD?
  • 9. 9 Software Development Life Cycle DEPLOY BUILD & TEST RELEASE Develop & Iterate Quickly ● Selectively enable test suites and making data-driven technical evaluations ● Don’t waste time untangling messy merge conflicts Delight Your Customers ● Empower teams to manage their own releases ● Incident? Minimize time to solution Scale Feature Delivery ● Ship faster by decoupling deploys from releases to shorten development cycles ● Deploy frequently and safely
  • 10. 10 Faster Development Cycles Features don’t need to be complete to get merged ● No stale feature branches ● Smaller code reviews ● Safety of a feature flag BUILD & TEST
  • 11. 11 Seamless Delivery ● Decouple deployment from release ● Stop worrying about when to deploy ● Deploy freeze != Feature freeze ○ E.g. Thanksgiving Weekend DEPLOY
  • 12. 12 Feature Control ● Empower teams to manage their own releases ● Test out your feature on a small targeted audience 🐥 ○ Easily manage beta customers RELEASE
  • 13. 13 Incident Response It’s 3am, you get paged… 😱 ● Smaller changeset → easier investigation ● Roll back, don’t hotfix ● Someone else having an outage? → killswitch ● Don’t roll back an entire version for a single bug RELEASE
  • 21. enabled: True header_color: #F829EA header_sticky: True header_height: 20 mobile_app_header enabled: True checkout_version: 3 quick_checkout: True header_height: 20 checkout_flow enabled: True fresh_boost: 1.25 profile_boost: 2.10 local_boost: 0.75 search_ranking_algorithm Feature Experiments
  • 22. Remote Configuration enabled: True header_color: #F829EA header_sticky: True header_height: 20 mobile_app_header header_message: ‘We love our users <3’ We love our users <3 SDK polls for new config at desired frequency Webhooks deliver new config in seconds
  • 23. 23 Sounds great, but how does it work?
  • 24. How Optimizely Full Stack Works JSON Datafile Client SDKs Server SDKs Remote Config Data Warehouse Remotely configure flags / experiments in Optimizely. (UI and/or REST API) Update the JSON datafile SDKs make decisions locally, track events asynchronously for zero latency Analyze results through Optimizely and/or exports and integrations into your other systems Optimizely Event Tracking Event Tracking
  • 25. How iOS/tvOS SDK works Client - Interact directly with the client DatafileHandler - Responsible for getting, polling and caching datafile EventHandler - Saves and sends events to Optimizely backend UPS - User Profile Service holds previous bucketing information
  • 26. Unique to iOS/tvOS SDK - Written in Swift with safety first and modern APIs - No core data (we use file for events by default). - Event handler has event batching for performance. - Datafile handler and event handler are unscheduled when app goes to background. - Clean Swift API with Objective-C hanging off to the side. - Take a look at my medium articles on the Swift SDK design (enums, atomic property, dependency injection, and exposing Objective-C API)
  • 27. How the Android SDK works Manager - Holds the Optimizely instance from the Optimizely Java SDK DatafileHandler - Implements ProjectConfigManager. Responsible for getting, polling and caching datafile EventHandler - Saves and sends events to Optimizely backend UPS - User Profile Service holds previous bucketing information
  • 28. Unique to Android SDK - Datafile handler uses the intents and the JobScheduler to schedule future updates even in the background - Events are also uses intents and the scheduler to schedule attempts at flushing the events. - Events can be triggered to send after a connection becomes available.
  • 29. - Android and iOS features will converge. - Config diffs instead of full configs. - IDE Plugins to help with development (https://plugins.jetbrains.com/plugin/13969-optimizely) What’s next for our mobile SDKs
  • 30. 30 Let’s create a feature flag and set up an experiment in Swift.
  • 31. 31 Best Practices Visibility ● Flag On or Off ● Environment Deployed ● Behavior of flag ON/OFF Risk Assessment ● Can this feature be rolled back safely? ● What happens if this flag were to fail? Exit Criteria/Expiration ● When is the usefulness of this flag over? ● How soon should we remove this flag when it is no longer needed? ● Who should be removing this flag? Communication ● Who should be alerted when flag is turned ON? ● Who should be monitoring metrics? ● Who should be alerted if flag is turned OFF?
  • 32. 32 Resources iOS ● Swift SDK and demo app on Github https://github.com/optimizely/swift-sdk ● Swift SDK docs https://docs.developers.optimizely.com/full-stack/docs/swift-sdk ● Kody’s blog post https://blog.optimizely.com/2020/02/24/feature-flags-swift-ios/ Android ● Android SDK and demo app on Github https://github.com/optimizely/android-sdk ● Android SDK docs https://docs.developers.optimizely.com/rollouts/docs/android General ● Optimizely Full Stack product info https://www.optimizely.com/platform/full-stack/ ● Optimizely SDK IntelliJ plug-in https://plugins.jetbrains.com/plugin/13969-optimizely ● Tom’s Blog https://medium.com/@TomZurkan