• 0

    posted a message on ChatThrottleLib available
    Quote from maia »

    IMHO it should rather be something like:
    1000CPS in ALERT, 1000CPS in NORMAL, 1000CPS in BULK:
    - ALERT gets 600CPS
    - NORMAL gets 300CPS
    - BULK gets 100CPS

    and what if my raid combat addon thats using alert priority doesnt need more than 200CPS, but for some reason GEM or DamageMeters (put any other example here, just naming it as I know it syncs a lot) decide to do a main sync that moment and ask for 10.000CPS? Will then the alert group be throttled to even less than 200CPS?

    The priority allocations are certainly up for discussion.

    What it basically does now is find a common limit that it then applies to all priorities. Another two examples then:

    BULK: 10000CPS, NORMAL: 200CPS, ALERT: 400CPS
    - Bulk 400
    - Normal 200
    - Alert 400

    BULK: 10000CPS, NORMAL: 300CPS, ALERT: 400CPS
    - Bulk 350
    - Normal 300
    - Alert 350

    Quote from maia »

    Also, in my personal view: any messages with BULK priority should have 0CPS until there's no ALERT queue. I don't want a non-combat guild bank addon to throttle my raid combat addons in the middle of a boss fight.

    I don't quite agree. Imagine KLHTM saying "OMG MY MESSAGES ARE SO DAMN IMPORTANT" and putting them in "ALERT" priority. (Pretty likely, every addon author thinks that his own messages are the most important of all).

    Suddenly all non-alert traffic is shafted. All of it.

    This is why I didn't go with a straight priority override but rather attempt to share available bandwidth over the priorities. But, as I said, this algorithm can certainly be tweaked to allocate more or less bandwidth to different priorities.

    My original thinking was simply that a sane author simply WOULDN'T be sending that much alert traffic. So having the alert priotiy be limited to 333cps in a worst-case scenario (full flood in normal and bulk) would then not ever impose a problem?

    Agree or disagree here?

    Algorithm? Hmm... okay I'll give it a quick try. It will look damn simple, the actual interactions over time are not. I've designed and implemented a commercial grade network traffic shaper at work so I've learned a thing or two about how to optimize this stuff :-P

    Basically, what happens is that on each timer pulse, I compute 1000*time_since_last, and give an equal slice of it to all priority queues that have data waiting to be transmitted. They then proceed to use up as much of that slice as possible. Possible spillover or unused bandwidth (because the next message was too large to deliver) is kept until the next tick.

    Obviously, this is a bit simplistic if I wanted to do multi gigabit shaping over a larger number of queues. Spillover would need to be handled differently, and I would probably want to keep a decaying average ticking to take the spikes out of it. But this works well enough for these purposes, and, above all, is very light on CPU and mem crunching.
    Posted in: Libraries
  • 0

    posted a message on ChatThrottleLib available
    Quote from Ammo »

    BigWigs won't use any throttling, since it relies on getting it's messages across asap.

    If you need ASAP, i suggest you DO use the library and give them ALERT priority.

    If not, and someone's told it to hook the APIs.... you get lower priority.

    If you attempt to override the library and pump your messages out anyway, and some addon is transmitting at full speed, the end result will just be kicking the player off when you exceed the output rate limit, which is hardly a gain as I see it.

    Posted in: Libraries
  • 0

    posted a message on ChatThrottleLib available
    Quote from Ammo »

    Well right now it dumps all addons that don't use the lib into the NORMAL category. And I suspect not everyone will use the throttlelib.

    Maybe put those messages without prio into a 'send as soon as there is room in 1 of the 3 categories' category?


    It will be put in NORMAL, where it will get sent after everything else already queued in NORMAL.

    "Send as soon there is room in 1 of the 3 categories" is somewhat pointless. A category uses all the bandwidth there is if there's room for it. What would it do? Wait until the ENTIRE outbound queue, including any future messages added, is empty before sending it? That'd be slower :-P

    Posted in: Libraries
  • 0

    posted a message on ChatThrottleLib available
    Quote from maia »

    Mikk, thanks a lot. I'm a bit unsure about the following though:

    In a fully loaded system (with full output in all priorities), each priority gets 1/3rd of the available bandwidth.

    assuming oRa, BigWigs, KLHTM and HealSync are all using the "ALERT" priority, they'll still be sharing 333cps (which might or might not be sufficient), and Guild Event Manager with priority "BULK" has another 333CPS? Shouldnt a BULK message be de-priorized and sent later if there is an ALERT queue, aka changing the bandwidth to e.g. 600 for ALERT and 66 for BULK?

    It's a proper traffic shaper. This means that traffic is balanced if it needs to be. My example was for a fully loaded system.

    Other examples:
    200CPS in ALERT, 100CPS in NORMAL, 1500CPS in BULK:
    - ALERT gets 200CPS
    - NORMAL gets 100CPS
    - BULK gets 700CPS

    1000CPS in NORMAL, 1000CPS in BULK:
    - NORMAL gets 500CPS
    - BULK gets 500CPS

    1000CPS in ALERT:
    - ALERT gets 1000CPS.

    1000CPS in ALERT, 1000CPS in NORMAL, 1000CPS in BULK:
    - All three get 333CPS each.

    As good is it can get imo.
    Posted in: Libraries
  • 0

    posted a message on ChatThrottleLib available
    ChatThrottleLib is a small, embeddable library by Mikk that handles outbound rate limiting of outbound chat and addon communication.

    It will do:
    • Round-robin traffic shaping of different communication paths
    • Prioritization of messages according to three predefined priorities: "BULK", "NORMAL" and "ALERT"
    • Optionally throttle ALL system traffic to avoid having non-throttled addons cause overflows

    Documentation is at http://www.wowwiki.com/ChatThrottleLib

    Source is in http://svn.wowace.com/root/trunk/ChatThrottleLib

    I'm purposefully avoiding using any other libraries or even affiliation with others to make it as neutral as possible with the hopes that all comms libraries would be willing to use it.

    And, yes, I will be uploading it to wowi also so that I don't even have to point at the Ace SVN outside of this forum =)
    Posted in: Libraries
  • To post a comment, please or register a new account.