Tech+4+Database

Databases

While researching databases in MMO's and in particular how databases are usedby the clients during play we found that the World of Warcraft method of players updating the database was to do a periodic RAM dumps to disk. This is simple to implement but has serious issues. Firstly, while the dump is happening players on the server simply cannot interact with the virtual world. Secondly, if the server crashes all data that wasn't dumped is irrevocably lost.

__Model for database access__

Database <> Application <> Client

A possible solution to databasing problems is the following. When the player logs in, the client accesses information through the game server app (which talks to the database) for that user and the client recieves all information on the player. When the player is in space the client will begin requesting information on all players in the given play area, a system in this case. When new players enter the system they are added to the load queue. If 20 people jump into system, you begin hitting the database (through the game server) to get data on all incoming players in order of arrival. A player then begins to move to your area of influnce (where you can directly see and affect other players) that player is then 'leapfrogged' to the top of the list to be loaded first. This should minimize load lag and allow for most players to be loaded before entering a combat situation. It would also h opefully remove the 'stuttering' that can occur when players warp near you as seen in EVE-Online.

The database would be saved to regularly and under certain situations. It would be saved to when the player disconnects (intentionally or otherwise), every hour after initial log in and at area transitions. There will also be a mandatory downtime, but it's timetable is unknown yet.

For a project of this size we require several databases. One for Login, one for items, one for ships, one for npcs and finally a smaller one for missions / quests.

When you try to log in, the login server is getting essential information from the database. It is checked if your account data is correct, but also other important information is saved here. Is the character a member of an alliance? How is the characters current standings? Is the character on a trial or full account. All these question can be answered by the login database. As sensitive data is saved in the database, the server only allows very specific questions to get through to the database. This is not only important for the safety of the game, and for peoples accounts but also improves the speed of requests to the database enormously.

There is one core per location and as the player moves through the game world they change over server blades but make it in a seamless way ( no loading times). While in game the server fulfill several different tasks, e.g. they notify your client when you are attacked by a ship or another player, they calculate how much damage you deal depending on your ship, equipment, and distance or check if a monster is near your character. Game servers also send data to the client regularly to check if the player is still online. If they do not get a reaction, the character will be logged out of the game after some time.

The item database works in partnership with the npc database, as when an enemy ship spawns in space, the server checks the item database for an item that is commonly found on that specific ship. Occasionally it will put a slightly rarer item as a "suprise" for players. The way it does that is when it goes into the database it checks against two random numbers and then goes down the table assigned to that size / type of ship, finds out what number is programmed to it and spawns that item in the ships "loot". As you progress to fighting larger enemies, the server moves along to another database table assigned to that ship and so on and so forth.

The mission / quest database is two large tables for all missions in game, when the player completes a mission the database the server checks the position of the mission on that database then checks the other table at the same position which gives the reward for that specific mission.



