uGameDB Overview

Key-value stores are getting increasingly popular as they offer the most scalable database solutions available. These key-value stores are sometimes called NoSQL databases and uGameDB is one of them. uGameDB has a client for the Unity game engine and an API built on top of the Riak database back-end.

Scalability and ease of use are central to game developers and Riak provides the scalability to extreme levels while the uGameDB API provides the ease of use. MuchDifferent's choice of developing on top of Riak as the uGameDB back-end was made after a thorough evaluation of many similar products. We found the Riak team to have the best combination of passion and industry background and since Riak is based on Erlang, we felt very comfortable with assessing and working with the code since we have used the same platform for many of our own scalable, concurrent and reliable server products. As a game developer however, you do not need to know Erlang or go into depth of how Riak works to use uGameDB to its full potential. The uGameDB client does all this dirty-work for you.

The uGameDB design uses the coroutine functionality of Unity to allow complex database interactions to be written in a fluent manner. By communicating with Riak from a coroutine you can easily write request in sequence or in parallel, wait for the response of one request before sending the next, and manipulate the request as it is in transit, all within the scope of one coroutine method. You can even combine or replace the coroutine pattern with conventional callbacks.

Like any distributed database, Riak and uGameDB deal with transactions and consistency in a different way than traditional SQL databases do. Because of this, you need to program your database reads and writes in a way that handle situations where the data is not perfectly consistent. Doing this right allows great scalability. There are several practices that help you handle these situations and we will help you with writing well-designed code and to design good data models. Please be aware that the uGameDB API will never add transaction locks or enforce consistent data models to Riak.

For more introduction information, please check out the Basho website to learn more about the scalability and power of Riak. There you will find great introduction videos and tons of worthwhile documentation.