Quote:
Originally Posted by Y u k i
Well... im a friend of the "lets put everything into ram" philosophy
Items arent big data, so you could always store evereything in memory and save time on access / IO locks.
Ram is cheap, efficient programming means using the ressources you have available. If you need to keep the ressource usage down, go with ace´s way. His way sounds very good to me but its harder to implement
Good luck!
|
So you would load every item upon server start?
Not saying its a bad way just curious.
And it isn't really hard to implement.
Upon player login, just fill a dictionary with all that players items from the database. Then you just need to save it back whenever there are changes.
This way also ensures there is minimal data loss in the event of a crash.
If the server crashes or power fails and all that data in the RAM isn't saved, then its gone.