Answer the question
In order to leave comments, you need to log in
Should I store temporary data directly in Node.js?
I want to implement the game "Battleship" in the browser, and I will need to store temporary information about the battles on the server.
Should I store it in Redis, which stores the data in memory, or should I store the information directly in the program, for example using Object
? Or it won't make a difference. I just think that when stored in Redis, it will take extra time to create a request to it, which can be avoided when stored directly in the program.
Answer the question
In order to leave comments, you need to log in
First, this solution is not scalable. Secondly, restarting/crashing the application will result in the loss of this data. In other cases it is possible.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question