The biggest thing I dislike about the World of Warcraft Armory
is the fact that it throttles requests to 120 a minute. Of course, I understand why it does this, as it must prevent getting hit with so many requests so fast that it essentially gets DOS'd
. This means, instead of bitching about the limit, instead I need to find an elegant solution to avoid hitting the Armory more than 120 times per minute with LibWowArmory
There are several problems that I must tackle in order to implement this. Firstly, LibWowArmory is a library, which means I can have multiple calls to the Armory coming from multiple places. For instance, my web server calls the Armory from both the website and a nightly maintenance application. I need to find a way to centralize management of the number of calls the application is taking per minute.
Second, I can't block a webpage when a call to the Armory is queued, but I can block the maintenance program. I need to develop a queuing mechanism for both scenarios. Something elegant and AJAXish for webpages, and something else for client apps.
The need for this has come up because I'm on the verge of adding GearScores
to the Six Minutes To Release
website, and the average character GearScore creates over 15 calls to the Armory, one for the character and one for each item. Requests absolutely have to be throttled, or I'm going to run over the 120 requests per minute fast.
I'm hoping to get this done this weekend so that I can release it along with some bug fixes that were introduced with the Visual Studio 2010 conversion. Eventually, the library will go to .NET 4.0 as well, but I'm not going to do that until all of my libraries, websites, and applications are on the same page.