Web and Mobile Gaming Hit the Cloud with Cloudant

By on

by Paul Williams

With video gamers slated to spend over 100 billion dollars on their hobby by 2015 according to Gartner, there is little doubt of the relevance of gaming in business.  Mobile gaming is an important driver to the entire video game industry, with social networking also playing a role in the gaming market’s overall growth.

Additionally, social networking is also a major force driving the burgeoning growth of Big Data and its related technologies, NoSQL and Cloud Computing. Sure, Facebook users spend a lot of time uploading photos of friends, family and pets, but social gaming makes up a significant portion of some users’ online presence. So much so, that social game developers deal with many of the same data scale and velocity issues hampering regular business enterprises.

These social gamers want access to their FarmVille crops or Mafia Wars crew no matter if they are using a smartphone or a desktop. Seamless access to games, and their data, from both the Web and mobile platforms is a must-have requirement for any social game company.

Enter Cloudant. The company, formed in 2008 by three MIT physicists, has built a distributed and fault-tolerant data layer that scales globally. Leveraging the Apache CouchDB document database, the Cloudant data layer is managed as a cloud-based service distributed across a global network of data centers. This allows the delivery of data with minimal latency practically anywhere, perfect for both enterprises and social game companies.

Hothead Games Leverages the Cloudant Data Layer

Hothead Games is known for their massively multiplayer online games on the iOS and Android platforms. Many of their games, like Big Win Soccer and Big Win Hockey, follow a trading card model where players compete against others worldwide in building the best team. Obviously, a robust data layer on the backend allows the gameplay to occur with nary a hiccup whether the gamer is in Austin or Ankara.

Cloudant is the data layer provider of choice for Hothead, with millions of game-state data records already being stored and distributed. The company is currently expanding its use of Cloudant timed with the rollout of Big Win Baseball. They are moving to a globally networked 60 server database cluster in a gradual increase in scale from its original six server cluster. Offloading the management of its database responsibilities allows a small independent game development shop like Hothead to focus directly on their games.

“Our code makes hundreds of millions of database transactions a day. It’s critical to our business that every single one of those works reliably and is super fast,” said Joel DeYoung, Director of Technology at Hothead Games. “Leaving the database administration and performance tuning details in Cloudant’s hands has freed up our team to focus on what matters most: making a great experience for our users. A good data layer is one that you barely notice is there, and working with the Big Data experts at Cloudant has made that a reality for all our Big Win Sports titles.”

“Anyone serious about producing a big-time mobile game has to be deeply invested in the business of large-scale Data Management if they plan to grow their app worldwide,” said Cloudant CEO Derek Schoettle. “Big Win Sports has been a huge success for Hothead Games, and being able to handle their impressive growth of game data is a compelling example of the power of Cloudant.”

Another social game company using the Cloudant Data Layer is OMGPOP which is best described as a division of Zynga marketed towards kids. Most of their games are web-based and powered by Adobe Flash, although some are available in mobile versions. Fast scalability is vital considering the potential for viral success. OMGPOP’s CTO, Jason Pearlman chimes in, “I love the Cloudant data layer as a service concept. When huge scalability matters, it’s a great relief to offload all data store operations and monitoring onto Cloudant so you are free to focus on new development. Cloudant is the winner when huge scalability matters.”

The Cloudant Data Layer in Depth

As mentioned earlier, Cloudant is built upon the Apache CouchDB database, which is optimized for storage and retrieval of flat, NoSQL collections of semi-structured data. Data residing in documents marked up as JSON is a perfect example what gets stored in Cloudant. Each saved document in the database gets assigned one unique identifier, with no limit to the number of fields in the document, or the document’s overall size.

Since a Cloudant database is schema-less, new document types can be added on the fly, and new fields can be added to existing documents without the data migration hassles typical of SQL databases. A RESTful web services API is used for Cloudant document retrieval. MapReduce functions are baked into the database indexing, ensuring speedy access and enhanced scalability.

Distribution with Cloudant is handled by a collection of easily scalable clusters hosted at top rank data centers all over the world. Data duplication occurs automatically through the layer, which pushes the information closer to the hosted application’s user base, improving overall latency.

Each Cloudant database gets partitioned across a cluster of servers called Nodes. The number of partitions and their location are defined in mapping stored with the logical database. Partition replicas are also part of the logical database mapping.

Cloudant seamlessly handles load balancing, clustering, backups, and query execution, all while providing high availability. Scaling occurs automatically as the database and user load (hopefully) grow.

Distributed CRUD

Database transactions in Cloudant’s distributed environment use a hashing algorithm to best determine the location of a document. MapReduce functions and queries get executed across the nodes in the database with the results returned to be merged into a single logical view.

Special care is taken to isolate each database within a multi-tenant cluster, ensuring that one client’s database activity has no impact on other clients in that same cluster. Private tenant clusters are also available for clients desiring an extra measure of security.

Cloudant’s horizontal clustering framework leverages the Erlang language which is well-suited for massively parallel applications. The framework handles cluster membership, routing and coordination of database activity, distributed query coordination, and remote procedure calls improving node resiliency and performance.

The database also features an IO queue to handle prioritization on multi-tenant clusters. With billions of daily database interactions, the IOQ helps to ensure low-latency requests get higher priority. For private tenant clusters, the customer gets full control of the IOQ to help manage their own database priorities.

Chainable MapReduce

A key feature of Cloudant is its ability to chain MapReduce functions. This allows the result of one function to be fed into another which greatly enhances the speed of analytics and reporting. The software also distributes the functions to all the nodes in a cluster, which improves overall IO.

Cloudant provides a robust set of visualization tools to help monitor performance. The company handles the interpretation of this data for multi-tenant cluster customers, providing experts in database scaling and tuning. They also work with private-tenant cluster customers, making recommendations for the best optimization strategy.

Getting started with Cloudant is simple for clients with a measure of CouchDB knowledge. A basic Cloudant Data Layer account is free, and the provided dashboards make it easy to create databases and add JSON documents. Cloudant also provides a URL to access the data layer through their RESTful API.

Social gaming companies as well as any business with high velocity data requirements benefit from being able to focus on the core of their business. A robust, well-managed data layer helps to make that possible. Those kinds of companies need to check out Cloudant to see if meets their needs for a NoSQL database.

Leave a Reply