ErikMinekus / sm-ripext

SourceMod REST in Pawn Extension
https://forums.alliedmods.net/showthread.php?t=298024
GNU General Public License v3.0
136 stars 38 forks source link

About sync method #39

Closed Kxnrl closed 3 years ago

Kxnrl commented 3 years ago

Is possiable make support for sync http reqeust? In some cases, it's useful. For example, I wanna a plugin load all data OnPluginStart.

before, we use SQL sync query to load items data. but sometimes sync query fail, I had to change to thread query. https://github.com/Kxnrl/Store

If we can make support for sync http request, will be helpful for such plugins.

ErikMinekus commented 3 years ago

The internet is asynchronous, and requests take time. A sync request freezes your game server while it's being handled, causing lag. If a request times out, your server freezes for 30 seconds. Therefore, I will not implement them.

You just have to load the data OnPluginStart and not use it until it's loaded. If all goes well it shouldn't take long, and if it fails, you have to handle the data not being there anyway.