Thread Tools Display Modes
04/01/16, 01:45 PM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
LibGroupSocket released

This new library provides a clean interface for addons to communicate via group map pings.
You can read the details here.
  Reply With Quote
04/04/16, 10:12 AM   #2
uladz
AddOn Author - Click to view addons
Join Date: Feb 2016
Posts: 11
Brilliat! Did you test throughput of this channel? How much data /sec can we push without overflowing it? Also how different addons can share this channel? I'll check out API right now, but this is excactly what I was missing for one of my ideas for a better shared quests addon. Thanks!!!
  Reply With Quote
04/04/16, 10:46 AM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,903
Cross addon communication can be done be registering handlers listening for the message types used, I suppose?
Code:
Because the channel is very limited, there is currently only a maximum of 31 different message types supported.
If you are interested in adding a new message type, please contact me via pm and I will reserve an ID.
It is also encouraged to reuse existing message types and expand on them instead of adding a new one that does the same thing, but slightly different.
  Reply With Quote
04/04/16, 11:20 AM   #4
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Cross addon communication should not be used for that kind of thing, just leak to global or write a public func ?

In which case addon A of player X should send data to addon B of player Y ?
  Reply With Quote
04/04/16, 03:05 PM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
@uladz I did only some basic tests, but there is definitely a send rate limit. Calling send 100 times in a loop did get me kicked for message spam. Generally speaking you should strife to send as little as possible, because all message types count towards the same limit and once there are more message types, the send queue could get clogged with pings that cannot be sent. Right now I send a maximum of two pings per second in combat for the resource message, but I may have to adjust that in the future once I did some more tests to find out the exact limit. I also plan to add a throttle so reaching the limit does not kick the player and also something that allows old packages to be dropped if they are queued for too long and become obsolete.

The message itself is also very limited and can only hold a maximum of 3 bytes in one ping or 7 bytes in two pings (one byte is reserved as a header).

@Baertram Yes. A message type is supposed to implement a handler (see ResourceHandler.lua), which serializes and deserializes data and fires callbacks when a message is received. Addons can register to them and react to the incoming data. The outgoing part is to be implemented in said handler, to allow all addons to have the same basis for the data.

@Ayantir What I mean is that instead of having 10 different addons implement their own dps message type, have one dps message type for all of them that is compatible with each.

EDIT: If an addon cannot separate the data collection into a handler because it is too complicated, that's also okay. But once we reach the messageType limit, it is time to get creative.

Last edited by sirinsidiator : 04/04/16 at 03:10 PM.
  Reply With Quote

ESOUI » AddOns » Released AddOns » LibGroupSocket released

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off