SlideShare a Scribd company logo
1 of 32
Rapidly Developing FarmVille How we built and scaled a #1 Facebook game in 5 weeks AmittMahajan Lead Developer – FarmVille March 9, 2010
FarmVille
5 week development cycle FarmVille 6 developers (PHP/Flash) 2 artists 3 producers/designers
At Launch FarmVille 18K users/day after 24 hrs 1M users/day after 4 days
Today FarmVille 110M+ Installs  31M Players/Day
My Goals Reduce the amount of time it takes you to develop your games Give you a blueprint for how to reliably scale your games to millions without your servers falling over
What slows down developers? Other developers Design / Art Production (Copy) Lack of knowledge
Increasing Developer Efficiency Flash (Client) PHP (Server) All developers know both Design DOESN’T rule all Developers co-own features with designers
Data Driven Design Shoot for a content pipeline that doesn’t need a developer Data driven can be as easy as a designer-editable XML file No devneeded!
String Tables A string table is an external file that holds strings for the app Best practice to prepare for localization Developers are not blocked by production Allows quick response to Facebook TOS changes
Abstracted Network Layer Feature developers get client/server communication and serialization for free Goal
Abstracted Network Layer PHP Flash Feature A Feature B Feature A Service Feature B Service Networked Actions Action Dispatcher Network Layer Network Layer Validation Checks Validation Checks AMF Protocol (RPC) Action Batching Result Batching
Network Layer Batching No need to do the work twice Reduced server load in FarmVille by 50%! Server Client Only One Request onPlow() Plow Plow onPlow() Plant Plant onPlant() Plow …
Network Layer Validation Solves problem of unfiltered input Ensures data is received by server in-order it was sent
Social Network Wrapper Single place to perform Facebook API calls Working with a highly dynamic API can be difficult Abstracting FB calls makes them easier to integrate Allows for cross-platform games
Continuous Deployment Build latest version of source-repo Deploy to test “auto app” on Facebook to surface production issues early
Continuous Deployment FarmVille QA Process Auto app Staging Production Quick Smoke Full Test Pass
FarmVille Traffic Growth 1 Million DAUsevery week for 20 weeks source: developeranalytics.com
Scalable Server Architecture We had no choice but to scale on the cloud Every part of the server architecture scales horizontally No single points of failure Take the DB out of the equation
Round Robin DNS … Load Balancer #1 Load Balancer #N      Auto-scaling web      array (PHP) … Web Server #M Web Server #1 User Data  & Updates Memcache Pool Lazy Writes DB Layer Data Reads … DB-#K Master DB-#1 Master … DB-#K Slave DB-#1 Slave
All you need to implement is… … Web Server #M Web Server #1 …everything else is off-the-shelf components! …
Reducing Load-times Users want responsive pages Show something immediately Player’s won’t wait for your app to load Stream non-critical content
Avoid Remote Calls Remote server calls are slow and unreliable Aim for no remote calls during load Embed data into Javascript Facebook Iframe Inline-JS here Flash ClientEmbed
Caching Slow Calls Build in FacebookAPI caching within the social network wrapper Write a DB wrapper to generate and cache SQL
FarmVille Page Profiler Catch and eliminate all un-cached Facebook and DB calls Goal
Fault Tolerance Servers do go down randomly Build redundancy on all levels of server architecture Facebook is a dependency also Aim for DB-less & Facebook-less modes “Defcon”-style error management
Runtime Config How do we progressively keep the game running? Create all features with kill-switches Create a web dashboard to allow non-technical folks to help out
Is it still running? Notify your team when things break using server monitoring (Nagios/Munin) What to watch Server load/traffic graphs Memcacheevictions
Stats Tracking How do we know what users are seeing? Have the client send back statistics Number of errors Load-times Take a metrics driven approach to error handling
Before Launching Get confidence that your stuff actually works Perform load testing Social games are a marathon not a sprint Sleep before launching!
Questions?
Thank You!

More Related Content

What's hot

Speed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesSpeed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesMeagan Hanes
 
SharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOMSharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOMRyan Dennis
 
Ryan king wp-plugin-presentation
Ryan king wp-plugin-presentationRyan king wp-plugin-presentation
Ryan king wp-plugin-presentationRyan King
 
ISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do That
ISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do ThatISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do That
ISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do ThatKeith Brooks
 
Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...
Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...
Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...Cprime
 
Performance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsPerformance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsFilip Rakowski
 
Building Faster Locally with Local - Ben Turner
Building Faster Locally with Local - Ben TurnerBuilding Faster Locally with Local - Ben Turner
Building Faster Locally with Local - Ben TurnerWP Engine
 
Build Applications Faster with SWCs
Build Applications Faster with SWCsBuild Applications Faster with SWCs
Build Applications Faster with SWCsChris Black
 
Functional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suaveFunctional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suaveTomas Jansson
 
Building High Performance Web Applications
Building High Performance Web ApplicationsBuilding High Performance Web Applications
Building High Performance Web ApplicationsJeff Whelpley
 
How to Wield Kentico 9 in the Real World
How to Wield Kentico 9 in the Real WorldHow to Wield Kentico 9 in the Real World
How to Wield Kentico 9 in the Real WorldBrian McKeiver
 
Salesforce automationhour meighanbrodkeyflowcomponents
Salesforce automationhour meighanbrodkeyflowcomponentsSalesforce automationhour meighanbrodkeyflowcomponents
Salesforce automationhour meighanbrodkeyflowcomponentsMeighan Brodkey
 
Web based desktop
Web based desktopWeb based desktop
Web based desktopDoug Moncur
 
Amp up your Site with Accelerated Mobile Pages
Amp up your Site with Accelerated Mobile PagesAmp up your Site with Accelerated Mobile Pages
Amp up your Site with Accelerated Mobile PagesBrian McKeiver
 
Balsamiq Mockups: User interface screen design tool
Balsamiq Mockups: User interface screen design toolBalsamiq Mockups: User interface screen design tool
Balsamiq Mockups: User interface screen design toolNathanael Boehm
 
Introduction to Balsamiq Mockups
Introduction to Balsamiq MockupsIntroduction to Balsamiq Mockups
Introduction to Balsamiq MockupsE2LOGY
 
The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.WP Engine
 

What's hot (20)

Speed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesSpeed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan Hanes
 
SharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOMSharePoint Saturday Cincinnati 2014 - CSOM
SharePoint Saturday Cincinnati 2014 - CSOM
 
Ryan king wp-plugin-presentation
Ryan king wp-plugin-presentationRyan king wp-plugin-presentation
Ryan king wp-plugin-presentation
 
ISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do That
ISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do ThatISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do That
ISBG / NCUG Why Didn't Anyone Tell Me Notes Could Do That
 
Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...
Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...
Admins Anonymous - the 5 step program for recovering Jira Admins. Atlassian S...
 
Performance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsPerformance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern js
 
Scaling small apps
Scaling small appsScaling small apps
Scaling small apps
 
Windows 8
Windows 8Windows 8
Windows 8
 
Building Faster Locally with Local - Ben Turner
Building Faster Locally with Local - Ben TurnerBuilding Faster Locally with Local - Ben Turner
Building Faster Locally with Local - Ben Turner
 
Build Applications Faster with SWCs
Build Applications Faster with SWCsBuild Applications Faster with SWCs
Build Applications Faster with SWCs
 
Functional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suaveFunctional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suave
 
Building High Performance Web Applications
Building High Performance Web ApplicationsBuilding High Performance Web Applications
Building High Performance Web Applications
 
How to Wield Kentico 9 in the Real World
How to Wield Kentico 9 in the Real WorldHow to Wield Kentico 9 in the Real World
How to Wield Kentico 9 in the Real World
 
Salesforce automationhour meighanbrodkeyflowcomponents
Salesforce automationhour meighanbrodkeyflowcomponentsSalesforce automationhour meighanbrodkeyflowcomponents
Salesforce automationhour meighanbrodkeyflowcomponents
 
Web based desktop
Web based desktopWeb based desktop
Web based desktop
 
Amp up your Site with Accelerated Mobile Pages
Amp up your Site with Accelerated Mobile PagesAmp up your Site with Accelerated Mobile Pages
Amp up your Site with Accelerated Mobile Pages
 
Balsamiq Mockups: User interface screen design tool
Balsamiq Mockups: User interface screen design toolBalsamiq Mockups: User interface screen design tool
Balsamiq Mockups: User interface screen design tool
 
Balsamiq
BalsamiqBalsamiq
Balsamiq
 
Introduction to Balsamiq Mockups
Introduction to Balsamiq MockupsIntroduction to Balsamiq Mockups
Introduction to Balsamiq Mockups
 
The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.
 

Viewers also liked

Run and jump tutorial (part 1) actors
Run and jump tutorial (part 1)   actorsRun and jump tutorial (part 1)   actors
Run and jump tutorial (part 1) actorsMuhd Basheer
 
Facebook Strategies For The Classroom
Facebook Strategies For The ClassroomFacebook Strategies For The Classroom
Facebook Strategies For The ClassroomKevin Lim
 
1001 Game Ideas Package
1001 Game Ideas Package1001 Game Ideas Package
1001 Game Ideas Packageaakoo
 
Social Gaming Overview: Too Big To Ignore
Social Gaming Overview: Too Big To IgnoreSocial Gaming Overview: Too Big To Ignore
Social Gaming Overview: Too Big To IgnoreMark Silva
 
Creativity Techniques in Game Design
Creativity Techniques in Game DesignCreativity Techniques in Game Design
Creativity Techniques in Game Designaakoo
 
20 Game Ideas You Should Steal
20 Game Ideas You Should Steal20 Game Ideas You Should Steal
20 Game Ideas You Should StealStuart Dredge
 

Viewers also liked (6)

Run and jump tutorial (part 1) actors
Run and jump tutorial (part 1)   actorsRun and jump tutorial (part 1)   actors
Run and jump tutorial (part 1) actors
 
Facebook Strategies For The Classroom
Facebook Strategies For The ClassroomFacebook Strategies For The Classroom
Facebook Strategies For The Classroom
 
1001 Game Ideas Package
1001 Game Ideas Package1001 Game Ideas Package
1001 Game Ideas Package
 
Social Gaming Overview: Too Big To Ignore
Social Gaming Overview: Too Big To IgnoreSocial Gaming Overview: Too Big To Ignore
Social Gaming Overview: Too Big To Ignore
 
Creativity Techniques in Game Design
Creativity Techniques in Game DesignCreativity Techniques in Game Design
Creativity Techniques in Game Design
 
20 Game Ideas You Should Steal
20 Game Ideas You Should Steal20 Game Ideas You Should Steal
20 Game Ideas You Should Steal
 

Similar to Rapidly Building FarmVille: How we built and scaled a #1 Facebook game in 5 weeks (GDC 2010)

web development ppt by prakash bedage
web development ppt by prakash bedageweb development ppt by prakash bedage
web development ppt by prakash bedagePrakashBedage
 
web development project prakash.pptx
web development project prakash.pptxweb development project prakash.pptx
web development project prakash.pptxPrakashBedage
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxgoodcoders
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxgoodcoders
 
TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING
TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING
TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING PamRobert
 
Top 11 Front-End Web Development Tools To Consider in 2020
 Top 11 Front-End Web Development Tools To Consider in 2020 Top 11 Front-End Web Development Tools To Consider in 2020
Top 11 Front-End Web Development Tools To Consider in 2020Katy Slemon
 
Top 13 Backend Frameworks for Web development in 2024
Top 13 Backend Frameworks for Web development in 2024Top 13 Backend Frameworks for Web development in 2024
Top 13 Backend Frameworks for Web development in 2024Clarion Technologies
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer Ramy Hakam
 
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...GreeceJS
 
Uncovering Windows - Silverlight Seminar
Uncovering Windows - Silverlight SeminarUncovering Windows - Silverlight Seminar
Uncovering Windows - Silverlight SeminarAbram John Limpin
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web ApplicationMichael Choi
 
App.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentApp.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentTeamstudio
 
An Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentAn Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentS. M. Hossein Hamidi
 
Cookbook for Building An App
Cookbook for Building An AppCookbook for Building An App
Cookbook for Building An AppManish Jain
 

Similar to Rapidly Building FarmVille: How we built and scaled a #1 Facebook game in 5 weeks (GDC 2010) (20)

web development ppt by prakash bedage
web development ppt by prakash bedageweb development ppt by prakash bedage
web development ppt by prakash bedage
 
web development project prakash.pptx
web development project prakash.pptxweb development project prakash.pptx
web development project prakash.pptx
 
Social Network
Social NetworkSocial Network
Social Network
 
test4
test4test4
test4
 
Web
WebWeb
Web
 
test4
test4test4
test4
 
test3
test3test3
test3
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docx
 
A Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docxA Quick Guide On Mobile App Backend Development For Busy People.docx
A Quick Guide On Mobile App Backend Development For Busy People.docx
 
TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING
TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING
TECHNOLOGY FOR BACK-END WEB DEVELOPMENT: SERVER-SIDE SCRIPTING
 
Top 11 Front-End Web Development Tools To Consider in 2020
 Top 11 Front-End Web Development Tools To Consider in 2020 Top 11 Front-End Web Development Tools To Consider in 2020
Top 11 Front-End Web Development Tools To Consider in 2020
 
Top 13 Backend Frameworks for Web development in 2024
Top 13 Backend Frameworks for Web development in 2024Top 13 Backend Frameworks for Web development in 2024
Top 13 Backend Frameworks for Web development in 2024
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer
 
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
Cross platform engineering - Lessons Learned (Michael Asimakopoulos, Valadis ...
 
Uncovering Windows - Silverlight Seminar
Uncovering Windows - Silverlight SeminarUncovering Windows - Silverlight Seminar
Uncovering Windows - Silverlight Seminar
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
App.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentApp.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application Development
 
An Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentAn Introduction To Linux Development Environment
An Introduction To Linux Development Environment
 
Flex And Php 101
Flex And Php 101Flex And Php 101
Flex And Php 101
 
Cookbook for Building An App
Cookbook for Building An AppCookbook for Building An App
Cookbook for Building An App
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Rapidly Building FarmVille: How we built and scaled a #1 Facebook game in 5 weeks (GDC 2010)

  • 1. Rapidly Developing FarmVille How we built and scaled a #1 Facebook game in 5 weeks AmittMahajan Lead Developer – FarmVille March 9, 2010
  • 3. 5 week development cycle FarmVille 6 developers (PHP/Flash) 2 artists 3 producers/designers
  • 4. At Launch FarmVille 18K users/day after 24 hrs 1M users/day after 4 days
  • 5. Today FarmVille 110M+ Installs 31M Players/Day
  • 6. My Goals Reduce the amount of time it takes you to develop your games Give you a blueprint for how to reliably scale your games to millions without your servers falling over
  • 7. What slows down developers? Other developers Design / Art Production (Copy) Lack of knowledge
  • 8. Increasing Developer Efficiency Flash (Client) PHP (Server) All developers know both Design DOESN’T rule all Developers co-own features with designers
  • 9. Data Driven Design Shoot for a content pipeline that doesn’t need a developer Data driven can be as easy as a designer-editable XML file No devneeded!
  • 10. String Tables A string table is an external file that holds strings for the app Best practice to prepare for localization Developers are not blocked by production Allows quick response to Facebook TOS changes
  • 11. Abstracted Network Layer Feature developers get client/server communication and serialization for free Goal
  • 12. Abstracted Network Layer PHP Flash Feature A Feature B Feature A Service Feature B Service Networked Actions Action Dispatcher Network Layer Network Layer Validation Checks Validation Checks AMF Protocol (RPC) Action Batching Result Batching
  • 13. Network Layer Batching No need to do the work twice Reduced server load in FarmVille by 50%! Server Client Only One Request onPlow() Plow Plow onPlow() Plant Plant onPlant() Plow …
  • 14. Network Layer Validation Solves problem of unfiltered input Ensures data is received by server in-order it was sent
  • 15. Social Network Wrapper Single place to perform Facebook API calls Working with a highly dynamic API can be difficult Abstracting FB calls makes them easier to integrate Allows for cross-platform games
  • 16. Continuous Deployment Build latest version of source-repo Deploy to test “auto app” on Facebook to surface production issues early
  • 17. Continuous Deployment FarmVille QA Process Auto app Staging Production Quick Smoke Full Test Pass
  • 18. FarmVille Traffic Growth 1 Million DAUsevery week for 20 weeks source: developeranalytics.com
  • 19. Scalable Server Architecture We had no choice but to scale on the cloud Every part of the server architecture scales horizontally No single points of failure Take the DB out of the equation
  • 20. Round Robin DNS … Load Balancer #1 Load Balancer #N Auto-scaling web array (PHP) … Web Server #M Web Server #1 User Data & Updates Memcache Pool Lazy Writes DB Layer Data Reads … DB-#K Master DB-#1 Master … DB-#K Slave DB-#1 Slave
  • 21. All you need to implement is… … Web Server #M Web Server #1 …everything else is off-the-shelf components! …
  • 22. Reducing Load-times Users want responsive pages Show something immediately Player’s won’t wait for your app to load Stream non-critical content
  • 23. Avoid Remote Calls Remote server calls are slow and unreliable Aim for no remote calls during load Embed data into Javascript Facebook Iframe Inline-JS here Flash ClientEmbed
  • 24. Caching Slow Calls Build in FacebookAPI caching within the social network wrapper Write a DB wrapper to generate and cache SQL
  • 25. FarmVille Page Profiler Catch and eliminate all un-cached Facebook and DB calls Goal
  • 26. Fault Tolerance Servers do go down randomly Build redundancy on all levels of server architecture Facebook is a dependency also Aim for DB-less & Facebook-less modes “Defcon”-style error management
  • 27. Runtime Config How do we progressively keep the game running? Create all features with kill-switches Create a web dashboard to allow non-technical folks to help out
  • 28. Is it still running? Notify your team when things break using server monitoring (Nagios/Munin) What to watch Server load/traffic graphs Memcacheevictions
  • 29. Stats Tracking How do we know what users are seeing? Have the client send back statistics Number of errors Load-times Take a metrics driven approach to error handling
  • 30. Before Launching Get confidence that your stuff actually works Perform load testing Social games are a marathon not a sprint Sleep before launching!