Jawaker has been written with scalability in mind, all along the way.
One of the decisions we took in this aspect was to use memcached to cache information about the games currently being played. Memcached is a general purpose distributed memory object caching system, think of it as a large hash table (a dictionary for Pythoners out there; a table of key-value pairs) loaded right into your memory (basically, the RAM), with the ability to spread over several machines if needed.
The idea is that accessing the memory is much faster than accessing the database, by caching data that is accessed often (such as data about games being played), we save valuable database read time. Database access becomes an issue as the number of queries increase, our solution reduces the number of queries needed, and can scale across multiple machines too!
This is in particular important since Jawaker is AJAX-based, and querying the server for updates happens often.
No comments:
Post a Comment