We currently run a python2 software that works as a threaded TCP/UDP game server. This server has two purposes: display the game servers list and unlock the game.
The current application works, but we experience issues from time to time regarding, for example, "many open files" and some ocasional crashes that result in necessity of a complete restart of the application. This application also communicates with a database from our website to check username, password and some other stuffs that are handled by the python.
Also, our current application is the result of years of many changes, knownledge added, tests, different programmers and that kind of stuffs, resulting in a "messed not-optimal code".
So, today we want to completelly rewrite our application to fix all problems we are facing. There are some mandatory points we would like to have included:
- Code rewrite must keep compatibility to version 2.7.14 or be updated to python3;
- Code must be commented on key points. Today we have some steps commented in the app code that we want to keep;
- Only core functions must be kept. All code for "user interaction" such as console commands should be removed;
- Easy DB config. Our current code has a lot of points to be configured in case of DB changes, and we would like to have something more 'simple';
- Optimized code. Currently our code has a lot of lines doing the same thing. So the code should be optimized to call functions, for example;
- Be functional. It's obvious, but the rewritten code must work in the same way for our purpose.
About the application, one of the critical things where we experience some problems is regarding the connected servers. Basically our application returns specific packets according to the user's packet. But for the game servers, our application keeps the connection opened sending alive packets from time to time. Also, the servers data are appended to a list (that will be displayed to the users). This list must be update as soon a new game server connects or if an alive packet is not detected.
Our problem today is how the 'broken connections' are detected. It works, but in a poor way. So, the person responsible for the project must know something about TCP/UDP connections to fix this thing.
Finally, we can provide any information necessary.