title: Recommended storage platform/engine for a Ruby server
body: <p>All,</p>
  
  <p>Working on a custom TCP/IP server for a text-based multiplayer game, using Ruby. Need to find a system for persisting my Ruby objects and am curious for some recommendations.</p>
  
  <p>The server will manage no more than 1GB of data, and since that's a quite manageable number, I'd love to find a persistence system that allows me to keep everything in memory, and only write it out to disk  when I say so (called a "save event" - these are already happening for other unrelated reasons, so I can hook onto these).</p>
  
  <p>Ideally, something with a strong, ActiveRecord-like Ruby interface would be great, with querying/searching, etc.</p>
  
  <p>Some things I have considered.</p>
  
  <ul>
  <li>MySQL using MEMORY tables (advantages: very familiar with working with it an ActiveRecord, disadvantages: not all of our data is easily represented by relational systems, and I would have to write my own system to save out the tables and re-build them on restart, unless this already exists?)</li>
  <li>MongoDB (advantages: would love to get to know it better, and I think our data is well-suited for a document-based system, disadvantages: not familiar with how it makes use of memory vs disk for storage of data or how I would trigger a 'persist everything' event)</li>
  <li>Redis (advantages: seems to have the in-memory model I'm looking for, disadvantages: not familiar with it at all or any of its Ruby interfaces, and not sure how we will be able to translate our data to pure key-values)</li>
  </ul>
  
  <p>I'm guessing there is an elegant solution; MongoDB might well be it, if it heavily utilizes memory in the way I'm describing.</p>