I’m writing currently notification bot for my alliance. I would like to get notifications as soon as they appear. Especially since for example notification about attack on structure after 10 minutes may be too late. Or for example sov with 1.0 adm is taking only 10 minutes to reinforce (same as cashe timer).
At early development I was poking esi server every 20s (what was rather not perfect and resource consuming), now I’m going to implement etags.
Is there any way to make request which will check if there was change in notifications, like etags, but at same time will not force esi server to cashe data, so any new notification can be received after 1-2 minutes and not 10?
No, the caches are there for a reason. Trying to avoid them is a no no. Etags + fetching every 10min is the way to go.
EDIT: Some relavent issues.
I am currently writing a notification module for my bot as well and you can get around the 10 minute cache timer pretty well by using more than 1 character for the checks. I would suggest instead of having one dedicated character for all notifications you instead ask for the notification scope from everyone that authenticates on your Discord.
When you have more than 1 token to check, you can space out the ESI requests between the tokens. If you (for example) have 5 tokens instead of 1, you can check one of them every 2 minutes. They will all be set to a cache timer 2 minutes apart spanning those 10 minutes. Just adjust that time automatically to the amount of registered users and the more users you have, the quicker the bot will pick up new notifications.
With enough people you can get the notification time to a few seconds.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.