I am in the process of trying to create a mud. From what I found mySql uses hash tables, which makes it very, very fast, however the fact that it has to write to the database every time it writes to it, will make it very very slow (if it\'s doing it oh say a few hundred times a second). So I thought of doing something totally different.
I would have to different sql installations. one that only exists in memory, the other which exists on HD. When the server boots up, everything which is used very actively in the world (people, monsters, ect..) will be loaded into the sql database which resides in memory only. When I go to shut down the server, it copies the tables to the database which resides on the HD.
I know that I could tweak the HD so that is uses as much memory as I need, however it will still write to the HD as it keeps it in memory. All I want is to have it stay in memory.
I suppose it would be ok if when I initially create the tables, they are on the HD, but after that, when I add items, they need to stay in memory.
If my computer were to crash or whatnot, I would lose everything in that mysql server, but that would be ok.
Any thoughts on this? I don\'t program in c/c++ though, and I would have a hard time taking out the writing to HD code, so if someone can do that and send me the recompiled executable, that would be great.
I imagine it would only be a line or two of code?
Thanks