SlideShare une entreprise Scribd logo
1  sur  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!

Contenu connexe

Tendances

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
 

Tendances (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.
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Dernier (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

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!