XSF Discussion - 2017-10-22


  1. zinid

    regarding message routing 2.0: can't we just make servers to always carbon messages to local users?

  2. zinid

    so if there is user@server/r1 and user@server/r2, then a message to user@server will be routed to r1 and r2, as well as a message to user@server/r1 will be routed to both r1 and r2

  3. Zash

    Bare JID routing like that is already allowed. Full JID forking would be problematic.

  4. zinid

    Zash: yes, no problems with bare JID routing, but what problems do you see with forking?

  5. Zash

    Non-chat messages basically.

  6. zinid

    example?

  7. Zash

    IBB file transfer, MAM responses. Basically stuff that maybe shouldn't have been messages to begin with, but we don't have a generic non-message payload container.

  8. zinid

    what about using 'no-copy' for them?

  9. Zash

    Don't you also get roughtly the same behaviour if all clients just always send chat messages to the bare JID?

  10. zinid

    yes, but what to do with old clients?

  11. Zash

    Will old clients add 'no-copy'?

  12. Zash

    What about old servers?

  13. zinid

    and what's wrong with them?

  14. zinid

    also, it's server responsibility to add no-copy for MAM messages

  15. Zash

    > can't we just make servers [do stuff]

  16. Zash

    what

  17. zinid

    what

  18. zinid

    old servers will monkey with carbons, like it is now

  19. Zash

    I haven't looked too closely at message routing 2.0, but something that boils down to having carbons enabled by default is probably fine

  20. zinid

    I don't think these new rules affect s2s

  21. zinid

    or MUC, or whatever

  22. zinid

    so the idea is: 1) upgrade your server to always fork 2) upgrade mam module to inject no-copy 3) disable carbon module

  23. zinid

    ah, 2nd is not needed, the messages are local anyway, the server can detect it's a MAM message and won't carbon

  24. Zash

    Except MAM-MUC

  25. zinid

    no-copy in this case indeed

  26. Zash

    Tho Prosody doesn't carbon type=normal messages unless they have a body, and MAM payloads don't

  27. zinid

    I also don't see major difficulties if clients will receive forked mam messages

  28. zinid

    as well as ibb

  29. zinid

    sure, it will consume bandwidth, but not fatal

  30. Zash

    Most of those problems are actually avoided by only carboning type=chat or ( type=normal with body )

  31. zinid

    maybe

  32. Zash

    And no-copy for when that doesn't work

  33. Zash

    like OTR

  34. Zash

    But old clients using OTR doesn't add no-copy, so yay

  35. zinid

    is it a problem?

  36. zinid

    I mean a user will experience something weird?

  37. zinid

    or is it just traffic problem?

  38. Zash

    I don't know, never used OTR

  39. Zash

    OTR not doing well with multiple clients can most likely cause weirdness

  40. zinid

    same here :D

  41. zinid

    receipts are of type normal, hehe

  42. Zash

    Are they? Not the same type as the message being acked?

  43. Zash

    Chat states are weird.

  44. zinid

    Zash: I just grepped 'type' in receipts XEP and didn't find any mention about it

  45. Zash

    Needs clarification perhaps?

  46. zinid

    or maybe it's described in other words

  47. zinid

    regarding chat states: "This protocol SHOULD NOT be used with message types other than "chat" or "groupchat"

  48. zinid

    "The 'type' attribute for content messages and standalone notifications SHOULD be set to a value of "chat" (for one-to-one sessions) or "groupchat" (for many-to-many sessions)."

  49. zinid

    I'm thinking to implement this stuff on my local server to check corner cases

  50. Ge0rG

    I'm going to write another mail to standards@ about how broken message type is. Acks and CSN are on my list

  51. Ge0rG

    Also the problem is not carbons, the problem is rerouting of full JID messages to a different client if the first client just went offline

  52. Ge0rG

    Carbons have their own, related problems, but the current carbon rules are so vague that even an ancient transcribing monk would fulfill them.

  53. Zash

    https://xmpp.org/rfcs/rfc6121.html#rules-localpart-fulljid-nomatch all this?

  54. Ge0rG

    Zash: yeah. I was told that ejabberd will violate that and reroute 'normal' messages as well, because they are used by many clients instead of chat.

  55. Zash

    I believe Prosody does so as well

  56. Ge0rG

    Zash: could you check the code please?

  57. Zash

    https://hg.prosody.im/0.10/file/0.10.0/plugins/mod_message.lua#l72 https://hg.prosody.im/0.10/file/0.10.0/plugins/mod_message.lua#l34

  58. Zash

    TL;DR full jid messages to an non-existent resource are treated exactly as bare jid messages

  59. Zash

    normal and chat types are treaded the same

  60. Ge0rG

    Zash: and headline will be sent to all resources?

  61. Zash

    headline to bare

  62. Zash

    Yes

  63. Ge0rG

    Headline to non existent will be sent to bare, then to all.

  64. Zash

    Right-o

  65. Ge0rG

    Yay for standard compliance.

  66. zinid

    I think the changes we're talking about should be atomically applied to the server

  67. zinid

    so we fix all issues in one go

  68. Ge0rG

    zinid: there is no easy fix.

  69. zinid

    why would we bounce messages if they are already forked?

  70. Ge0rG

    Bounce = ?

  71. zinid

    re-route

  72. zinid

    or maybe that's not the same as bounce

  73. zinid

    I'm lost ;)

  74. Ge0rG

    Please state the nature of the technical emergency.

  75. zinid

    you're so funny

  76. Ge0rG

    I know 😛

  77. Ge0rG

    There is forking, rerouting and carbon copying. And then there is MUC that sends a new messages that might or might not have the same properties as the message you sent to the muc

  78. zinid

    what's the difference between them?

  79. zinid

    forking is creating exact duplicates as I undersand, unlike carbons with wrappers

  80. zinid

    and what is re-routing? I cannot find it in the RFC

  81. Zash

    > If there is more than one resource with a non-negative presence priority then the server MUST either (a) deliver the message to the "most available" resource or resources (according to the server's implementation-specific algorithm, e.g., treating the resource or resources with the highest presence priority as "most available") or (b) deliver the message to all of the non-negative resources that have opted in to receive chat messages.

  82. zinid

    " that have opted in to receive chat messages"?

  83. zinid

    I didn't get it

  84. Zash

    Have sent presence that doesn't have priority with a negative value

  85. Zash

    So basically that part is redundant with "non-negative resources"

  86. zinid

    ok

  87. zinid

    so the RFC allows to fork by default?

  88. Zash

    Sounds like

  89. zinid

    so nothing should be changed ;)

  90. Zash

    Everyhing is fine.

  91. Ge0rG

    It depends on message type.

  92. Ge0rG

    Zash: you can't quote only one of the four relevant sections and claim everything is fine!

  93. Zash

    I just did!

  94. Ge0rG

    Damn. It looks like you can. But I won't let you get away with it!

  95. zinid

    there is weird shit in ejabberd regarding this re-routing thingy

  96. zinid

    fixed by 6 contributors

  97. Ge0rG

    In my understanding, rerouting is when a message to a full JID is sent by the server to a different full jid

  98. zinid

    yes

  99. zinid

    8.5.3.2 from the RFC

  100. Ge0rG

    That is only allowed to happen with type=chat messages.

  101. Ge0rG

    But the servers violate it

  102. zinid

    ejabberd applies the same rule for chats and normals

  103. zinid

    from what I understand from the code

  104. Ge0rG

    Yes, because some clients send 'normal' and users complain if the messages don't arrive

  105. zinid

    other message types are dropped silently

  106. Ge0rG

    You should send back errors, that helps kicking out zombies from MUCs

  107. zinid

    for groupchat?

  108. zinid

    or both groupchat and headline?

  109. Ge0rG

    It shouldn't hurt for all of them

  110. Ge0rG

    Except error of course

  111. zinid

    I'm not sure, the last rules were written by Holger

  112. zinid

    I think he did that on purpose

  113. zinid

    so need to ask him first

  114. Zash

    Can we take a moment to complain about Github sending markdown as "text/plain"

  115. Ge0rG

    He changed back normal rerouting. It was disabled for a short time and people complained

  116. Ge0rG

    Zash: stop derailing

  117. Zash

    Aw

  118. zinid

    ah, groupchats are bounced indeed

  119. zinid

    only headlines are dropped

  120. zinid

    wonderful

  121. Ge0rG

    Good enough

  122. Zash

    Did ejabberd drop the thing where it expects the receiving server to fork PEP notifications?

  123. zinid

    Zash: no idea :) I never wrote routing rules for ejabberd :)

  124. Zash

    Or was it that it expected the receiving server to filter?

  125. Zash

    Sending to the bare jid and having the receiver fork and apply filters would have been neat, if negotiated.

  126. zinid

    yes, ejabberd expected remote servers to filter peps, but we was severely blamed for this and removed it

  127. zinid

    but I still think it's much better idea than collecting caps from whole world

  128. pep.

    Zash> TL;DR full jid messages to an non-existent resource are treated exactly as bare jid messages < that breaks biboumi direct messages iiuc :(

  129. pep.

    But maybe I should see first why it doesn't get a unavailable presence

  130. Zash

    pep.: my opinion on that is that IRC and XMPP bridges are inherently impossible to get right.

  131. zinid

    Zash: that's a problem with all gateways, that's why I stopped fiddling with them

  132. pep.

    Well here proosdy is not following the spec, or did I get that right?

  133. pep.

    Well here proosdy is not following the spec, or did I get that wrong?

  134. pep.

    Well here prosody is not following the spec, or did I get that wrong?

  135. Zash

    Uh, to many contexts at the same time

  136. Zash

    But those are chat messages, correct?

  137. pep.

    yes

  138. Zash

    And chat messages to a non-existent full JID are to be sent to any available resource according to the RFC.

  139. pep.

    hmm, ok I got it wrong then

  140. Ge0rG

    pep.: I've changed my comment on #3304 recently

  141. pep.

    I see. So my only hope is for biboumi to catch unavailable presences?

  142. pep.

    From these resources

  143. Ge0rG

    pep.: RACE CONDITIONS!!1!!

  144. pep.

    Why are computers borken like that :(

  145. Ge0rG

    Because they consist of a dozen abstraction layers piled up on a little brick of sand

  146. zinid

    Tons of legacy crap

  147. zinid

    Tcp, ipv4, and so on

  148. jonasw

    so much for poezio reconnecting

  149. Guus

    dwd, not in open_chat?

  150. Guus

    (I've asked a _very_ intelligent question there)

  151. Testinator

    -certinfo muc.xmpp.org

  152. Bunneh

    Testinator: muc.xmpp.org has an untrusted certificate that expired 13 hours and 42 minutes ago issued by Let's Encrypt Authority X3

  153. Testinator

    Ping intosi, other iteam people. Cert alert!

  154. Guus

    other iteam people: please educate me

  155. Holger

    zinid: Our routing rules should be fully 6121-compliant by now, with the one exception that type=normal messages to an unavailable full JID are rerouted rather than bounced.

  156. Holger

    zinid: We had one release that bounced them as per 6121, users went nuts so we reverted this.

  157. zinid

    Holger: got it

  158. Holger

    FWIW, I don't get the "opt in" part here either: "(b) deliver the message to all of the non-negative resources that have opted in to receive chat messages."

  159. Holger

    If it was just about non-negative priority then the "opt in" part of the sentence is totally redundant?

  160. Holger

    Whatever.

  161. Holger

    > Most of those problems are actually avoided by only carboning type=chat or ( type=normal with body ) Nah, this goes wrong in many places.

  162. zinid

    Holger woke up :D

  163. Holger

    :-)

  164. Holger

    Regarding XMPP 2.0 (or what's it called?), it's not important but I would find it most intuitive if all messages to bare JIDs were forked (regardless of type) and all messages to full JIDs aren't. I.e. the bare JID addresses the account, the full JID the client.

  165. waqas

    I think we should skip 2.0, and move on to 3.0 directly.

  166. zinid

    3.0 is matrix?

  167. zinid

    so we should skip to 4.0

  168. Holger

    This will only replace carbons if outgoing messages are also forked, of course.

  169. Holger

    XMPP 17.10.

  170. SamWhited

    3.0 is we get rid of the RFCs and just declare that everything is pubsub!

  171. waqas

    SamWhited: But pubsub isn't turing complete…

  172. zinid

    we need to use blockchain to be modern enough

  173. waqas

    Aware of Ethereum smart contracts?

  174. zinid

    those with 200Gb ledgers?

  175. zinid

    great technology

  176. SamWhited

    You're forgetting, storage space and RAM are free and infinite. My computer science education told me so.

  177. Ge0rG

    Let's rewrite xmpp as a Turing machine

  178. SamWhited

    Also the entire world has 10 gig internet connections. These are facts that modern technologists know.

  179. SamWhited

    Ge0rG: with actual physical tape!

  180. Ge0rG

    SamWhited: gaffer tape?

  181. Ge0rG

    To make the messages stick!

  182. zinid

    SamWhited: I'm reading at the moment the paper where they achieved a great performance of blockchain within 100 nodes :D Cutting edge science

  183. Ge0rG

    The B in blockchain is for bullshit...

  184. Zash

    Holger, department of redundancy department indeed

  185. Zash

    And let's skip to XMPP 2000

  186. zinid

    didn't we pass this already?

  187. zinid

    the current state is ICQ2001b

  188. Zash is catching up

  189. Zash

    -certinfo muc.xmpp.org

  190. Bunneh

    Zash: Host unreachable: remote-server-not-found

  191. Ge0rG

    How is that possible?

  192. Ge0rG

    Ah, trailing whitespace