Modern XMPP project discussion - 2021-09-01


  1. raghavgururajan

    MattJ and/or Zash: The account migration portal (https://migrate.modernxmpp.org/) doesn't seem to work. I get blank page after entering credentials.

  2. MattJ

    Do you have Javascript enabled?

  3. raghavgururajan

    I do.

  4. raghavgururajan

    Ah in different browser, I see "XEP-0156 lookup failed." for one account and blank page for another.

  5. MattJ

    Interesting, which browser(s)?

  6. raghavgururajan

    First IceCat, then Surf.

  7. raghavgururajan

    Regarding terminology (https://docs.modernxmpp.org/terminology/), what is recommended name for subdomain for xmpp server? like im.tld.or or chat.tld.org or ...

  8. Sam

    In what context? That doesn't seem like the kind of thing you'd mention to the user, so the actual technical term should suffice.

  9. Sam

    Put another way, I wouldn't talk about domains, I'd talk about "services" such as "chat rooms" or "file upload" or whatever instead.

  10. raghavgururajan

    The user might access admin panel.

  11. Sam

    Then they're an advanced user and just calling them domains should be fine I'd think

  12. raghavgururajan

    I see.

  13. jonas’

    the recommendation would be "none"

  14. raghavgururajan

    https://snikket.org/service/quickstart/

  15. raghavgururajan

    In that example, chat.example.com is used.

  16. raghavgururajan

    jonas’: Did you mean like example.com apexdomain?

  17. greg

    Is there a best practice for delivering input validation errors to clients during in-band registration? It looks like I have 2 options, return an error stanza of <not-acceptable/> with a <text> description of the problem, or use a Data Form and put the error in the <field>'s description. Is there a preference with this sort of thing or another way of doing it? Are Data Forms well supported by clients?

  18. jonas’

    the last question: definitely no

  19. jonas’

    error + text is the most sensible way to go, if you want to be nice you also return the data which was submitted (that is legal: an IQ error can contain the original request)

  20. MattJ

    That's on my list of annoying things to remove from XMPP 2.0 :)

  21. MattJ

    It encourages clients to not track stanzas properly

  22. Sam

    errors don't always mirror the id anyways and don't always get returned or have a success response so you can't really track anything but iqs in a reasonable way anyways

  23. MattJ

    Can you give any case where errors don't mirror the id? Because that would be a bug. We had this discussion not long ago :)

  24. Sam

    Did we? I don't recall the details, but I think it was ejabberd that never did or something

  25. Sam

    Doesn't matter, even if that part is wrong you can't reasonably track errors because there's not always a success case so you just have to guess at timeouts

  26. MattJ

    There's always a success case for iq, it's true that in many cases silence on success is the default (e.g. sending a message)

  27. Sam

    Yes, excepting IQs as I said before.

  28. Sam

    So you show success on a message payload then 30s later the error is returned. Oops.

  29. Sam

    or you do nothing, stop tracking, then the error is returned more likely.

  30. Zash

    For messages you probably have a local message database where you could look it up by id when you get an error, so not sure why you would have a timeout like that.

  31. Sam

    fair, I guess if I assume that I can store all message IDs for the duration of the session that's fine. I doubt that's always true though.

  32. Zash

    XEP-0198 would also tell you whether the message at least reached your local server, which would allow marking anything acked as success

  33. Zash

    And receipts if you need end-to-end confirmation.

  34. Sam

    For a simple chat client it may be.

  35. MattJ

    Well the protocol just matches the UI expectations here. You don't indicate success when you send a message, but you may indicate that it was received by your server (198) or by the recipient (184).

  36. MattJ

    A delayed error is common to many protocols

  37. Holger

    > It encourages clients to not track stanzas properly

  38. Holger

    MattJ: What about servers?

  39. MattJ

    Servers are always correct

  40. Holger

    Servers receive errors and might do useful things with them.

  41. Holger

    And might not have the original stanza in MAM or whatever.

  42. Zash

    `log("debug", "Recevied an error, but whatever, who cares, discarding it");`

  43. Holger

    What's the advantage in omitting the original stanza?

  44. Zash

    Smaller stanzas

  45. Holger

    Omitting IDs would make them even smaller.

  46. MattJ

    Okay, but if you omit the ID you can't do any sensible tracking

  47. MattJ

    If you omit the original payload, you can

  48. MattJ

    If you omit both, you obviously can't

  49. Holger

    Force servers to track stanzas just for error handling sounds wrong to me. I think it also sounds wrong to me to force clients.

  50. MattJ

    I really don't understand this perspective at all

  51. jonas’

    Holger, is there any use case where it helps a requesting entity to get the original request delivered with the error response?

  52. jonas’

    I haven't seen one yet.

  53. jonas’

    for IQs anyway

  54. jonas’

    for messages I'm not sure, for presence I'm most certain it makes no sense.

  55. Holger

    Yes I ran into that more than once.

  56. jonas’

    -v then please :)

  57. Holger

    Sigh as if I _remember_ stuff.

  58. jonas’

    your git commit log might

  59. Holger

    MUC service generates e kind of notifications for offline members. On receiving an `error` for a `groupchat` message, it has to decide whether that should trigger a notification. This decision might depend on the payload.

  60. Holger

    *some kind of

  61. Holger

    Dunno about IQs specifically. I find the perspective weird to omit potentially useful information if in doubt, rather than vice-versa.

  62. MattJ

    You can encode "should this error trigger a notification" into a single bit in the id

  63. Holger

    Yeah, if the notification doesn't include the payload.

  64. jonas’

    MattJ, not for type="groupchat" unless you are nasty. the IDs are under control of the original sender.

  65. jonas’

    … at least for the reflection. please don't rewrite MUC IDs randomly, mkay

  66. MattJ

    I assumed some OOB notification was being discussed

  67. Holger

    I send out a regular groupchat message, and an error for that should possibly trigger an OOB notification.

  68. Holger

    Whatever, I don't quite see the relevance of random example use cases of mine, anyway.

  69. Holger

    Regardless of whether they're valid, you'll have a hard time convincing me the original stanza is useless in principle, for all future use cases.

  70. Holger

    So I'd be careful with making such an assertion, as that's hard to revert.

  71. jonas’

    I mean you can't rely on the thing being in there anyway :)

  72. jonas’

    it is OPTIONAL, which means MAY, which means… nothing

  73. Holger

    Yes but we could add it to the list of things to add to XMPP 2.0.

  74. Holger

    Rather than doing the opposite.

  75. jonas’

    fair

  76. jonas’

    though as a client dev, I am not particularly fond of having to carry the original XML around

  77. jonas’

    my parsing discards approximately all things it doesn't know about, so restoring the original XML (even just semantically instead of syntactially) is pretty much impossible in the general (and especially in error) case.

  78. jonas’

    working with a DOM instead would allow that, but it's also grossly inefficient

  79. Holger

    Whenever I come up with implementation problems I'm told "that's just your implementation problem" :-)

  80. Sam

    yah, the original xml thing never seemed useful to me either. Leaving unused things in with the justification "I dunno, might be useful to someone at some point" also seems like a bad thing to do.

  81. jonas’

    Holger, I mean, I am happy with making my parsing stricter so that the original XML can be reconstructed... but last time I did that, I had to revert it to talk to ejabberd ;P

  82. Holger

    Due to an ejabberd bug?

  83. jonas’

    due to code attributes on error elements

  84. jonas’

    which is not technically a bug

  85. jonas’

    I'm just being a bit snarky here

  86. jonas’

    :)

  87. jonas’

    if we're aiming for the possibility of (energy and memory) efficient XMPP client implementations, I think it's hard to argue in favour of having to keep the original XML somewhere until it is clear that no error response will be sent.

  88. Holger

    Ah, the RFC392?/XEP-0086 thing?

  89. jonas’

    yes, probably

  90. Holger

    Funny, there was a PR to remove support for that just yesterday :-)

  91. jonas’

    it was mentioned somewhere a few days ago I think

  92. Sam

    Ot also seems perfectly reasonable to parse the xml, save what you want in database schema/language type system/other serialization and throw the rest away. Always requiring that you also keep the original seems like it just can't work.

  93. Zash

    Isn't it needed by ... something? MUC probably?

  94. Holger

    Sam: Only until you decided to accept the stanza, of course.

  95. Holger

    Zash: The error codes?

  96. Zash

    `<error code=xxx>` was used by some XEP IIRC

  97. Holger

    Dunno. MUC has the status codes of course ...

  98. Zash

    With some luck I'm just confusing it with those status codes

  99. Sam

    I don't even know if my xml parser would reasonably let me get that info. I could save tokens and re-encode them if necessary I guess. Hope we never sign the original payload or I'd be screwed though.

  100. Holger

    I'm sure everything will fall apart once we merge that PR ...

  101. Holger

    kk I understood I'm lost with my desire to receive the original stanza back with errors. Error handling has never been the #1 focus of XMPP :-P

  102. Zash

    YOLOMPP

  103. Sam

    Holger: why do you actually want it? I've never seen it used anywhere?

  104. Holger

    Sam: I mentioned one of my use cases above.

  105. Zash

    xeps$ ack '<error\ code=' run and be amazed^Wterrified

  106. Holger

    (I actually implemented that one for a customer who was okay-ish with "won't work for Prosody users".)

  107. Sam

    I don't see it? What am I missing?

  108. Holger

    Sam: MUC service generates some kind of notifications for offline members. On receiving an `error` for a `groupchat` message, it has to decide whether that should trigger a notification. This decision might depend on the payload.

  109. Zash

    "for" how?

  110. Holger

    Hm?

  111. Sam

    ahh, yes I see. That makes sense to me at first blush, thanks

  112. Zash

    "Someone went offline" notifications? Notifications sent to offline members? Something else?

  113. jonas’

    the middle case

  114. jonas’

    out-of-band notifications

  115. Holger

    Ah, yes.

  116. jonas’

    using type="error" to detect the offlineness

  117. jonas’

    instead of kicking

  118. jonas’

    Holger, I find that use case compelling, but IMO it needs a different way than forcing entities to keep the entire deserialized state of stanzas around until they have been processed successfully, really

  119. Sam

    What jonas’ said.

  120. Zash

    Like, if the error has a `<body>` then send send something else?

  121. Holger

    The server _could_ obviously track all stanzas; or hard-depend on MAM or something.

  122. Zash

    `<history/>` cache!

  123. jonas’

    tracking all stanzas is about as insane as entities having to keep the XML around :)

  124. jonas’

    not sure how MAM would help in this situation either

  125. jonas’

    oh, you could look up the stanza by ID, gotcha

  126. Holger

    Well I could try to look up the ID.

  127. jonas’

    if your MAM is indexed on message/@id and not on message/stanza-id/@id

  128. Zash

    Can you distinguish between an error for a type=groupchat vs type=chat ?

  129. jonas’

    no

  130. jonas’

    s/not on/not just on/

  131. Zash

    This always seemed like an awkward thing, having a type=error and no way to determine what the original type is. Even if you have the rest of the payload.

  132. jonas’

    indeed. it doesn't matter for IQ much, but for the others it does (presence type="subscribe" errors vs. type="unavailable" errors…)

  133. Sam

    *nods* let's just fix that part too while we're at it.

  134. jonas’

    are we even at it?

  135. Sam

    xmpp 2.0? didn't you just commit to writing that and fixing all the problems? I think that's what I heard.

  136. Holger

    Yup.

  137. Zash

    Stuff the whole original stanza in a forwarded-envelope? That'd also preserve say, cryptographic signatures that happened to cover id, to, from

  138. jonas’

    I'm busy with RIIRing prosody, sorry ;P

  139. jonas’

    Zash, making things worse? :(

  140. Sam

    See, Holger heard you too. No backing out now!

  141. Zash

    Wasn't that the point, people want worse things?

  142. jonas’

    I don't think so :)

  143. Holger

    I'm totally fine as long as whatever we come up with is super-complicated.

  144. Zash

    Every stanza to include an XSLT that is used to generate the error reply, check.

  145. jonas’

    transpiled to some Lisp dialect because carrying XSLT directly over the wire may be unsafe

  146. Holger

    Sounds good. Next customer, please.

  147. pep.

    Didn't we have xslt already in pubsub

  148. southerntofu

    it's been a few times i hear about "xmpp 2.0" and i've read the "office hours" page: https://wiki.xmpp.org/web/XMPP_Office_Hours/2021-04-13-Notes

  149. southerntofu

    there's some interesting reflections in there, is that a real project/working-group? are some people gathering feedback on this topic?

  150. southerntofu

    or is it just codename for every feature someone wants nowadays? :P

  151. MattJ

    There is no serious active effort right now

  152. MattJ

    At some point there may well be a new round of the core XMPP RFCs, the persons/people working on that will be responsible for gathering such issues, so it helps to have them written down for sure

  153. southerntofu

    could we maybe start a public survey of painpoints and ideas across implementations? (a bit like what i've barely started for XMPP spaces)

  154. southerntofu

    something like that wiki page, but open to more contributions, and a bit more structured?

  155. MattJ

    Anyone can do anything :)

  156. pep.

    Do it yourself(tm)