Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
GAMES  FOR  THE  MASSES           Wie  DevOps  die  Entwicklung  von  Architektur  verändert Jesper  Richter-­‐Reichhelm, ...
DEV  -­‐  OPSMonday, June 4, 2012
DEV  -­‐  OPS          Some  say:  Admins  learn  to  be  ‘Agile’            Scrum  and  KanbanMonday, June 4, 2012
DEV  -­‐  OPS          Some  say:  Admins  learn  to  be  ‘Agile’            Scrum  and  Kanban          Others  say:  Adm...
DEV  -­‐  OPS          Some  say:  Admins  learn  to  be  ‘Agile’            Scrum  and  Kanban          Others  say:  Adm...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Monday, June 4, 2012
Our  games  all  look  the  same                       Flash  client          BackendMonday, June 4, 2012
Our  games  all  look  the  same                       Flash  client                                              Game  Se...
Our  games  all  look  the  same                                              Backend                       State  Changes...
But  the  scale  is  interesPng                       14  billion  requests  /  monthMonday, June 4, 2012
But  the  scale  is  interesPng                       14  billion  requests  /  monthMonday, June 4, 2012
But  the  scale  is  interesPng                          14  billion  requests  /  month                       >100,000  D...
But  the  scale  is  interesPng                          14  billion  requests  /  month                       >100,000  D...
Classic  roles  in  IT                   Arch                                    Dev                                      ...
Roles  in  Wooga’s  ITMonday, June 4, 2012
Roles  in  Wooga’s  IT                                    ArchMonday, June 4, 2012
Roles  in  Wooga’s  IT                                    Arch                                    DevMonday, June 4, 2012
Roles  in  Wooga’s  IT                                    Arch                                    Dev                     ...
Roles  in  Wooga’s  IT                                    Arch   Arch                                    Dev    Dev       ...
Wooga  has  dedicated  game  teamsMonday, June 4, 2012
Architecture  EvoluPon  at  Wooga          The  Start          The  Next  Step          Best  of  Two  Worlds          Com...
First  game:  Try  to  be  flexible                       ArchMonday, June 4, 2012
First  game:  Try  to  be  flexible                               •  Ruby  on  Rails                       ArchMonday, June...
First  game:  Try  to  be  flexible                               •  Ruby  on  Rails                               •  Amazo...
First  game:  Try  to  be  flexible                               •  Ruby  on  Rails                               •  Amazo...
EvoluPon  I:  Use  Ruby  (on  Rails)                       Oct  2009Monday, June 4, 2012
Basic  setup  using  sharding                                                 lb                       app   app   app   a...
250K  daily  users    &$!!!$!!!"    %$#!!$!!!"    %$!!!$!!!"       #!!$!!!"                                  Life  was  go...
250K  daily  users    &$!!!$!!!"    %$#!!$!!!"    %$!!!$!!!"       #!!$!!!"                                  Life  was  go...
Welcome  to  6  weeks  of  pain!Monday, June 4, 2012
Welcome  to  6  weeks  of  pain!          Heavy  opPmizaPons  were  necessaryMonday, June 4, 2012
Welcome  to  6  weeks  of  pain!          Heavy  opPmizaPons  were  necessary            Numerous  small  fixes  regarding ...
Welcome  to  6  weeks  of  pain!          Heavy  opPmizaPons  were  necessary            Numerous  small  fixes  regarding ...
Welcome  to  6  weeks  of  pain!          Heavy  opPmizaPons  were  necessary            Numerous  small  fixes  regarding ...
Welcome  to  6  weeks  of  pain!          Heavy  opPmizaPons  were  necessary            Numerous  small  fixes  regarding ...
Early  sharding  hell:  8+8  DBs                                                            lb                          ap...
At  500K  daily  users  we  were  at  a  dead  end    &$!!!$!!!"    %$#!!$!!!"    %$!!!$!!!"       #!!$!!!"               ...
First  game:  Try  to  be  flexible                               •  Ruby  on  Rails                               •  Amazo...
First  game:  Try  to  be  flexible                               •  Ruby  on  Rails                               •  Amazo...
First  game:  Try  to  be  flexible                               •  Ruby  on  Rails                               •  Amazo...
Pick  the  right  tool  for  the  jobMonday, June 4, 2012
Pick  the  right  tool  for  the  jobMonday, June 4, 2012
EvoluPon  II:  Use  Redis  as  main  DB                                   Jan  2010                       Oct  2009Monday,...
First  game:  Redis  to  the  mix                               •  Ruby  on  Rails                               •  Amazon...
First  game:  Redis  to  the  mix                               •  Ruby  on  Rails                               •  Amazon...
Hybrid  approach                        256  GB  data                               60  GB  data                         1...
One  team  saved  the  other  one    &$!!!$!!!"    %$#!!$!!!"    %$!!!$!!!"       #!!$!!!"                  !"            ...
One  team  saved  the  other  one    &$!!!$!!!"    %$#!!$!!!"    %$!!!$!!!"       #!!$!!!"                  !"            ...
Now  more  than  2M  users  /  day    &$!!!$!!!"    %$#!!$!!!"    %$!!!$!!!"       #!!$!!!"                  !"           ...
Now  more  than  2M  users  /  day    &$!!!$!!!"    %$#!!$!!!"    %$!!!$!!!"                                              ...
10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all!                                                             lb ...
First  game:  Add  Redis  to  the  mix                               •  Ruby  on  Rails                               •  A...
First  game:  Add  Redis  to  the  mix                               •  Ruby  on  Rails                               •  A...
First  game:  Add  Redis  to  the  mix                               •  Ruby  on  Rails                               •  A...
Architecture  EvoluPon  at  Wooga          The  Start:  Ruby          The  Next  Step          Best  of  Two  Worlds      ...
Stateless  servers  and  DBs                       Server             DatabaseMonday, June 4, 2012
Stateless  servers  and  DBs                       Server             DatabaseMonday, June 4, 2012
Stateless  servers  and  DBs                       Server             DatabaseMonday, June 4, 2012
Stateless  servers  and  DBs                       Server             DatabaseMonday, June 4, 2012
Stateless  servers  and  DBs                       Server             DatabaseMonday, June 4, 2012
Stateless  servers  and  DBs                       Server             DatabaseMonday, June 4, 2012
Find  the  flawMonday, June 4, 2012
Find  the  flaw           “Stateless  applicaPon  servers                 guarantee  one  thing:Monday, June 4, 2012
Find  the  flaw           “Stateless  applicaPon  servers                 guarantee  one  thing:                        The...
Strong  session  pamernMonday, June 4, 2012
Strong  session  pamern          User  starts  playingMonday, June 4, 2012
Strong  session  pamern          User  starts  playing          Many  transformaPons  on            the  same  data  setMo...
Strong  session  pamern          User  starts  playing          Many  transformaPons  on            the  same  data  set  ...
Strong  session  pamern          User  starts  playing          Many  transformaPons  on            the  same  data  set  ...
Stateful  servers  and  DBs                       Server            DatabaseMonday, June 4, 2012
Stateful  servers  and  DBs                       Server            DatabaseMonday, June 4, 2012
Stateful  servers  and  DBs                       Server            DatabaseMonday, June 4, 2012
Stateful  servers  and  DBs                       Server                        Database                                On...
Stateful  servers  and  DBs                       Server                        Database                                On...
Next  game:  Don’t  use  a  DB  at  all                       ArchMonday, June 4, 2012
Next  game:  Don’t  use  a  DB  at  all                               •  Erlang  OTP                       ArchMonday, Jun...
Next  game:  Don’t  use  a  DB  at  all                               •  Erlang  OTP                               •  Amaz...
Next  game:  Don’t  use  a  DB  at  all                               •  Erlang  OTP                               •  Amaz...
EvoluPon  III:  Erlang  and  stateful  servers                                               Oct  2010                    ...
Stateful  servers  are  not  so  hard                                sessionMonday, June 4, 2012
Stateful  servers  are  not  so  hard                                      session                                    sess...
Stateful  servers  are  not  so  hard                                   Server                                      sessio...
Stateful  servers  are  not  so  hard                                   Server                                      sessio...
Stateful  servers  are  not  so  hard                                   Server                                      sessio...
Stateful  servers  are  not  so  hard                                   Server                                      sessio...
Stateful  servers  are  not  so  hard                                   Server                                      sessio...
Stateful  servers  are  not  so  hard                                   Server                                      sessio...
Stateful  servers  are  not  so  hard                                   Server                                      sessio...
Stateful  servers  are  not  so  hard                          Server          Server          Server                     ...
With  stateful  server  the  DB  is  less  used                           Ruby  Stateless            Erlang  Stateful     ...
With  stateful  server  the  DB  is  less  used                           Ruby  Stateless            Erlang  Stateful     ...
Next  game:  Don’t  use  a  DB  at  all                               •  Erlang  OTP                               •  Amaz...
Next  game:  Don’t  use  a  DB  at  all                               •  Erlang  OTP                               •  Amaz...
Next  game:  Don’t  use  a  DB  at  all                               •  Erlang  OTP                               •  Amaz...
Architecture  EvoluPon  at  Wooga          The  Start:  Ruby          The  Next  Step:  Erlang          Best  of  Two  Wor...
Last  game:  The  ideal  architecture                       ArchMonday, June 4, 2012
Last  game:  The  ideal  architecture                              •  Erlang  OTP  (state)                       ArchMonda...
Last  game:  The  ideal  architecture                              •  Erlang  OTP  (state)                              • ...
Last  game:  The  ideal  architecture                              •  Erlang  OTP  (state)                              • ...
Last  game:  The  ideal  architecture                              •  Erlang  OTP  (state)                              • ...
Last  game:  The  ideal  architecture                              •  Erlang  OTP  (state)                              • ...
EvoluPon  IV:  The  best  out  of  two  worlds                                                           Aug  2011        ...
The  basic  setup  looks  exactly  like  before                          Server          Server          Server           ...
Bringing  2  worlds  together                                 Server                       session                        ...
Bringing  2  worlds  together                                 Server                       session                        ...
Bringing  2  worlds  together                                 Server                                      Worker          ...
Bringing  2  worlds  together                                 Server                                        Worker        ...
Bringing  2  worlds  together                                 Server                                        Worker        ...
Bringing  2  worlds  together                                 Server                                        Worker        ...
Performance  impact  for  large  payloads                                          200  kB  payload                       ...
Performance  impact  for  large  payloads                                          200  kB  payload                       ...
Performance  impact  for  large  payloads                                          200  kB  payload                       ...
NOT  CPU  boundMonday, June 4, 2012
NOT  CPU  bound       25%Monday, June 4, 2012
NOT  CPU  bound       25%                Fixed  bandwith  limit  @  300  MB/sMonday, June 4, 2012
Last  game:  The  ideal  architecture?                              •  Erlang  OTP  (state)                              •...
Last  game:  The  ideal  architecture?                              •  Erlang  OTP  (state)                              •...
Last  game:  The  ideal  architecture?                              •  Erlang  OTP  (state)                              •...
Last  game:  The  ideal  architecture?                              •  Erlang  OTP  (state)                              •...
Last  game:  The  ideal  architecture?                              •  Erlang  OTP  (state)                              •...
Last  game:  The  ideal  architecture?                              •  Erlang  OTP  (state)                              •...
Last  game:  The  ideal  architecture?                              •  Erlang  OTP  (state)                              •...
So  nothing  new?Monday, June 4, 2012
So  nothing  new?          We  could  not  combine  Ruby  and  Erlang,  too  bad.            At  least  not  for  this  ga...
So  nothing  new?          We  could  not  combine  Ruby  and  Erlang,  too  bad.            At  least  not  for  this  ga...
So  nothing  new?          We  could  not  combine  Ruby  and  Erlang,  too  bad.            At  least  not  for  this  ga...
So  nothing  new?          We  could  not  combine  Ruby  and  Erlang,  too  bad.            At  least  not  for  this  ga...
The  next  step  in  social  gamingMonday, June 4, 2012
The  next  step  in  social  gamingMonday, June 4, 2012
The  next  step  in  social  gamingMonday, June 4, 2012
The  next  step  in  social  gamingMonday, June 4, 2012
The  next  step  in  social  gamingMonday, June 4, 2012
The  next  step  in  social  gamingMonday, June 4, 2012
The  next  step  in  social  gamingMonday, June 4, 2012
Architecture  EvoluPon  at  Wooga          The  Start:  Ruby          The  Next  Step:  Erlang          Best  of  Two  Wor...
Each  new  game  brought  us  innovaPon                                                           Aug  2011               ...
We’ve  learned  to  value                       Small teams                            over                         big te...
We’ve  learned  to  value                       Collaboration                            over                        compe...
We’ve  learned  to  value                       Generalists                          over                        specialis...
We’ve  learned  to  value                  Effort reduction                         over                    cost reduction...
We’ve  learned  to  value                       Innovation                            over                       risk miti...
A  good  value  system         We’ve  learned  to  value         Small  teams                              over     Big  t...
It works!Monday, June 4, 2012
It works!                  Be fast, be bold!Monday, June 4, 2012
QuesPons?                       Jesper  Richter-­‐Reichhelm                                 @jrirei                       ...
Monday, June 4, 2012
Upcoming SlideShare
Loading in …5
×

Games for the Masses - Wie DevOps die Entwicklung von Architektur verändert (Webinale)

2,252 views

Published on

(Slides in English)
Ein Backend für ein weltweit erfolgreiches Social Game zu entwickeln ist nicht einfach, aber die eigentliche Herausforderung ist der Betrieb der Systeme! Bei Wooga sind dieselben zwei bis drei Entwickler für beides verantwortlich. Über die letzten zwei Jahren hat sich ein halbes Dutzend Teams dieser Herausforderung gestellt. Dabei konnten sie auf die Erfahrungen der vorhergehenden Teams zurückgreifen und hatten die Freiheit, eigene Lösungsansätze zu verfolgen. Der Vortrag wird die entstandene Evolution der Backends nachvollziehen: Anfangs LAMP, dann Ruby statt PHP, dann NoSQL statt MySQL und am Ende ohne Datenbank auf Basis von Erlang OTP. Die Darstellung dieser Reise wird anschaulich zeigen, welche Vorteile es haben kann, Entwicklern auch einmal freie Hand zu lassen.

Published in: Technology
  • Be the first to comment

Games for the Masses - Wie DevOps die Entwicklung von Architektur verändert (Webinale)

  1. 1. GAMES  FOR  THE  MASSES Wie  DevOps  die  Entwicklung  von  Architektur  verändert Jesper  Richter-­‐Reichhelm,  @jrireiMonday, June 4, 2012
  2. 2. DEV  -­‐  OPSMonday, June 4, 2012
  3. 3. DEV  -­‐  OPS Some  say:  Admins  learn  to  be  ‘Agile’ Scrum  and  KanbanMonday, June 4, 2012
  4. 4. DEV  -­‐  OPS Some  say:  Admins  learn  to  be  ‘Agile’ Scrum  and  Kanban Others  say:  Admins  learn  to  program  their  setup Chef,  PuppetMonday, June 4, 2012
  5. 5. DEV  -­‐  OPS Some  say:  Admins  learn  to  be  ‘Agile’ Scrum  and  Kanban Others  say:  Admins  learn  to  program  their  setup Chef,  Puppet I  say:  This  is  all  nice,  but  not  enough Developers  need  to  learn  a  lot  about  opera?onMonday, June 4, 2012
  6. 6. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  7. 7. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  8. 8. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  9. 9. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  10. 10. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  11. 11. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  12. 12. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  13. 13. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  14. 14. Classic  roles  in  IT Arch Dev OpMonday, June 4, 2012
  15. 15. Classic  roles  in  IT Arch Dev Op ???Monday, June 4, 2012
  16. 16. Monday, June 4, 2012
  17. 17. Our  games  all  look  the  same Flash  client BackendMonday, June 4, 2012
  18. 18. Our  games  all  look  the  same Flash  client Game  Session Asynch.  CommunicaPonMonday, June 4, 2012
  19. 19. Our  games  all  look  the  same Backend State  Changes ValidaPon PersistenceMonday, June 4, 2012
  20. 20. But  the  scale  is  interesPng 14  billion  requests  /  monthMonday, June 4, 2012
  21. 21. But  the  scale  is  interesPng 14  billion  requests  /  monthMonday, June 4, 2012
  22. 22. But  the  scale  is  interesPng 14  billion  requests  /  month >100,000  DB  operaPons  /  secondMonday, June 4, 2012
  23. 23. But  the  scale  is  interesPng 14  billion  requests  /  month >100,000  DB  operaPons  /  second >50,000  DB  updates  /  secondMonday, June 4, 2012
  24. 24. Classic  roles  in  IT Arch Dev Op ???Monday, June 4, 2012
  25. 25. Roles  in  Wooga’s  ITMonday, June 4, 2012
  26. 26. Roles  in  Wooga’s  IT ArchMonday, June 4, 2012
  27. 27. Roles  in  Wooga’s  IT Arch DevMonday, June 4, 2012
  28. 28. Roles  in  Wooga’s  IT Arch Dev OpMonday, June 4, 2012
  29. 29. Roles  in  Wooga’s  IT Arch Arch Dev Dev Op OpMonday, June 4, 2012
  30. 30. Wooga  has  dedicated  game  teamsMonday, June 4, 2012
  31. 31. Architecture  EvoluPon  at  Wooga The  Start The  Next  Step Best  of  Two  Worlds Company  ValuesMonday, June 4, 2012
  32. 32. First  game:  Try  to  be  flexible ArchMonday, June 4, 2012
  33. 33. First  game:  Try  to  be  flexible •  Ruby  on  Rails ArchMonday, June 4, 2012
  34. 34. First  game:  Try  to  be  flexible •  Ruby  on  Rails •  Amazon  EC2 ArchMonday, June 4, 2012
  35. 35. First  game:  Try  to  be  flexible •  Ruby  on  Rails •  Amazon  EC2 •  MySQL ArchMonday, June 4, 2012
  36. 36. EvoluPon  I:  Use  Ruby  (on  Rails) Oct  2009Monday, June 4, 2012
  37. 37. Basic  setup  using  sharding lb app app app app app app app app app My My SQL SQL slave slaveMonday, June 4, 2012
  38. 38. 250K  daily  users &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" Life  was  good !" ()*%!" +,-*%!" ./0*%!" +12*%%" ()*%%" +,-*%%" ./0*%%"Monday, June 4, 2012
  39. 39. 250K  daily  users &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" Life  was  good NO  MORE !" ()*%!" +,-*%!" ./0*%!" +12*%%" ()*%%" +,-*%%" ./0*%%"Monday, June 4, 2012
  40. 40. Welcome  to  6  weeks  of  pain!Monday, June 4, 2012
  41. 41. Welcome  to  6  weeks  of  pain! Heavy  opPmizaPons  were  necessaryMonday, June 4, 2012
  42. 42. Welcome  to  6  weeks  of  pain! Heavy  opPmizaPons  were  necessary Numerous  small  fixes  regarding  DB  configMonday, June 4, 2012
  43. 43. Welcome  to  6  weeks  of  pain! Heavy  opPmizaPons  were  necessary Numerous  small  fixes  regarding  DB  config More  shardsMonday, June 4, 2012
  44. 44. Welcome  to  6  weeks  of  pain! Heavy  opPmizaPons  were  necessary Numerous  small  fixes  regarding  DB  config More  shards Even  more  shardsMonday, June 4, 2012
  45. 45. Welcome  to  6  weeks  of  pain! Heavy  opPmizaPons  were  necessary Numerous  small  fixes  regarding  DB  config More  shards Even  more  shards SpliOng  the  model  to  get  more  shardsMonday, June 4, 2012
  46. 46. Early  sharding  hell:  8+8  DBs lb app app app app app app app app app app app app app app app app app app My My My My My My My My SQL SQL SQL SQL SQL SQL SQL SQL slave slave slave slave slave slave slave slaveMonday, June 4, 2012
  47. 47. At  500K  daily  users  we  were  at  a  dead  end &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" ()*%!" +,-*%!" ./0*%!" +12*%%" ()*%%" +,-*%%" ./0*%%"Monday, June 4, 2012
  48. 48. First  game:  Try  to  be  flexible •  Ruby  on  Rails •  Amazon  EC2 •  MySQL ArchMonday, June 4, 2012
  49. 49. First  game:  Try  to  be  flexible •  Ruby  on  Rails •  Amazon  EC2 •  MySQL Arch DevMonday, June 4, 2012
  50. 50. First  game:  Try  to  be  flexible •  Ruby  on  Rails •  Amazon  EC2 •  MySQL Arch Dev OpMonday, June 4, 2012
  51. 51. Pick  the  right  tool  for  the  jobMonday, June 4, 2012
  52. 52. Pick  the  right  tool  for  the  jobMonday, June 4, 2012
  53. 53. EvoluPon  II:  Use  Redis  as  main  DB Jan  2010 Oct  2009Monday, June 4, 2012
  54. 54. First  game:  Redis  to  the  mix •  Ruby  on  Rails •  Amazon  EC2 •  MySQL ArchMonday, June 4, 2012
  55. 55. First  game:  Redis  to  the  mix •  Ruby  on  Rails •  Amazon  EC2 •  MySQL •  Redis ArchMonday, June 4, 2012
  56. 56. Hybrid  approach 256  GB  data 60  GB  data 10%  writes 50%  writes hUp://www.flickr.com/photos/erix/245657047/Monday, June 4, 2012
  57. 57. One  team  saved  the  other  one &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" ()*%!" +,-*%!" ./0*%!" +12*%%" ()*%%" +,-*%%" ./0*%%"Monday, June 4, 2012
  58. 58. One  team  saved  the  other  one &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" ()*%!" +,-*%!" ./0*%!" +12*%%" ()*%%" +,-*%%" ./0*%%"Monday, June 4, 2012
  59. 59. Now  more  than  2M  users  /  day &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" ()*%!" +,-*%!" ./0*%!" +12*%%" ()*%%" +,-*%%" ./0*%%"Monday, June 4, 2012
  60. 60. Now  more  than  2M  users  /  day &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" AWS  outage #!!$!!!" in  Ireland !" ()*%!" +,-*%!" ./0*%!" +12*%%" ()*%%" +,-*%%" ./0*%%"Monday, June 4, 2012
  61. 61. 10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all! lb lb app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app My My My My My redis redis redis redis redis SQL SQL SQL SQL SQL slave slave slave slave slave slave slave slave slave slaveMonday, June 4, 2012
  62. 62. First  game:  Add  Redis  to  the  mix •  Ruby  on  Rails •  Amazon  EC2 •  MySQL •  Redis ArchMonday, June 4, 2012
  63. 63. First  game:  Add  Redis  to  the  mix •  Ruby  on  Rails •  Amazon  EC2 •  MySQL •  Redis Arch DevMonday, June 4, 2012
  64. 64. First  game:  Add  Redis  to  the  mix •  Ruby  on  Rails •  Amazon  EC2 •  MySQL •  Redis Arch Dev OpMonday, June 4, 2012
  65. 65. Architecture  EvoluPon  at  Wooga The  Start:  Ruby The  Next  Step Best  of  Two  Worlds Company  ValuesMonday, June 4, 2012
  66. 66. Stateless  servers  and  DBs Server DatabaseMonday, June 4, 2012
  67. 67. Stateless  servers  and  DBs Server DatabaseMonday, June 4, 2012
  68. 68. Stateless  servers  and  DBs Server DatabaseMonday, June 4, 2012
  69. 69. Stateless  servers  and  DBs Server DatabaseMonday, June 4, 2012
  70. 70. Stateless  servers  and  DBs Server DatabaseMonday, June 4, 2012
  71. 71. Stateless  servers  and  DBs Server DatabaseMonday, June 4, 2012
  72. 72. Find  the  flawMonday, June 4, 2012
  73. 73. Find  the  flaw “Stateless  applicaPon  servers   guarantee  one  thing:Monday, June 4, 2012
  74. 74. Find  the  flaw “Stateless  applicaPon  servers   guarantee  one  thing: The  data  is  never where  you  need  it!” Paolo  Negri,  Developer  @  WoogaMonday, June 4, 2012
  75. 75. Strong  session  pamernMonday, June 4, 2012
  76. 76. Strong  session  pamern User  starts  playingMonday, June 4, 2012
  77. 77. Strong  session  pamern User  starts  playing Many  transformaPons  on   the  same  data  setMonday, June 4, 2012
  78. 78. Strong  session  pamern User  starts  playing Many  transformaPons  on   the  same  data  set User  stops  playingMonday, June 4, 2012
  79. 79. Strong  session  pamern User  starts  playing Many  transformaPons  on   the  same  data  set User  stops  playingMonday, June 4, 2012
  80. 80. Stateful  servers  and  DBs Server DatabaseMonday, June 4, 2012
  81. 81. Stateful  servers  and  DBs Server DatabaseMonday, June 4, 2012
  82. 82. Stateful  servers  and  DBs Server DatabaseMonday, June 4, 2012
  83. 83. Stateful  servers  and  DBs Server Database One  Game  SessionMonday, June 4, 2012
  84. 84. Stateful  servers  and  DBs Server Database One  Game  SessionMonday, June 4, 2012
  85. 85. Next  game:  Don’t  use  a  DB  at  all ArchMonday, June 4, 2012
  86. 86. Next  game:  Don’t  use  a  DB  at  all •  Erlang  OTP ArchMonday, June 4, 2012
  87. 87. Next  game:  Don’t  use  a  DB  at  all •  Erlang  OTP •  Amazon  EC2 ArchMonday, June 4, 2012
  88. 88. Next  game:  Don’t  use  a  DB  at  all •  Erlang  OTP •  Amazon  EC2 •  Amazon  S3 ArchMonday, June 4, 2012
  89. 89. EvoluPon  III:  Erlang  and  stateful  servers Oct  2010 Jan  2010 Oct  2009Monday, June 4, 2012
  90. 90. Stateful  servers  are  not  so  hard sessionMonday, June 4, 2012
  91. 91. Stateful  servers  are  not  so  hard session session session sessionMonday, June 4, 2012
  92. 92. Stateful  servers  are  not  so  hard Server session session session sessionMonday, June 4, 2012
  93. 93. Stateful  servers  are  not  so  hard Server session session session session S3Monday, June 4, 2012
  94. 94. Stateful  servers  are  not  so  hard Server session session session session S3Monday, June 4, 2012
  95. 95. Stateful  servers  are  not  so  hard Server session session session session S3Monday, June 4, 2012
  96. 96. Stateful  servers  are  not  so  hard Server session session session session S3Monday, June 4, 2012
  97. 97. Stateful  servers  are  not  so  hard Server session session session session S3Monday, June 4, 2012
  98. 98. Stateful  servers  are  not  so  hard Server session session session session S3Monday, June 4, 2012
  99. 99. Stateful  servers  are  not  so  hard Server Server Server session session session session session session session session session session session session S3Monday, June 4, 2012
  100. 100. With  stateful  server  the  DB  is  less  used Ruby  Stateless Erlang  Stateful 30,000 22,500 15,000 7,500 0 database  operations  /  secMonday, June 4, 2012
  101. 101. With  stateful  server  the  DB  is  less  used Ruby  Stateless Erlang  Stateful 30,000 22,500 15,000 700 7,500 0 database  operations  /  secMonday, June 4, 2012
  102. 102. Next  game:  Don’t  use  a  DB  at  all •  Erlang  OTP •  Amazon  EC2 •  Amazon  S3 ArchMonday, June 4, 2012
  103. 103. Next  game:  Don’t  use  a  DB  at  all •  Erlang  OTP •  Amazon  EC2 •  Amazon  S3 Arch DevMonday, June 4, 2012
  104. 104. Next  game:  Don’t  use  a  DB  at  all •  Erlang  OTP •  Amazon  EC2 •  Amazon  S3 Arch Dev OpMonday, June 4, 2012
  105. 105. Architecture  EvoluPon  at  Wooga The  Start:  Ruby The  Next  Step:  Erlang Best  of  Two  Worlds Company  ValuesMonday, June 4, 2012
  106. 106. Last  game:  The  ideal  architecture ArchMonday, June 4, 2012
  107. 107. Last  game:  The  ideal  architecture •  Erlang  OTP  (state) ArchMonday, June 4, 2012
  108. 108. Last  game:  The  ideal  architecture •  Erlang  OTP  (state) •  Ruby  (logic) ArchMonday, June 4, 2012
  109. 109. Last  game:  The  ideal  architecture •  Erlang  OTP  (state) •  Ruby  (logic) •  Amazon  EC2 ArchMonday, June 4, 2012
  110. 110. Last  game:  The  ideal  architecture •  Erlang  OTP  (state) •  Ruby  (logic) •  Amazon  EC2 •  Amazon  S3 ArchMonday, June 4, 2012
  111. 111. Last  game:  The  ideal  architecture •  Erlang  OTP  (state) •  Ruby  (logic) •  Amazon  EC2 •  Amazon  S3 Arch Dev OpMonday, June 4, 2012
  112. 112. EvoluPon  IV:  The  best  out  of  two  worlds Aug  2011 Oct  2010 Jan  2010 Oct  2009Monday, June 4, 2012
  113. 113. The  basic  setup  looks  exactly  like  before Server Server Server session session session session session session session session session session session session S3Monday, June 4, 2012
  114. 114. Bringing  2  worlds  together Server session URL  +  state session ... response  +  new  state sessionMonday, June 4, 2012
  115. 115. Bringing  2  worlds  together Server session sender URL  +  state session ... response  +  new  state sessionMonday, June 4, 2012
  116. 116. Bringing  2  worlds  together Server Worker session sender URL  +  state Worker session Worker ... Worker response  +  new  state session WorkerMonday, June 4, 2012
  117. 117. Bringing  2  worlds  together Server Worker session sender URL  +  state Worker session Worker ... Worker receiver response  +  new  state session WorkerMonday, June 4, 2012
  118. 118. Bringing  2  worlds  together Server Worker session sender URL  +  state Worker session Worker ... Worker receiver response  +  new  state session WorkerMonday, June 4, 2012
  119. 119. Bringing  2  worlds  together Server Worker session sender URL  +  state Worker session Worker ... Worker receiver response  +  new  state session WorkerMonday, June 4, 2012
  120. 120. Performance  impact  for  large  payloads 200  kB  payload 6000 5000 4000 requests  /  s 3000 2000 1000 0 1 #  of  workers 8Monday, June 4, 2012
  121. 121. Performance  impact  for  large  payloads 200  kB  payload 6000 5000 4000 requests  /  s Pure 3000 Erlang 2000 1000 Ruby ZMQ 0 1 #  of  workers 8Monday, June 4, 2012
  122. 122. Performance  impact  for  large  payloads 200  kB  payload 6000 5000 4000 requests  /  s Pure 3000 Erlang 2000 1000 Ruby 400  rps ZMQ 0 1 #  of  workers 8Monday, June 4, 2012
  123. 123. NOT  CPU  boundMonday, June 4, 2012
  124. 124. NOT  CPU  bound 25%Monday, June 4, 2012
  125. 125. NOT  CPU  bound 25% Fixed  bandwith  limit  @  300  MB/sMonday, June 4, 2012
  126. 126. Last  game:  The  ideal  architecture? •  Erlang  OTP  (state) •  Ruby  (logic) •  Amazon  EC2 •  Amazon  S3 ArchMonday, June 4, 2012
  127. 127. Last  game:  The  ideal  architecture? •  Erlang  OTP  (state) •  Ruby  (logic) •  Amazon  EC2 •  Amazon  S3 Arch DevMonday, June 4, 2012
  128. 128. Last  game:  The  ideal  architecture? •  Erlang  OTP  (state) •  Ruby  (logic) •  Amazon  EC2 •  Amazon  S3 Arch Dev OpMonday, June 4, 2012
  129. 129. Last  game:  The  ideal  architecture? •  Erlang  OTP  (state) •  Erlang  OTP  (logic)  !!! •  Amazon  EC2 •  Amazon  S3 Arch Dev OpMonday, June 4, 2012
  130. 130. Last  game:  The  ideal  architecture? •  Erlang  OTP  (state) •  Erlang  OTP  (logic)  !!! •  Amazon  EC2 •  Amazon  S3 Arch Dev OpMonday, June 4, 2012
  131. 131. Last  game:  The  ideal  architecture? •  Erlang  OTP  (state) •  Erlang  OTP  (logic)  !!! •  Amazon  EC2 •  Amazon  S3 Arch Dev OpMonday, June 4, 2012
  132. 132. Last  game:  The  ideal  architecture? •  Erlang  OTP  (state) •  Erlang  OTP  (logic)  !!! •  Amazon  EC2 •  Amazon  S3 Arch Dev OpMonday, June 4, 2012
  133. 133. So  nothing  new?Monday, June 4, 2012
  134. 134. So  nothing  new? We  could  not  combine  Ruby  and  Erlang,  too  bad. At  least  not  for  this  game.Monday, June 4, 2012
  135. 135. So  nothing  new? We  could  not  combine  Ruby  and  Erlang,  too  bad. At  least  not  for  this  game. Erlang  is  great  for  inter  process  messaging... User  sessions  are  represented  by  Erlang  processes.Monday, June 4, 2012
  136. 136. So  nothing  new? We  could  not  combine  Ruby  and  Erlang,  too  bad. At  least  not  for  this  game. Erlang  is  great  for  inter  process  messaging... User  sessions  are  represented  by  Erlang  processes. ...  and  Server  Side  Events  just  work. The  server  can  push  updates  to  the  client.Monday, June 4, 2012
  137. 137. So  nothing  new? We  could  not  combine  Ruby  and  Erlang,  too  bad. At  least  not  for  this  game. Erlang  is  great  for  inter  process  messaging... User  sessions  are  represented  by  Erlang  processes. ...  and  Server  Side  Events  just  work. The  server  can  push  updates  to  the  client. Now,  what  could  you  do  with  this?Monday, June 4, 2012
  138. 138. The  next  step  in  social  gamingMonday, June 4, 2012
  139. 139. The  next  step  in  social  gamingMonday, June 4, 2012
  140. 140. The  next  step  in  social  gamingMonday, June 4, 2012
  141. 141. The  next  step  in  social  gamingMonday, June 4, 2012
  142. 142. The  next  step  in  social  gamingMonday, June 4, 2012
  143. 143. The  next  step  in  social  gamingMonday, June 4, 2012
  144. 144. The  next  step  in  social  gamingMonday, June 4, 2012
  145. 145. Architecture  EvoluPon  at  Wooga The  Start:  Ruby The  Next  Step:  Erlang Best  of  Two  Worlds? Company  ValuesMonday, June 4, 2012
  146. 146. Each  new  game  brought  us  innovaPon Aug  2011 Oct  2010 Jan  2010 Oct  2009Monday, June 4, 2012
  147. 147. We’ve  learned  to  value Small teams over big teamsMonday, June 4, 2012
  148. 148. We’ve  learned  to  value Collaboration over competitionMonday, June 4, 2012
  149. 149. We’ve  learned  to  value Generalists over specialistsMonday, June 4, 2012
  150. 150. We’ve  learned  to  value Effort reduction over cost reductionMonday, June 4, 2012
  151. 151. We’ve  learned  to  value Innovation over risk mitigationMonday, June 4, 2012
  152. 152. A  good  value  system We’ve  learned  to  value Small  teams                              over   Big  teams   CollaboraPon                        over Compe??on Generalists                                over Specialists Effort  reducPon                over Cost  reduc?on InnovaPon                                  over Risk  mi?ga?onMonday, June 4, 2012
  153. 153. It works!Monday, June 4, 2012
  154. 154. It works! Be fast, be bold!Monday, June 4, 2012
  155. 155. QuesPons? Jesper  Richter-­‐Reichhelm @jrirei slideshare.net/wooga wooga.com/jobsMonday, June 4, 2012
  156. 156. Monday, June 4, 2012

×