I am building a simple turn-based game in node.js using sockets.io. My web experience with node.js has typically involved saving everything to a relational database. I set this up for my game. I am using sqlite3 for development and I might use something like PostgreSQL or MySQL for production. I will be doing this for account information regardless of what I set up for handling the actual game.
My concern is that, every time an event is emitted from the socket the whole game-state is loaded into memory from the server. I feel that in practice this will be less efficient than just keeping all of the gamestate data in memory. Events will probably be emitted every 5 seconds or so. A gamestate consists of a set of about 120 groups of small strings and integers (about 10 per group but subject to change).
Is it good practice to keep this type of data in memory?
Should I stick with relational databases?
Should I switch to a third option like a file-based storage structure?
Should I not load the whole gamestate in for every event even though that will lead to a lot more read/writes (at least triple)?
Edit* Clarification: Even though the game is turn based I want the player to be able to see what the opponent is doing on their turn in real time and give the player real time feedback about illegal actions.