#150 Optimise PEP requests for disco info on caps change

Reporter MattJ
Owner Waqas
Created
Updated
Stars ★ (1)
Tags
  • Priority-Medium
  • Status-Fixed
  • Milestone-0.8
  • Type-Enhancement
  1. MattJ on

    Room logs explain best: [20:40:57] teo: MattJ: found something weird in pep: if i change my caps hash (by changing disco features list) and send the new presence then every contact from my prosody server sends disco#info query to me (from bare jid, so these are queries from server). i'd expect a single query. though i don't know what to do if i block some users (using privacy lists or something else) [20:42:00] MattJ: Mmm, nice [20:43:29] teo: MattJ: but still, getting tens (or may be hundreds) of disco#info queries isn't seem to be good. [20:45:14] teo: MattJ: maybe sending queries sequentially till the first success? [20:45:42] MattJ: teo, I think something like that [20:45:56] MattJ: teo, or might we just use the server address? [20:46:29] teo: MattJ: using server address isn't good also [20:46:34] MattJ: or no address [20:46:43] MattJ: I can imagine that confusing clients :) [20:46:59] teo: MattJ: imagine me blocking iq from anyone outside my roster [20:47:08] MattJ: Yeah [20:47:18] teo: MattJ: no address doesn't work for contacts from other servers [20:47:34] MattJ: True [20:48:18] MattJ: But you might block iq from certain contacts too... [20:48:23] teo: MattJ: so, using from address taken from presence packet is a good idea [20:48:48] MattJ: Hmm, yes [20:50:07] teo: MattJ: true. that's why i'd wait the reply for the first query, then send the second in case of error, etc... [20:52:17] MattJ: What does ejabberd do? [20:52:40] teo: i'm just afraid (i didn't see the code, so this is a speculation) that the logis is too simple: presence packet is received and if there's no caps in cache prosody immediately sends disco query. which means that all the logic should be redone somehow [20:53:11] teo: MattJ: ejabberd sends query with server address in from, which is incorrect (i think) [20:54:18] MattJ: teo, I don't think the logic would need fixing that much... just remember we already sent a request, and then store the people who wanted to be notified of the result [20:54:55] teo: yes, i'd do something like that

  2. MattJ on

    Ignore this comment, testing the tracker :)

  3. MattJ on

    Going to disco the user from their own JID, and use that result for all contacts.

    Changes
    • tags Milestone-0.8
  4. Waqas on

    Commited: http://hg.prosody.im/trunk/rev/345cd1e04e80 Need to test.

    Changes
    • tags Status-Started
  5. Waqas on

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.