York
05-25-2010, 08:39 AM
I recently encountered the notion of not storing any game-data in memory and instead using a completely disk-based system. I mean wouldn't this ensure, in the event of some catastrophe, that all player data is secure?
Yes and no. What about the *integrity* of the data. How do you detected if a DB is uncorrupted after a crash? What would happen if the server or game crashed while in the middle of a write operation? You could store multiple copies, caches that are then merged with the regular database at a later date but this sort of defeats the purpose.
It's easier to just do regular backups and only access the disk when needed. Disk-based access is slow. Even with fast hardware disk-access will be slower compared to volatile memory.
That and many systems today use portions of the HD as a simulated form of RAM, so in the event of a crash, you could potentially recover some of the lost data.
Yes and no. What about the *integrity* of the data. How do you detected if a DB is uncorrupted after a crash? What would happen if the server or game crashed while in the middle of a write operation? You could store multiple copies, caches that are then merged with the regular database at a later date but this sort of defeats the purpose.
It's easier to just do regular backups and only access the disk when needed. Disk-based access is slow. Even with fast hardware disk-access will be slower compared to volatile memory.
That and many systems today use portions of the HD as a simulated form of RAM, so in the event of a crash, you could potentially recover some of the lost data.
