View Single Post
04/05/19, 12:31 PM   #1
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
[open] Group Data Sharing

I'm not sure whether this is a security or performance issue, but I would very much like a feature that allows grouped players to directly send binary data to each other.

Probably the best way to do it would be via a publisher/subscriber architecture (effectively custom events).
  • Function to define a topic which returns a newly created or already registered Id number.
    Lua Code:
    1. RegisterGroupDataEvent(string name) -- returns number registeredId
  • A function to send data, such as a string of fixed max length, to a defined topic.
    Lua Code:
    1. TransmitGroupDataEvent(number registeredId, string binaryData) -- returns bool success
  • An event that receives the published data.
    Lua Code:
    1. EVENT_GROUP_DATA_PUBLISHED(number eventId, number registeredId, unitTag sender, string binaryData)

There could be other functions defined to inspect the already registered topics, but the three API points above would be extremely useful for some really spiffy group oriented addon features.

If there are concerns about bandwidth or abuse, it would be perfectly reasonable to place limits on the length of the data (maybe 256 bytes) and the frequency at which data is permitted to be sent (maybe once a second). I'm sure I'm not the first to suggest such a feature, but have reasons been given in the past for why such a thing cannot be implemented?

Addon devs are already abusing map pings to send data, so why not just make it an official API feature?
  Reply With Quote