Why don't the dev's change the API system to Websockets, polling stale data is so 90's...
This (ok I admit this is a big change) would free up a ton of resources on the torn side and that is something that would benefit us all.
Like for example the attack endpoint, we keep polling a 100 item array to see if anything changes, with websockets it would dramatically reduce calls to the servers and database query's.
If the WS middelware is added to the DB middleware you would cut out API DB query's.
On the bot makers side we would authenticate via API key and subscribe to certain channels we want, when the backend does a DB update it would send out a message to the channel linked to that.
It's a system that would greatly benefit the Torn servers, but also make bot's event driven and not history driven.
Really stale stuff like the Torn endpoints could just be send on "welcome" when subscribed to the WS channel.
If missed events on a bot side problem would be an issue the "welcome" message for dynamic channels could also send X past results.
Hope dev's read this and give it a thought, because I can imagine the extra resources freed by such a change would come in handy during Torn events ;)
This (ok I admit this is a big change) would free up a ton of resources on the torn side and that is something that would benefit us all.
Like for example the attack endpoint, we keep polling a 100 item array to see if anything changes, with websockets it would dramatically reduce calls to the servers and database query's.
If the WS middelware is added to the DB middleware you would cut out API DB query's.
On the bot makers side we would authenticate via API key and subscribe to certain channels we want, when the backend does a DB update it would send out a message to the channel linked to that.
It's a system that would greatly benefit the Torn servers, but also make bot's event driven and not history driven.
Really stale stuff like the Torn endpoints could just be send on "welcome" when subscribed to the WS channel.
If missed events on a bot side problem would be an issue the "welcome" message for dynamic channels could also send X past results.
Hope dev's read this and give it a thought, because I can imagine the extra resources freed by such a change would come in handy during Torn events ;)