SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
A Layered Architecture
Robustness & Efficiency

dennis.docter@spilgames.com
March 22nd, 2013
2
A legacy of growth
Social and casual gaming platform


                                50+ portals
                                190+ countries




                    4
Casual games         Multi player games

      Social games         Native games
200+ million unique users
                                                           per month
250"


200"
                                                                                                                                                                                   Traffic growth
150"
                                                                                                                                                                                   over 1600%
100"


  50"




                                                                                                                                                                         5/1/12"
                                                                                                                                                               1/1/12"
                                                                                                                                                     9/1/11"
   0"




                                                                                                                                           5/1/11"
                                                                                                                                 1/1/11"
                                                                                                                      9/1/10"
                                                                                                            5/1/10"
                                                                                                  1/1/10"
                                                                                        9/1/09"
                                                                              5/1/09"
                                                                    1/1/09"
                                                          9/1/08"
                                                5/1/08"
                                      1/1/08"
                            9/1/07"
                  5/1/07"
        1/1/07"




                                                                                                                                90"
                                                                                                                                80"
                                                                                                                                70"
                                                                                                                                60"

                             Tech dept.                                                                                         50"
                                                                                                                                40"

                             growth                                                                                             30"



                             over 2000%
                                                                                                                                20"
                                                                                                                                10"
                                                                                                                                 0"
                                                                                                                                 1/1/08"                                 1/1/09"      1/1/10"   1/1/11"   1/1/12"
XML                                    Json
            Interfacing                           Interfacing +
                                                   plain GET                            Intefacing            Intefacing


                                      Caching       SQL                               Business Caching
  Authorization + Authentication


                                                                                                            Business Caching
                                                             Caching                    logic                 logic




                                                                  Authorization
                                   Business                                                  SQL
                                                     Business                                                        Business
                                       logic                                      Caching                 Caching      logic
                                                       logic
                                                                                         Business
                                                                                                                           SQL
                                                                                           logic
                                      Caching        SQL
                                                                                              SQL          Business
                                   SQL                                                                       logic
                                                             Swift                                               SQLSchema
                                                             API
                                                 Schema                           Schema
                                       Schema




                                       Mysql
                                      Write DB      Mysql DB                            Mysql DB         Mysql DB
Mysql
Reader
                                                                                                                                 Memcache
 Mysql                                                     Mysql DB                                                               Cluster
Readers




                                                                                  7
Problems
•   Inconsistent	
  design	
  &	
  interfaces
•   Unclear	
  responsibili4es
•   Technical	
  debt	
  
•   Independent	
  teams	
  developing	
  
    the	
  same	
  features.
•   7	
  layers	
  of	
  caching	
  hell
•   Scaling	
  
Problems
•   Inconsistent	
  design	
  &	
  interfaces
•   Unclear	
  responsibili4es
•   Technical	
  debt	
  
•   Independent	
  teams	
  developing	
  
    the	
  same	
  features.
•   7	
  layers	
  of	
  caching	
  hell
•   Scaling	
  

                           not a
                          problem
                             :)
9
A new
approach
New architecture expectations

• Flexible

• Predictable

• Scalable
                                    TM
                                    d
                                 wor t
                            B uzz lian
                                  p
                             C om


                    11
Choices made

•   Simple
•   Clean	
  separa4on
•   No	
  horizontal	
  dependencies
•   Fault	
  tolerant
•   Distributed




                            12
Layers      Responsibilities

 Client          • Integra4on
                 • State

                 • Authen4ca4on
Interface        • Aggrega4on
                 • Valida4on
                 • Authoriza4on
Service          • Composi4on
                 • Transforma4on
                 • Caching
Storage          • Persistence
                 • Sharding

            13
Layers      Responsibilities

 Client          • Integra4on
                 • State

                 • Authen4ca4on
Interface        • Aggrega4on




                                   Stateless
                 • Valida4on
                 • Authoriza4on
Service          • Composi4on
                 • Transforma4on
                 • Caching
Storage          • Persistence
                 • Sharding

            13
Building blocks
Application
• Small & Simple
• Limited scope
• Quick to deploy
Platform
• Abstracts complexity
• Low change rate
• Long lifetime

                         14
Walkthrough
Interfaces
                                    https post
                                    /user/get/
             3rd Party              {“auth”:
                                      {“token”: “UwAA_AWeff...”}                   Highscore
             Backend                }                                               Service

                                                                                     list




                                                                               1
                     get([friends])                                  Application
       User
                                2       User            2             Interface
     Interface
                                       Service
                         list
get(me)
                     1




            count                                                  /application/highscores/
       1




                         Friends
                         Service
                 1




   User
  Service    Awards
             Service

                                                   16
Widgets
Widgets
    logo widget                                profile widget
                                               search widget
    navigation widget

    recommendation widget   new_games widget                    most_played widget




    recent_games widget




    social_games widget
definition
                               User
profile           logic       Service

                template
                         +    Award
                  html,
                              Service
               [properties]
          18
header


                                      definition
                                                     User
 logo                 profile                       Service
                                        logic

                                      template
navigation       search                        +    Award
                                        html,
                                                    Service
                                     [properties]
                                18
ame.com                  /
htt p://www.ag

                          preprocess
                                                                     ...
widget platform




                                                footer               ...
                          home_page
                                                         new games

                          header             body
                                                               ...


                                                               definition
                                                                              User
                   logo                    profile                           Service
                                                                 logic

                                                               template
                  navigation       search                               +    Award
                                                                 html,
                                                                             Service
                                                              [properties]
                                                         18
Services
                                               user
{“context”:{               get              interface
   “guid”: 62623423,
   “siteid” : 88,
   “locale” : “en_US”
},”guid”: 324112535}
                                                         {
                                                             “gid”: “324112535”,
        user service                                         “username” : “-fooba-”,
                                                             “avatarId” :
                                                                “http://agame.com/avatars/99142.png”
                                                         }
         check     fetch      filter   modify


                                      {
                                          “gid”: “324112535”,
                                          “username” : “-fooba-”,
                    profile               “firstName” : “john”
                   storage                “avatarId” : 99142
                                      }
Storage platform

• API	
  instead	
  of	
  SQL
• Buckets	
  of	
  data	
  =	
  Key-­‐Value	
  with	
  Schema
• Abstracts	
  storage
                             Bucket    Bucket       Bucket              Bucket   Bucket       Bucket

                                           Storage Node 1                        Storage Node 2
                           Cache                                       Cache




                            Shard 1                          Shard 2                      Shard ..




                                      20
Job handlers

 Account    interface-account.register             Audit
Interface   {“guid”:7734}                         Handler


                                                               Audit
  User      service-user.register
                                                                Log
 Service    {“result”:”success”,”guid”:”73324”}




                                                  Welcome
 Profile                                          Handler
 bucket
                                     rabbitmq

                                                            send
                                                            email


                                         21
Fitting it
together
interface         JSON                   Load	
  balancer




              Auth         User            Award             Profile        Game
            in@erface    interface       interface           widget        widget

                                                        Protobuf      Widget	
  PlaGorm
service




              User         User            Game             Award        Award
             service      service         service           service      service
                                     Protobuf
storage




                                                             User        Game
             Profiles     Profiles          Games
                                                            Award        Award
             bucket      bucket           bucket
                                                            bucket       bucket
                                                                      Storage	
  PlaGorm

                                                23
How we do it
•   Strictly	
  define	
  EVERYTHING	
  
    • input/output	
  format,	
  urls,	
  
    • rpc	
  func4ons,	
  types,	
  valida4on

•   Strict	
  rules	
  on	
  changes
    • Everything	
  op4onal
    • Unless	
  you’re	
  really,	
  really	
  sure	
  (and	
  have	
  proof!)

•   Generate	
  code	
  and	
  documenta4on
    • Interface	
  derived	
  from	
  specifica4on
    • Documenta4on	
  derived	
  from	
  specifica4on

                                      24
• XML:	
  Defini4on


• XSLT:	
  Transforma4on


• Piqi:	
  
  • Protobuf	
  &	
  Json	
  
    encoding/decoding
  • HTTP	
  RPC
   (h`p://piqi.org/)



         25
What we ended up with…

•   Small	
  applica4ons	
  running	
  on	
  their	
  own	
  nodes

•   Scale	
  up	
  where	
  necessary

•   Many	
  of	
  them	
  on	
  the	
  same	
  machine

•   Small	
  cluster	
  already	
  contains	
  hundreds	
  of	
  nodes




                                    26
Keeping it connected

•   Connec4ng	
  all	
  nodes	
  is	
  a	
  bad	
  idea:
    • Not	
  needed
    • Number	
  of	
  open	
  connec4ons

•   Solu4on:	
  use	
  hidden	
  nodes
    • Each	
  node	
  specifies	
  the	
  nodes	
  it	
  needs.
    • How	
  does	
  it	
  scale?




                                       27
Hidden nodes vs. visible nodes
                                                             Hidden"            Visible"
                            160000"
Number of TCP connections


                                                                                                                145530$
                            140000"


                            120000"
                                                                                                      114960$


                            100000"
                                                                                             87990$

                             80000"
                                                                                  64620$
                             60000"
                                                                        44850$
                             40000"
                                                               28680$
                                                      16110$
                             20000"
                                              7140$
                                      1770$            240$     320$     400$         480$    560$     640$      720$
                                 0"
                                        2"     4"       6"       8"      10"          12"     14"       16"       18"

                                      Number of servers (~30 nodes / server)
                                                                                 28
Router

•   Each	
  applica4on	
  has	
  it’s	
  own	
  router

•   Scans	
  &	
  Monitors	
  

•   Balances	
  requests	
  across	
  nodes

•   Parallelizes	
  requests	
  as	
  much	
  as	
  possible

•   Applica4on	
  can	
  only	
  talk	
  to	
  what	
  it	
  has	
  defined

                                      29
But what about response times?

•   Use	
  proper	
  transports	
  (Erlang	
  RPC	
  vs.	
  HTTP)

•   Yes	
  there	
  is	
  some	
  transport	
  overhead

•   Typically	
  <	
  1ms	
  per	
  layer	
  (+network	
  latency)

•   But	
  each	
  layer	
  has	
  predictable	
  response	
  4mes

•   As	
  long	
  as	
  enough	
  downward	
  resources	
  are	
  
    available
                                    30
The old ...




              31
.. and the new.




                  32
Closing
Words
Where are we now..

•     Interface	
  layer	
  has	
  been	
  defined	
  and	
  largely	
  
      implemented

•    ImplemenMng	
  the	
  service	
  &	
  storage	
  layer	
  step	
  by	
  step
    • Meanwhile	
  we	
  have	
  adapters	
  in	
  place

•     Several	
  of	
  the	
  new	
  API’s	
  are	
  in	
  use	
  in	
  producMon

•     First	
  portals	
  on	
  the	
  new	
  widget	
  plaGorm	
  will	
  be	
  deployed	
  
      in	
  the	
  coming	
  months


                                             34
... And where we’re going

• Deploying	
  to	
  mul4ple	
  datacenters	
  this	
  year

• Bring	
  elas4city	
  to	
  our	
  deployments

• Decommission	
  our	
  “old	
  architecture”	
  

• Erlang	
  game	
  plahorm




                                  35
Lessons Learned

•      An	
  architectural	
  vision	
  is	
  crucial
•      Integra4ng	
  into	
  a	
  mess	
  is	
  a	
  mess
•      Layers	
  with	
  clear	
  responsibili4es
•      Strict	
  communica4on
•      Package	
  small
•      Change	
  is	
  the	
  only	
  constant
•      Op4mize	
  for	
  predictability	
  first
	
  



                                           36
Questions




37
Thank you!




      38

Contenu connexe

En vedette

N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOASperasoft
 
Software engineering : Layered Architecture
Software engineering : Layered ArchitectureSoftware engineering : Layered Architecture
Software engineering : Layered ArchitectureMuhammed Afsal Villan
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layerSerious_SamSoul
 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture PatternsAssaf Gannon
 
Layered architecture style
Layered architecture styleLayered architecture style
Layered architecture styleBegench Suhanov
 
Software Engineering - chp5- software architecture
Software Engineering - chp5- software architectureSoftware Engineering - chp5- software architecture
Software Engineering - chp5- software architectureLilia Sfaxi
 
Software Architecture and Design - An Overview
Software Architecture and Design - An OverviewSoftware Architecture and Design - An Overview
Software Architecture and Design - An OverviewOliver Stadie
 
A Software Architect's View On Diagramming
A Software Architect's View On DiagrammingA Software Architect's View On Diagramming
A Software Architect's View On Diagrammingmeghantaylor
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Svetlin Nakov
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patternsRiccardo Cardin
 
Three Software Architecture Styles
Three Software Architecture StylesThree Software Architecture Styles
Three Software Architecture StylesJorgen Thelin
 

En vedette (13)

N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOA
 
Software engineering : Layered Architecture
Software engineering : Layered ArchitectureSoftware engineering : Layered Architecture
Software engineering : Layered Architecture
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns
 
Layered architecture style
Layered architecture styleLayered architecture style
Layered architecture style
 
Software Engineering - chp5- software architecture
Software Engineering - chp5- software architectureSoftware Engineering - chp5- software architecture
Software Engineering - chp5- software architecture
 
Layered Architecture
Layered ArchitectureLayered Architecture
Layered Architecture
 
Software Architecture and Design - An Overview
Software Architecture and Design - An OverviewSoftware Architecture and Design - An Overview
Software Architecture and Design - An Overview
 
A Software Architect's View On Diagramming
A Software Architect's View On DiagrammingA Software Architect's View On Diagramming
A Software Architect's View On Diagramming
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
 
Three Software Architecture Styles
Three Software Architecture StylesThree Software Architecture Styles
Three Software Architecture Styles
 
Layered Software Architecture
Layered Software ArchitectureLayered Software Architecture
Layered Software Architecture
 

Similaire à Erlang factory layered architecture - final

April Fools Day
April Fools DayApril Fools Day
April Fools Dayzakir2012
 
Attribution case study | Ad:tech NY 2012 | Encore Media Metrics
Attribution case study | Ad:tech NY 2012 | Encore Media MetricsAttribution case study | Ad:tech NY 2012 | Encore Media Metrics
Attribution case study | Ad:tech NY 2012 | Encore Media MetricsEncore Media Metrics
 
Mom Armbrister Cottage1 Preliminary Binder
Mom Armbrister Cottage1 Preliminary BinderMom Armbrister Cottage1 Preliminary Binder
Mom Armbrister Cottage1 Preliminary Bindergcare2000
 
Dos lagos 112111 sheet - a201-01 - level 1 floor plan
Dos lagos 112111   sheet - a201-01 - level 1 floor planDos lagos 112111   sheet - a201-01 - level 1 floor plan
Dos lagos 112111 sheet - a201-01 - level 1 floor planBruce Ruggles
 
Nordeus - NOAH12 London
Nordeus - NOAH12 LondonNordeus - NOAH12 London
Nordeus - NOAH12 LondonNOAH Advisors
 
Nordeus - NOAH12 London
Nordeus - NOAH12 LondonNordeus - NOAH12 London
Nordeus - NOAH12 LondonMarco Rodzynek
 

Similaire à Erlang factory layered architecture - final (7)

April Fools Day
April Fools DayApril Fools Day
April Fools Day
 
April Fool Day
April Fool DayApril Fool Day
April Fool Day
 
Attribution case study | Ad:tech NY 2012 | Encore Media Metrics
Attribution case study | Ad:tech NY 2012 | Encore Media MetricsAttribution case study | Ad:tech NY 2012 | Encore Media Metrics
Attribution case study | Ad:tech NY 2012 | Encore Media Metrics
 
Mom Armbrister Cottage1 Preliminary Binder
Mom Armbrister Cottage1 Preliminary BinderMom Armbrister Cottage1 Preliminary Binder
Mom Armbrister Cottage1 Preliminary Binder
 
Dos lagos 112111 sheet - a201-01 - level 1 floor plan
Dos lagos 112111   sheet - a201-01 - level 1 floor planDos lagos 112111   sheet - a201-01 - level 1 floor plan
Dos lagos 112111 sheet - a201-01 - level 1 floor plan
 
Nordeus - NOAH12 London
Nordeus - NOAH12 LondonNordeus - NOAH12 London
Nordeus - NOAH12 London
 
Nordeus - NOAH12 London
Nordeus - NOAH12 LondonNordeus - NOAH12 London
Nordeus - NOAH12 London
 

Erlang factory layered architecture - final

  • 1. A Layered Architecture Robustness & Efficiency dennis.docter@spilgames.com March 22nd, 2013
  • 2. 2
  • 3. A legacy of growth
  • 4. Social and casual gaming platform 50+ portals 190+ countries 4
  • 5. Casual games Multi player games Social games Native games
  • 6. 200+ million unique users per month 250" 200" Traffic growth 150" over 1600% 100" 50" 5/1/12" 1/1/12" 9/1/11" 0" 5/1/11" 1/1/11" 9/1/10" 5/1/10" 1/1/10" 9/1/09" 5/1/09" 1/1/09" 9/1/08" 5/1/08" 1/1/08" 9/1/07" 5/1/07" 1/1/07" 90" 80" 70" 60" Tech dept. 50" 40" growth 30" over 2000% 20" 10" 0" 1/1/08" 1/1/09" 1/1/10" 1/1/11" 1/1/12"
  • 7. XML Json Interfacing Interfacing + plain GET Intefacing Intefacing Caching SQL Business Caching Authorization + Authentication Business Caching Caching logic logic Authorization Business SQL Business Business logic Caching Caching logic logic Business SQL logic Caching SQL SQL Business SQL logic Swift SQLSchema API Schema Schema Schema Mysql Write DB Mysql DB Mysql DB Mysql DB Mysql Reader Memcache Mysql Mysql DB Cluster Readers 7
  • 8. Problems • Inconsistent  design  &  interfaces • Unclear  responsibili4es • Technical  debt   • Independent  teams  developing   the  same  features. • 7  layers  of  caching  hell • Scaling  
  • 9. Problems • Inconsistent  design  &  interfaces • Unclear  responsibili4es • Technical  debt   • Independent  teams  developing   the  same  features. • 7  layers  of  caching  hell • Scaling   not a problem :)
  • 10. 9
  • 12. New architecture expectations • Flexible • Predictable • Scalable TM d wor t B uzz lian p C om 11
  • 13. Choices made • Simple • Clean  separa4on • No  horizontal  dependencies • Fault  tolerant • Distributed 12
  • 14. Layers Responsibilities Client • Integra4on • State • Authen4ca4on Interface • Aggrega4on • Valida4on • Authoriza4on Service • Composi4on • Transforma4on • Caching Storage • Persistence • Sharding 13
  • 15. Layers Responsibilities Client • Integra4on • State • Authen4ca4on Interface • Aggrega4on Stateless • Valida4on • Authoriza4on Service • Composi4on • Transforma4on • Caching Storage • Persistence • Sharding 13
  • 16. Building blocks Application • Small & Simple • Limited scope • Quick to deploy Platform • Abstracts complexity • Low change rate • Long lifetime 14
  • 18. Interfaces https post /user/get/ 3rd Party {“auth”: {“token”: “UwAA_AWeff...”} Highscore Backend } Service list 1 get([friends]) Application User 2 User 2 Interface Interface Service list get(me) 1 count /application/highscores/ 1 Friends Service 1 User Service Awards Service 16
  • 20. Widgets logo widget profile widget search widget navigation widget recommendation widget new_games widget most_played widget recent_games widget social_games widget
  • 21. definition User profile logic Service template + Award html, Service [properties] 18
  • 22. header definition User logo profile Service logic template navigation search + Award html, Service [properties] 18
  • 23. ame.com / htt p://www.ag preprocess ... widget platform footer ... home_page new games header body ... definition User logo profile Service logic template navigation search + Award html, Service [properties] 18
  • 24. Services user {“context”:{ get interface “guid”: 62623423, “siteid” : 88, “locale” : “en_US” },”guid”: 324112535} { “gid”: “324112535”, user service “username” : “-fooba-”, “avatarId” : “http://agame.com/avatars/99142.png” } check fetch filter modify { “gid”: “324112535”, “username” : “-fooba-”, profile “firstName” : “john” storage “avatarId” : 99142 }
  • 25. Storage platform • API  instead  of  SQL • Buckets  of  data  =  Key-­‐Value  with  Schema • Abstracts  storage Bucket Bucket Bucket Bucket Bucket Bucket Storage Node 1 Storage Node 2 Cache Cache Shard 1 Shard 2 Shard .. 20
  • 26. Job handlers Account interface-account.register Audit Interface {“guid”:7734} Handler Audit User service-user.register Log Service {“result”:”success”,”guid”:”73324”} Welcome Profile Handler bucket rabbitmq send email 21
  • 28. interface JSON Load  balancer Auth User Award Profile Game in@erface interface interface widget widget Protobuf Widget  PlaGorm service User User Game Award Award service service service service service Protobuf storage User Game Profiles Profiles Games Award Award bucket bucket bucket bucket bucket Storage  PlaGorm 23
  • 29. How we do it • Strictly  define  EVERYTHING   • input/output  format,  urls,   • rpc  func4ons,  types,  valida4on • Strict  rules  on  changes • Everything  op4onal • Unless  you’re  really,  really  sure  (and  have  proof!) • Generate  code  and  documenta4on • Interface  derived  from  specifica4on • Documenta4on  derived  from  specifica4on 24
  • 30. • XML:  Defini4on • XSLT:  Transforma4on • Piqi:   • Protobuf  &  Json   encoding/decoding • HTTP  RPC (h`p://piqi.org/) 25
  • 31. What we ended up with… • Small  applica4ons  running  on  their  own  nodes • Scale  up  where  necessary • Many  of  them  on  the  same  machine • Small  cluster  already  contains  hundreds  of  nodes 26
  • 32. Keeping it connected • Connec4ng  all  nodes  is  a  bad  idea: • Not  needed • Number  of  open  connec4ons • Solu4on:  use  hidden  nodes • Each  node  specifies  the  nodes  it  needs. • How  does  it  scale? 27
  • 33. Hidden nodes vs. visible nodes Hidden" Visible" 160000" Number of TCP connections 145530$ 140000" 120000" 114960$ 100000" 87990$ 80000" 64620$ 60000" 44850$ 40000" 28680$ 16110$ 20000" 7140$ 1770$ 240$ 320$ 400$ 480$ 560$ 640$ 720$ 0" 2" 4" 6" 8" 10" 12" 14" 16" 18" Number of servers (~30 nodes / server) 28
  • 34. Router • Each  applica4on  has  it’s  own  router • Scans  &  Monitors   • Balances  requests  across  nodes • Parallelizes  requests  as  much  as  possible • Applica4on  can  only  talk  to  what  it  has  defined 29
  • 35. But what about response times? • Use  proper  transports  (Erlang  RPC  vs.  HTTP) • Yes  there  is  some  transport  overhead • Typically  <  1ms  per  layer  (+network  latency) • But  each  layer  has  predictable  response  4mes • As  long  as  enough  downward  resources  are   available 30
  • 37. .. and the new. 32
  • 39. Where are we now.. • Interface  layer  has  been  defined  and  largely   implemented • ImplemenMng  the  service  &  storage  layer  step  by  step • Meanwhile  we  have  adapters  in  place • Several  of  the  new  API’s  are  in  use  in  producMon • First  portals  on  the  new  widget  plaGorm  will  be  deployed   in  the  coming  months 34
  • 40. ... And where we’re going • Deploying  to  mul4ple  datacenters  this  year • Bring  elas4city  to  our  deployments • Decommission  our  “old  architecture”   • Erlang  game  plahorm 35
  • 41. Lessons Learned • An  architectural  vision  is  crucial • Integra4ng  into  a  mess  is  a  mess • Layers  with  clear  responsibili4es • Strict  communica4on • Package  small • Change  is  the  only  constant • Op4mize  for  predictability  first   36