Domanda

I am building a very simple game with Ruby on Rails. Two players are supposed to play a very simple game against each other (you can imagine a simple game like Tic-Tac-Toe). But it is expected that thousands of tic-tac-toe instances are being played at the same time. I want to know what is the simplest and fastet Ruby Gem that satisfies my needs. I have read about rubygame or gosu but they seem to be more complicated than what I need. I appreciate any advice. Note that I want to store all user moves and results of all games in my database.

Thanks!

È stato utile?

Soluzione

I found out a way to do this. Since rails is not designed for asynchronous requests, I use a second Node.js server that talks to rails over Redis. Node.js takes care of pushing messages to clients and the rails server. Rails is not designed for such application but I could make it work. I will comment on scalability once I'm done testing it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top