I used to do projects are stored in the default session to the file, and the new company user data is stored in memory, please friends, what is the difference between these two? What are the pros and cons of each approach?
Reply content:
I used to do projects are stored in the default session to the file, and the new company user data is stored in memory, please friends, what is the difference between these two? What are the pros and cons of each approach?
Personally, two points are different, the 1th is security. Save to the file, there may be other programs or Trojan to obtain, people feel that there is a risk. Saved to memory, when the computer shuts down or stops the program, the memory data disappears and the latter is more secure. The 2nd is performance, no matter what language, IO operation time must be greater than the time of the operation of memory, that is, the same order of magnitude operation, IO performance than memory operation performance is lower. Because the landlord is stored in a file, that is, IO operation. So the individual feels the memory will be better.
can be saved in relational or non-relational database, not only solves the memory session is easy to lose, but also enables multiple hosts and processes to share the session