jsb / Gatherer

Vanilla World of Warcraft (v.1.12.1) AddOn
31 stars 18 forks source link

gatherer_p2p 1.1.1 #10

Open theoden-dd opened 7 years ago

theoden-dd commented 7 years ago

See comments in the last message for #9.

jsb commented 7 years ago

Thanks for the code! However, I'm not so happy with the current approach of increasing the broadcast frequency for skipping duplicate nodes. I thought about a different, deterministic algorithm which would rely on a constant cycle frequency:

Optional, to prevent sending known nodes:

The strength of this approach is that we don't need to sample the entire database multiple times to find an unsent node. What do you think?

theoden-dd commented 7 years ago

Excellent idea!

That's generally the same, what I wanted to implement, but achieved by other means.

I'll do that in the 1.2.0 version instead of searching the first unset node after a randomly selected one: theoden-dd#13

The toughest things to find out are:

  1. how to effectively remove an element from lua table without breaking the sequenced indexing,
  2. how to effectively shuffle a lua table.