Riak provides low-latency, highly available storage to power gaming platforms and applications. Benefits of Riak for gaming platforms include:
Rapid Growth: Riak yields a near-linear performance and throughput increase as capacity is added and is built for operational ease of use.Flexible Storage: Riak is content-agnostic, providing flexibility for document, image, video, and other storage.Low-Latency Design: Riak is designed to store data and serve requests predictably and quickly, even during peak times.Global Data Locality: Riak Enterprise’s multi-datacenter replication provides disaster recovery and data locality.
Download the Gaming Whitepaper
USE CASES
Here are some common ways gaming platforms use Riak:
CASE STUDIES

Kiip is a platform for building rewards and achievements into your games. Kiip replaced MongoDB with Riak in order to achieve low read/write latencies and horizontal scalability. Kiip uses Riak for storing and serving session and device data. Read their blog on moving from MongoDB to Riak or this video on scaling Riak to 25MM Ops/Day.

Mochi Media is a flash-based gaming platform that serves developers, advertisers, and publishers. Mochi uses Riak for its social graph data for Mochi Social and MochiGames. Mochi has also created statebox, a data structure that can be used with Riak to resolve conflicts that can occur in distributed systems. Read this piece from the Mochi Media Dev Blog, An Eventually Consistent Data Model for Erlang.

Hibernum is a creator and developer of unique gaming experiences that combine the latest in social gaming, top quality visuals and animations, and cutting edge design. They switched from a relational database to Riak due to the high availability, ability to scale to peak loads, and predictable operational cost. Riak is used to store user game information for one of their most popular social games. Check out the complete case study, Hibernum Selects Riak for User Data Storage.
DATA MODELING IN RIAK
Riak has a “schemaless” design. Objects are comprised of key/value pairs, which are stored in flat namespaces called buckets. Here are some common approaches to structuring gaming data with Riak’s key/value design:
| Data Type | Key | Value |
|---|---|---|
| Player Data | Login, Email, UUID | Player Attributes (often stored as a JSON document); Player Rewards and Stats |
| Social Data | Login, Email, UUID | Player Profiles, Social Graph Information, Facebook/Twitter Tokens |
| Session Information | User/Session ID | Session Data |
| Image or Video Content | Content Name, ID or Integer | .JPG .PNG, .GIF or other image format; .MOV, .MPG, .MP4 or other video file format |
On top of the fundamental key/value model, Riak also offers robust querying, including:
Riak Search: A distributed, full-text search engine. It provides support for various MIME types & analyzers, and robust querying including exact matches, wildcards, range queries, proximity searches, and more.Secondary Indexing: Secondary Indexing (2i) gives developers the ability, at write time, to tag an object stored in Riak with one or more queryable values.MapReduce: Developers can leverage MapReduce for analytic and aggregation tasks. It offers support for both JavaScript and Erlang MapReduce.
More Resources
You can learn more about Riak, Riak Enterprise, and Riak CS in our documentation and at Basho.com.

