jdev - 2019-09-03


  1. Ge0rG

    What do you do if a join presence to a MUC times out? If you are just on a slow network, eventually the join will complete. If the remote MUC server is down, you don't quite know.

  2. Kev

    Swift says something like "No response has been received yet, maybe you're never going to join".

  3. Kev

    (Not those exact words)

  4. Ge0rG

    (using a library with a "hard" timeout isn't exactly helping, btw)

  5. Kev

    There's almost no instance in XMPP where a hard timeout is helpful at the protocol level.

  6. Ge0rG

    I wondered why my message parser was crashing on a null pointer dereference, but it was because the join didn't complete in 30s before that, and thus the controller object was decomissioned.

  7. Ge0rG

    Kev: establishing a c2s connection from a mobile client.

  8. Kev

    I said 'at the protocol level' deliberately, because session startup is an exception.

  9. Ge0rG

    I tend to agree. It would be great to have a mechanism that triggers a soft-timeout handler without actually removing the success handler

  10. Ge0rG

    so that you can show "this is taking unusually long. please be patient"

  11. Ge0rG

    (this is also not how most APIs work)

  12. Kev

    In Swift we just go a layer above.

  13. Kev

    So the layer that asked for the MUC join displays the message if the library hasn't announced a completion yet.

  14. Ge0rG

    Hm, yeah.

  15. lovetox

    how can a join timeout wihout response?

  16. lovetox

    should your own server not tell you that the muc server is not reachable

  17. Ge0rG

    lovetox: it can't. But there are libraries that expect the join to be finished in a given pre-defined time

  18. Ge0rG

    Theoretically, it can't.

  19. lovetox

    ok but 30 s seems a long time

  20. Kev

    I was thinking 30 seconds was no time at all :D

  21. lovetox

    i would say servers should respond faster with a timeout error

  22. Ge0rG

    In practice, there is no s2s 0198, so your presence might well get lost while the remote server is tearing down

  23. Ge0rG

    lovetox: a) mobile connections tend to be veeeeery slow.

  24. Ge0rG

    I experience minute long delays on my usual train to work.

  25. Kev

    Mobile connections are fast compared to some things.

  26. lovetox

    yeah ok, Gajim never timesout, it just says endless "joining..."

  27. Ge0rG

    b) setting up s2s is friggin' complicated, with dialback and unhappy eyeballs etc.

  28. Ge0rG

    sometimes you only have a unidirectional s2s, so your join completes fast, but you never get the responses back.

  29. Ge0rG

    distributed systems are hard. let's go shopping!

  30. Daniel

    fwiw (somewhat related to this discussion) i always iq before join

  31. Daniel

    i need that to decide what to put into the history tag anyway

  32. Daniel

    and then i know if i get a server not found or something

  33. Ge0rG

    Daniel: what do you do if the IQ isn't responded to?

  34. Daniel

    display joining… i guess

  35. Daniel

    but it seems less likely than a lost presence

  36. Ge0rG

    forever?

  37. Kev

    That'd massively delay joining the MUC if there's a slow link though, wouldn't it?

  38. Daniel

    presumably

  39. Ge0rG

    Kev: there is no other way to know whether that JID is actually a MUC

  40. Zash

    Unidirectional s2s is problematic, that would eat your iq-reply too.

  41. Ge0rG

    can't we just have s2s-0198?

  42. pep.

    But with an IQ my server should send me a timeout back no? If it gets no answer. Or will it just wait that the kernel kills the tcp socket if the connection is borked?

  43. Zash

    Prosody won't

  44. Ge0rG

    pep.: your server doesn't track IQs to remote servers

  45. Ge0rG

    pep.: so if there is a unidirectional s2s connection, you'll wait foreve

  46. Ge0rG

    pep.: so if there is a unidirectional s2s connection, you'll wait forever

  47. pep.

    Great

  48. pep.

    Well slix will timeout at least.

  49. Zash

    And 198 doesn't actually help with that

  50. Ge0rG

    Zash: why not?

  51. Zash

    198 is also unidirectional

  52. Zash

    It has nothing to do with replies

  53. Ge0rG

    I mean, it will not detect/fix unidirectional s2s, but it will restore all messages after a successful reconnection

  54. Zash

    Will it?

  55. Ge0rG

    You only need to kick it hard enough?

  56. Zash

    Reconnection support isn't mandatory afaik

  57. Ge0rG

    A _sane_ implementation of 0198 will help

  58. Zash

    Does that exist?

  59. pep.

    xmpp:chat@xmpp.rs?join < xmpp-rs is moving there

  60. Zash

    Anyone aware of any XMPP software that requires an XML declaration at the start of each stream?