just a performance/security idea
i looked at a few sources, and i noticed that a lot of private servers just query the database directly for all their resources, at the expense of query overhead and data vulnerabilities in their servers.
but since the game is written to redundantly access high-activity nodes of data for quick-saving characters and ensuring fast load-ins, why not have a structure in the source built to store account/character data as a "data synchronization buffer"?
the buffer could be stored in a separate process from server.exe and wServer.exe to prevent sudden data loss due to possible failure of either system, and it could periodically flush its data to the database or retrieve data for players that aren't stored in the sync buffer.
without a data sync buffer, the server will do this:
1.) client enters portal
2.) server saves client data to memory
3.) server queries database to save data, near-instant travel time as the database is on the same host as the server
4.) database runs a search query to find the player rows, causing the database to scan the entire table for one singular operation
5.) database updates data
6.) client reconnects to new world
7.) server queries database to find data
8.) database runs another search to find the player row
9.) database returns data to server
10.) server enters client in
with a data sync buffer, the load can significantly decrease for the same situation
1.) client enters portal
2.) server saves client data to memory
3.) server updates referenced buffer data (buffer data can contain a pointer to a client processor which will nullify a scan procedure)
4.) client reconnects to new world
5.) server retrieves referenced buffer data (near instant travel time because same host)
6.) server enters client in
the buffer can be better because it works with less data than the whole database because it only contains data of users that are logged in and active!
most pservers work with 10 to 150 players so imagine the performance benefit when you only have to run quick data queries on an organized accessible buffer of 10-150 players! most databases by that point will be reaching hundreds to thousands, and being able to query a small kernel of data for server needs can really improve scalability!
please leave your thoughts!
but since the game is written to redundantly access high-activity nodes of data for quick-saving characters and ensuring fast load-ins, why not have a structure in the source built to store account/character data as a "data synchronization buffer"?
the buffer could be stored in a separate process from server.exe and wServer.exe to prevent sudden data loss due to possible failure of either system, and it could periodically flush its data to the database or retrieve data for players that aren't stored in the sync buffer.
without a data sync buffer, the server will do this:
1.) client enters portal
2.) server saves client data to memory
3.) server queries database to save data, near-instant travel time as the database is on the same host as the server
4.) database runs a search query to find the player rows, causing the database to scan the entire table for one singular operation
5.) database updates data
6.) client reconnects to new world
7.) server queries database to find data
8.) database runs another search to find the player row
9.) database returns data to server
10.) server enters client in
with a data sync buffer, the load can significantly decrease for the same situation
1.) client enters portal
2.) server saves client data to memory
3.) server updates referenced buffer data (buffer data can contain a pointer to a client processor which will nullify a scan procedure)
4.) client reconnects to new world
5.) server retrieves referenced buffer data (near instant travel time because same host)
6.) server enters client in
the buffer can be better because it works with less data than the whole database because it only contains data of users that are logged in and active!
most pservers work with 10 to 150 players so imagine the performance benefit when you only have to run quick data queries on an organized accessible buffer of 10-150 players! most databases by that point will be reaching hundreds to thousands, and being able to query a small kernel of data for server needs can really improve scalability!
please leave your thoughts!


