tabtale story: building a publishing and monitoring mobile games architecture with high scale
DESCRIPTION
At Tabtale we are setting up an entire server side for the all the publishing services. These services include dynamic game configurations, error collection, analytics, social services and more.Tabtale is among the world’s top app publishers with millions of downloads so we are putting a great deal of effort in creating an extremely highly scalable and fault tolerant architecture. In this talk I will go over the architecture decisions taken to support the scalability and diversity that is required from the server side services while keeping the management of this infrastructure sane. ~30min By Assaf GannonTRANSCRIPT
![Page 1: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/1.jpg)
TabTale story: Building a publishing and monitoring
mobile games architecture with high
scale
Assaf Gannon
FullStack Developers Israel
20.5.2014Google Campus TLV Hosted by:
![Page 2: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/2.jpg)
Assaf Gannon
![Page 3: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/3.jpg)
The project’s goal:Provide a set of server side services and SDK
for the company’s apps
![Page 4: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/4.jpg)
Mobile Device
Client App
SDK
Server
First Sketch
![Page 5: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/5.jpg)
![Page 6: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/6.jpg)
![Page 7: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/7.jpg)
TabTale is a very successful startup that develops interactive books, games, and educational apps
• Released Over 250 apps for children on both iOS and Android devices
• Over 350 million downloads• Over 25M active monthly users
text
![Page 8: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/8.jpg)
The Tricky Stuff
text
![Page 9: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/9.jpg)
Zero downtime
Clients must never be affected from server failures or
downtime
text
![Page 10: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/10.jpg)
![Page 11: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/11.jpg)
Zero Downtime - Solutiontext
Solid Infrastructure - AWS
● Elastic Beanstalk - PaaS to run the services
● S3 - static content storage and delivery service
● MongoHQ - Managed MongoDB
● RedisLab - Managed Redis
![Page 12: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/12.jpg)
Zero Downtime - Solution
• A good contingency:
○ Fallback to static content on S3
text
![Page 13: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/13.jpg)
Large Scale from Day 1text
![Page 14: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/14.jpg)
Large Scale from Day 1
• Horizontal Scaling - Stateless servers
• Prevent heavy server loads
○ Setup multiple tiers of static content delivery:■ CDN (Cloud Front) ■ S3■ Nginx / Apache■ Pre-generated permutations on Redis / in
memory• Use cache effectively
text
![Page 15: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/15.jpg)
Effective Cachetext
![Page 16: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/16.jpg)
Effective Cache, cont.text
![Page 17: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/17.jpg)
Rapidly Changing Requirements
• Avoid Monolithic Application• Take the “Micro Services” approach from the
beginning• Dynamic Model - loose types• Separate Data Base per Service• Services are entirely stateless• Services are decoupled, and talk JSON
text
![Page 18: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/18.jpg)
![Page 19: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/19.jpg)
Node js
Ideal for rapid development of IO intensive applications
● Extremely easy and fast to setup, develop, and deploy
● Very low learning curve● Speaks JSON as mother tongue● Great performance doin IO operations● NPM● Can be deployed to multiple PaaS providers
including Elastic Beanstalk
text
![Page 20: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/20.jpg)
Nodejs Internal Overviewtext
![Page 21: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/21.jpg)
![Page 22: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/22.jpg)
The Event Looptext
![Page 23: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/23.jpg)
Spring Boot
The Java way to rapidly bootstrap applications
● Create stand-alone Spring applications● Embed Tomcat or Jetty directly (no need to deploy WAR
files)● Provide opinionated 'starter' POMs to simplify your
Maven configuration● Automatically configure Spring whenever possible● Provide production-ready features such as metrics,
health checks and externalized configuration● Absolutely no code generation and no requirement for
XML configuration
text
![Page 24: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/24.jpg)
MongoDB
Great for managing document oriented data and Meta Data
● No schema management
● Very fast reads
● Very simple and powerful DSL
text
![Page 25: Tabtale story: Building a publishing and monitoring mobile games architecture with high scale](https://reader036.vdocuments.site/reader036/viewer/2022081403/55657dbbd8b42a723f8b4976/html5/thumbnails/25.jpg)
Tricky Stuff Checklist
• Zero downtime
• Large scales from day 1
• Vague and rapidly changing requirements
text