miwarnec / DOTSNET

Public DOTSNET issue tracker
20 stars 0 forks source link

Have a NewObserver buffer to compliment the Observer buffer #61

Open Will-Carson opened 2 years ago

Will-Carson commented 2 years ago

Is your feature request related to a problem? Please describe. Right now it is impossible to selectively send data only to new observers. Say I have a buffer of stats. With just a buffer of observers I am able to update all observers any time an entities stats change. However, this means that any observer who is added to the list between stat updates will not get sent the stats at all (at least until the stat is changed again.)

Describe the solution you'd like A NewObserver buffer which is populated only with the diff of observers between update loops, and which is cleared at the end of each update loop (or the beginning of the next, whichever makes more sense.)

Describe alternatives you've considered Alternatives include sending all observers all of the data all the time, which becomes extremely problematic as we scale the data per entity and the number of observers.

Additional context It is possible that you have have some greater plans for syncing data between entities. However I think it is important for a general purpose tool to give users options in case your built-in solution doesn't work for them, and this solution is pretty simple / low overhead.