Adopting a serverless architecture brings a new set of challenges for an organization regardless of where they are in their cloud/devops journey. This presentation will share Fender's experience on the topics of development, testing, building, configuration, deployment and monitoring of serverless applications. Starting with a brief overview of the Fender Play React Native mobile app, Joshua and Michael will review one of the AWS Lambda-based services that supports it, including the design considerations and trade-offs made during development.
Testing a serverless function can be quite different than testing a traditional microservice - in some ways simpler, in some ways more complex - and the presentation will describe the testing performed on these serverless systems. Learn about Fender's build and deploy pipeline that is gated on the execution of integration tests, and how they configure the services. Lastly the presentation will cover how to monitor a serverless application, which is more similar to monitoring a traditional microservice than you might think.
Innovating Through React Native Mobile Apps with Fender Musical Instruments.pdf
1. Innovating Through React
Native Mobile Apps
Fender Musical Instruments
Joshua Couch, VP of Engineering
Michael Garski, Director of Platform Engineering
2. FENDER + FENDER DIGITAL
• Fender was Founded in 1946 by Leo Fender in Fullerton, CA
• Introduced the iconic Telecaster in 1951, Stratocaster followed in 1954
• 2000+ Employees
• 2 Corporate Offices in Scottsdale, AZ and Hollywood, CA
• 2 Factories in Corona, CA and Ensenada, Mexico
• FMIC includes Gretsch, Jackson, Charvel and EVH (Eddie Van Halen) brands
• Fender Digital formed in late 2015
• 95 employees primarily in the Hollywood office
• All new products being built on top of AWS
3. FENDER DIGITAL PRODUCTS
Mod Shop + Connect
• July/October 2016
• Customized Guitars
• Shared-sign-on
Fender Tune
• August 2016
• iOS + Android:
1.5M ⬇️, 4.7 ⭐️
Fender Tone
• January 2017
• iOS + Android
• Companion App to
Mustang GT Amp
Fender Play
• July 2017
• React-Native
• iOS w/IAP
6. Our AWS Environment
Active Account
• Engineers have full access
• Free to prototype new ideas
QA/Production Account
• Engineers have limited access
• Stable environment
7. Architecture Considerations
Persistent Data Store
Amazon
DynamoDB
Read Flexibility
Amazon ES
Event Driven
Amazon
SNS
Amazon
SQS
Combine With Lambda
Amazon
DynamoDB Amazon ES
Lambda
function
9. Lambda With Apex & Go
• Started using spring 2017
• Apex is a multi-language
platform for developing, building,
& deploying lambda functions
10. Apex Project Layout
• Business logic is shared among
functions in sub-packages
• Lambda functions in a specific
directory
• Project file to set environment
variables when executing apex
deploy
• Vendored dependencies with
Godep
• Main sets up dependencies and
injects into handler
11. How we use lambda for services
• A service is a collection of functions with different inputs
• Service contains a function for each:
• APIGW route/method combination
• SNS topic
• DDB table stream
• Directly invoked functions for ‘private’ APIs
• Advantages
• Single purposed functions with granular permissions
• Simple handlers that validate input, invoke business logic, format response
• Disadvantages
• Long build & deploy cycle (not an issue with node or python functions)
13. LMS / Play API
Amazon API
Gateway
Create Lesson
Play API
Custom
Authorizer
Amazon
DynamoDB
Stream Events
Create Course
Save Progress
Get Course
LMS Custom
Authorizer
Mobile App
LMS Admins
Get Progress
Amazon ES
Get Lesson
Index Refil
14. Video Processing Pipeline
AWS Snowball
AWS Storage
Gateway
Local SAN
Raw Video
Assets
Amazon
Glacier
Start
Transcode
Amazon Elastic
Transcoder
Transcoded
Videos
Transcode
Completed
Amazon
DynamoDB
Mobile App
15. Test & Build
• GitFlow workflow
• CircleCI
• Unit test coverage reported
through Coveralls
• End to end tests performed that
set up external dependencies
16. Deployment & configuration
• Terraform provisions
resources
• Functions deployed via
AWS CLI
• APIGW updated via AWS
CLI
• Ansible for configuration
management