Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Riak: Distributed Storage for Games You Don't Have to Worry About

Riak: Distributed Storage for Games You Don't Have to Worry About

Presented at Gamelab 2013 in Barcelona

Tom Santero

June 27, 2013
Tweet

More Decks by Tom Santero

Other Decks in Technology

Transcript

  1. Distributed storage for games
    you don’t have to worry about
    Press Start
    (c) 2013 Basho Technologies
    All rights reserved.
    Riak

    View full-size slide

  2. Player Select
    Tom Santero
    tsantero
    on github
    on twitter
    @basho.com
    {

    View full-size slide

  3. Basho Technologies
    we make riak...

    View full-size slide

  4. I <3 video games

    View full-size slide

  5. video games have changed

    View full-size slide

  6. When I was a kid...

    View full-size slide

  7. Kids Today...

    View full-size slide

  8. Evolution of games largely characterized by
    rapid development of processing technology

    View full-size slide

  9. What happened?

    View full-size slide

  10. Online / multiplayer
    gaming experiences

    View full-size slide

  11. meanwhile...

    View full-size slide

  12. masterless, distributed
    key/value datastore

    View full-size slide

  13. deployed as a
    cluster
    of nodes

    View full-size slide

  14. map/reduce engine
    Full-text search
    secondary indexes

    View full-size slide

  15. Global Availability

    View full-size slide

  16. Used by...
    and more...

    View full-size slide

  17. Users vote for
    your games with:
    their time
    their money
    Downloads
    recommendations

    View full-size slide

  18. Fault Tolerance

    View full-size slide

  19. High Write Throughput

    View full-size slide

  20. Cost of operations
    predictable latency
    easy to scale
    small teams

    View full-size slide

  21. SHIP IT!
    Did you test the code?

    View full-size slide

  22. Did you test the Infrastructure?

    View full-size slide

  23. Thousands  of  players  across  the  world  are  playing  and  
    having  a  good  experience  –  in  fact,  more  than  700,000  
    cities  have  been  built  by  our  players  in  just  24  hours.  
    But  many  are  experiencing  server  instability  and  
    consequently,  the  rollout  in  North  America  has  been  
    challenging.  It's  also  now  evident  that  players  across  
    Europe  and  Asia  are  experiencing  the  same  frustration.  
    Our  priority  now  is  to  quickly  and  dramatically  increase  
    the  number  and  stability  of  our  servers  and,  with  that,  
    the  number  of  players  who  can  simultaneously  access  the  
    game.  We  added  servers  today,  and  there  will  be  several  
    more  added  over  the  weekend.  We're  working  as  hard  as  
    possible  to  make  sure  everyone  gets  to  experience  the  
    amazing  game  we  built  in  SimCity.

    View full-size slide

  24. NOT
    Acceptable

    View full-size slide

  25. Build a cross-platform
    gaming experience
    with Riak

    View full-size slide

  26. Authentication
    and profiles
    key value
    oauth JSON/XML/enc
    uuid JSON/XML/enc
    email JSON/XML/enc
    } device_id
    last_session
    other_pointers

    View full-size slide

  27. Authentication
    and profiles
    key value
    oauth JSON/XML/enc
    uuid JSON/XML/enc
    email JSON/XML/enc
    } device_id
    last_session
    other_pointers
    Cross Platform!

    View full-size slide

  28. Session and
    game state
    key value
    user riak
    sessionid JSON/XML/enc
    uuid JSON/XML/enc
    PUT sessions/sessionID
    GET sessions/sessionID

    View full-size slide

  29. Session and
    game state
    key value
    user riak
    connection
    sessionid JSON/XML/enc
    uuid JSON/XML/enc
    session created
    PUT sessions/sessionID
    GET sessions/sessionID

    View full-size slide

  30. Session and
    game state
    key value
    user riak
    connection
    save progress
    sessionid JSON/XML/enc
    uuid JSON/XML/enc
    session created
    PUT sessions/sessionID
    GET sessions/sessionID

    View full-size slide

  31. Session and
    game state
    key value
    user riak
    connection
    save progress
    sessionid JSON/XML/enc
    uuid JSON/XML/enc
    X
    terminate conn
    session created
    PUT sessions/sessionID
    GET sessions/sessionID

    View full-size slide

  32. Session and
    game state
    key value
    user riak
    connection
    save progress
    sessionid JSON/XML/enc
    uuid JSON/XML/enc
    X
    terminate conn
    reconnect
    session created
    session created
    ...
    PUT sessions/sessionID
    GET sessions/sessionID

    View full-size slide

  33. user created
    content
    avatars
    images
    etc...

    View full-size slide

  34. In-Game purchases
    game inventory
    P
    a
    y
    m
    e
    n
    t
    transaction log
    player’s inventory
    game

    View full-size slide

  35. Social Graphs
    Player 1 is friends with Player 2
    Player 3
    Player 2 is friends with Player 3
    player 4
    player 6
    via secondary index
    CRDT

    View full-size slide

  36. Notification Systems
    event based messages
    grab via 2i or m/r
    asynchronous delivery
    via:
    urbanairship
    kafka / Rabbitmq
    apple/android servers

    View full-size slide

  37. Support rapid growth

    View full-size slide

  38. in-game statistics
    A/B testing
    in-game messaging

    View full-size slide

  39. Level 1
    complete

    View full-size slide

  40. To proceed to
    Level 2
    come visit our booth

    View full-size slide

  41. Questions?
    tsantero
    on github
    on twitter
    @basho.com
    {

    View full-size slide