otland/forgottenserver — pull request #835 by kilouco (2014-05-26 05:53:13+00:00)
Title: WIP - Asynchronous SQL queries

Features:

[x] Implemented;
[ ] To be implemented;

[x] Async SQL Query Dispatcher;
[x] Login and player loading systems fully asynchronous;
[x] Every query related to houses made asynchronous;
[x] Asynchronous bans loading;
[ ] Asynchronous bans saving;
[ ] Asynchronous player saving;
[x] Asynchronous guilds loading;
[ ] Asynchronous guilds saving;
[ ] Other sparse queries in the game;
[ ] Proper error handling for database connection exceptions.

Tests that still have not been made with features already implemented:

Banishment;
Players Queue to connect to the game;
Adding, removing guilds from houses, including non-existing ones and everything else related to guilds.

-------------------------------------------------------------
Known issues

It is known that lots of loading queries (SELECT) are called mid-game when they could be done in the server loading. Doing so would avoid potential problems such as players using beds with other players sleeping in them when the database is not responding for a few seconds (I honestly don't know how often that may happen, though).

We should also discuss when to allow SQL queries timeouts. Sure we can't do that for Updates, Inserts and Deletes.

That's it for now.
Best regards,