Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6749323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:40:37+00:00 2026-05-26T12:40:37+00:00

All, Working on a custom TCP/IP server for a text-based multiplayer game, using Ruby.

  • 0

All,

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.

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).

Ideally, something with a strong, ActiveRecord-like Ruby interface would be great, with querying/searching, etc.

Some things I have considered.

  • 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?)
  • 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)
  • 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)

I’m guessing there is an elegant solution; MongoDB might well be it, if it heavily utilizes memory in the way I’m describing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:40:37+00:00Added an answer on May 26, 2026 at 12:40 pm

    MongoDB uses a memory mapped storage engine and flushes to disk every 60sec by default. You can configure this interval and you can flush any pending writes to disk using the fsync command.

    http://www.mongodb.org/display/DOCS/fsync+Command

    Using MongoDB with the Mongoid gem might be a good option. Mongoid uses ActiveModel so works very similar to ActiveRecord.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the new wordpress custom post types and fields. It's all working great,
My wordpress*(a custom template)* nav is all working on all of the pages but
I'm building a live chat using JSJaC and ejabberd . It's all working except
I built an Android application that requires OAuth. All was working well using a
I have a custom post_type created in wordpress admin control panel. all is working
I'm trying to create a custom download app. Its all working except for the
They were all working fine on my XAMMP sandbox but now nothing. Something im
We have three developers and one tester all working against the same database. We
I'm working through the NerdDinner ASP.NET MVC 1.0 example. I have it all working
I have 2 div boxes. It's all working fine but when the browser is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.