I know that the vast majority of the games here doesn't use Mysql to save or load his data but on my game i'm using Tom/Nadrew library and sometimes even with simple querys and connections, the server freezes awaiting for the response, and to be honest it's a little frustrating...
I've read a lot about multi threading on the forum, and on almost 99% of the topics it is classified as "Not feasible", but having just the querys to work on another thread is not feasible too ?
I've read about non-blocking operations on MariaDB, but i would need to read a lot more in order to get the knowledge to apply and see if it works on DM the way it is now. Another thing that i was thinking is the possibility to call async querys using javascript and node.js but i don't know if it would work too.
So is that a possibility or i will need to find a workaroud method ??
Thanks anyway for the great work, and take care of yourselfs !!
ID:2567909
![]() May 4 2020, 7:04 pm (Edited on May 4 2020, 8:01 pm)
|
|||||||
| |||||||
I think it might potentially be possible to spawn off db calls on a separate thread. The main thing is, I'd have to add sleep and restore functionality to all the built-in calls, which is not necessarily the simplest thing. Then I'd have to test it, which is way less simple since none of my projects use this functionality.
|
To all built-in calls? That sounds like quite the undertaking.
@Tacurumin: SpaceManiac has done some development that may be helpful to you for now. https://github.com/MCHSL/extools/blob/master/README.md |
I can imagine...
Anyway, if you find that doing this will not only benefit me, but future or another actual developers, i will be more than pleased to send you a test project. But if you find that working in this today will not represent a real benefit for the engine and choose to focus on another things, theres no problem too. |
I would think utilizing a database you are hoping to store playerdata centrally on some webserver--we are already capable of this using world.Topic().
I would think it would be a breeze (if db support was baked in) to spawn a process that utilizes a callback upon completion but actually, you can do that yourself now.