XSF Discussion - 2018-11-06


  1. Ge0rG

    lovetox: I'm not sure if there are situations where Gajim is using an ID generated by another entity, like e.g. Last message correction (where it's not a security problem, but to illustrate the attack channel)

  2. Ge0rG

    What's the official way to talk to iteam?

  3. Ge0rG

    I'd like to get https://www.mediawiki.org/wiki/Extension:MobileFrontend installed/enabled on our wiki

  4. jonas’

    join iteam muc

  5. Seve

    I still don't receive emails from the members list. Can somebody double check, please?

  6. Seve

    I'm not sure if my new email address was added.

  7. Alex

    Seve: which email address? i can check

  8. Seve

    Alex, seve@delape.net, I used to have my JID the same as my email address before in case you see that still there

  9. Alex

    Seve: its there, but sais `nomail, reason B`

  10. Alex

    looks like you have disabled it once. I can revert he checkbox

  11. Alex

    you also maybe alble to congigure it here yourself here: https://mail.jabber.org/mailman/admin/members/ or send commands to the list. Just let me know what you prefer

  12. Seve

    That's weird... Yes please do, Alex. Very appreciated!

  13. Alex

    resetted, I think you should be good now

  14. Seve

    Alex: thank you!

  15. Seve

    Alex, I have no password to edit it myself. I tried to see if I could ask for a new password and it says `Your subscription request has been received, and will soon be acted upon.` I wonder if that has some relation to it?

  16. Alex

    Seve: lets see if you get new messages to the list. If not then please contact me again and we try to figure it out. To me it looks all good now.

  17. Seve

    Sure, Alex. Thank you very much for your time, I will let you know :)

  18. jonas’

    in-band bytestreams. is there a way to close an IBB with an error?

  19. jonas’

    in-band bytestreams. is there a way to close an IBB with an error while the peer is *not* sending to you?

  20. Ge0rG

    jonas’: remember the last incoming message id?

  21. flow

    jonas’, can't you always send a session-terminate (if we are talking Jingle based IBB)?

  22. jonas’

    flow, no, plain IBB

  23. Link Mauve

    jonas’, AFAIK you can’t even do that if they’re sending to you, since they could use the <message/> transport.

  24. MattJ

    <message type='error' id='...'>

  25. Ge0rG

    Speaking of which, can we get error messages stored in offline storage, because Carbons and multi client?

  26. MattJ

    Yes

  27. Ge0rG

    MattJ: In prosody 0.10?

  28. MattJ

    "LOL"

  29. Holger

    Ge0rG: You mean in MAM?

  30. Ge0rG

    Holger: MAM is not needed if you have per device offline storage queues

  31. Holger

    Hah.

  32. Holger

    Why proper solutions if we can have ugly hacks!

  33. Ge0rG

    And my evil secret plan is to defer implementing MAM in yaxim (and annoying MattJ with message loss) until he gives up and finishes client tracking

  34. Ge0rG

    Holger: MAM is an ugly hack.

  35. Holger

    How do you handle outgoing messages with offline storage? Wait whether the client enables carbons and then push them out?

  36. Holger

    How do you do paging?

  37. jonas’

    different use-cases

  38. Holger

    Hm?

  39. jonas’

    although

  40. jonas’

    ignore me, I want to see how this plays out

  41. Ge0rG

    Holger: how do you handle sync of messages between MAM and offline? Just drop all offline messages before sending presence?

  42. Holger

    That's what Conversations does, the alternative is de-dup, obviously.

  43. Holger

    Whatever that has to do with my question.

  44. Holger

    I think MAM becomes problematic to implement if you *don't* want full-sync. If you do, like you'd get with per-device offline storage, it's trivial. I don't get why you wouldn't just want to implement this.

  45. Ge0rG

    Holger: MAM is *also* a dirty hack. Is it better now?

  46. Holger

    Ok, so that's go for a worse hack instead.

  47. Ge0rG

    Holger: because it's complicated with my current code base

  48. Ge0rG

    Holger: MAM is the worse hack.

  49. Holger

    Why?

  50. Ge0rG

    Actually sending out Carbons from offline is a I nice idea

  51. Holger

    Haha.

  52. Ge0rG

    Holger: it's full of race conditions!

  53. Holger

    For example?

  54. Ge0rG

    You don't need paging if you do full sync.

  55. Ge0rG

    Holger: between querying MAM and dropping offline history

  56. Zash

    It's dirty hacks all the way down to the silicon

  57. Ge0rG

    Holger: also between completing your MAM sync and receiving first live messages

  58. jonas’

    Ge0rG, isn’t bind2 there to solve all those races?

  59. Ge0rG

    jonas’: yes

  60. jonas’

    purge offline, enable carbons, give you the id of the last stanza in MAM

  61. Ge0rG

    jonas’: also magically enable / resume SM

  62. Holger

    Until we have that, de-dup should be trivial using stanza-IDs.

  63. Ge0rG

    Holger: you mean unique ids?

  64. Ge0rG

    Will MAM inject ids into offline storage?

  65. Holger

    mam:2 guarantees that, yes.

  66. daniel

    Fwiw Conversations would handle the dedup just fine. But I don't like the extra traffic

  67. Ge0rG

    But if you just drop offline history, you'll get message loss if your MAM is "contacts only"

  68. Holger

    Yes, I don't know why we offer that option.

  69. daniel

    Yep

  70. Ge0rG

    And dropping before MAM sync is lossy

  71. daniel

    Or disabled

  72. Holger

    You get even more message loss if MAM is disabled.

  73. Holger

    Right.

  74. daniel

    I'd like the mam preference to be announced in disco

  75. daniel

    That could help circumvent that problem

  76. Ge0rG

    daniel: you drop offline history if MAM is disabled???

  77. Holger

    I'd like to see the "contacts only" option ditched.

  78. daniel

    Ge0rG: yes

  79. Ge0rG

    daniel: ...

  80. Holger

    > You don't need paging if you do full sync. You might need it for traffic throtting. Otherwise the server will flood you with messages and if you're not fast enough with acknowledging it, you'll exceed 0198 queue size limits and the server will kill your connection.

  81. Holger

    *throttling

  82. Holger

    I open yaxim once in a few weeks, it would become unusable if I implemented that thing.

  83. jonas’

    Holger, FWIW, Conversations *is* unusable when you open it only once in a few weeks.

  84. Zash

    and Gajim

  85. jonas’

    or even once a week

  86. jonas’

    I plan for like one hour or maybe two for it to sync when I haven’t used it for a week

  87. Holger

    jonas': Hm no I didn't run into that.

  88. jonas’

    maybe it’s just me or my device?

  89. jonas’

    ever since that full text search index each message takes like 0.5s to process

  90. jonas’

    you can do the math with a few public MAM’d MUCs.

  91. Link Mauve

    Zash, Gajim fixed that (for public MUCs only) in their latest release from today.

  92. jonas’

    it’s terrible in any case.

  93. Zash

    Link Mauve: By some random coincidence, I can't start Gajim anymore

  94. Ge0rG

    XMPP is terrible.

  95. Ge0rG &

  96. jonas’

    fg

  97. Link Mauve

    That may be related, you should report this bug at gajim@conference.gajim.org.

  98. Link Mauve

    Maybe they’ll do a 1.1.1 fixing it.

  99. Zash

    I think it's some Python search path thing

  100. lovetox

    yes the user can set a threshold now for public mucs how much gets synced

  101. lovetox

    and the default is 1 day, if you join 20 mucs, you still can expect around 30 seconds until everything is joined and everything is synced

  102. lovetox

    problem is, you absolutly have to sync everything at start with MUC

  103. lovetox

    otherwise you just plain accept not delivering messages to your user that he might want to read

  104. lovetox

    im not seeing how we can optimize that in any way

  105. daniel

    The problem is that 1 day is pretty random. On some days you just have one message in the last 24h on some days you have 1000

  106. daniel

    I'm considering - for public mucs - to just ditch the entire history instead

  107. daniel

    Then normal backlog scrolling works as intended

  108. daniel

    Instead of trying to fill gaps or what ever

  109. daniel

    But nothing is ideal. There is no good solution

  110. lovetox

    so not storing messages in public muc to db, and making it completly load on demand

  111. daniel

    Yes

  112. lovetox

    yes the only way back scrolling can work i think

  113. daniel

    *in public with mam

  114. lovetox

    but this is probably acceptable for a mobile client, but if i do this in Gajim people will scream

  115. daniel

    Why?

  116. lovetox

    they have there 200 MB "i have logs back to 1990" dbs

  117. lovetox

    and want to search them

  118. lovetox

    but yeah indeed nothing speaks against making it default not storing, and if a user wishes he can store for some mucs

  119. lovetox

    but then no backscrolling there

  120. lovetox

    maybe thats a good solution for both worlds

  121. daniel

    Yeah I haven't thought this all the way through yet. It's just that idea I'm having

  122. daniel

    Especially for mobile and like short outages you might still want to have a local history

  123. daniel

    But certainly not catch up with a week or so

  124. lovetox

    and the whole backscrolling thing can get pretty easy if client devs could depend on the server using sequential mam ids

  125. lovetox

    then its trivial to fill a whole

  126. lovetox

    i still think whatever reason that was why this was dismissed in the XEP, was not worth it at all

  127. lovetox

    but mam exists a long time now, maybe we should ask around, and if there is no implementation that depends on mam ids not beeing sequential (because they technically can not do it) then just ditch this, there is no need for something that limiting us, that nobody plans to use anyway

  128. daniel

    It's complicated on a database level

  129. daniel

    Either pretty expensive or impossible in clusters

  130. lovetox

    hm doubt it seriously :D

  131. lovetox

    its just that it would be probably considerable more work to make it so

  132. lovetox

    but then again, where are these clusters, are we writing xeps for that one provider in X years that sets up a cluster

  133. lovetox

    or for the 1000s who do not

  134. lovetox

    but i guess we had this discussion, the conclusion was, add a disco feature

  135. lovetox

    "sequential-ids"

  136. lovetox

    if i see this i offer back scrolling, if not i dont

  137. Holger

    Well there certainly are clustered setups in practice and I wouldn't want to tell people "sorry XMPP doesn't support this".

  138. lovetox

    is ejabberd not a bad example, as you offer sequential ids :D

  139. Holger

    lovetox: I forgot, you actually need sequential IDs or are increasing IDs (i.e. ejabberd's timestamps) good enough to solve the problem?

  140. daniel

    If the use case is to know the gaps you need sequential and not just increasing

  141. lovetox

    maybe im getting my definitions wrong, but sequential and increasing are not counterpars

  142. Holger

    lovetox: Yeah these days we just ignore the clustering issue because it's somewhat academic in practice. With microsecond timestamps you won't end up with non-unique IDs, or if you ever manage to, then wow you have a message loss/duplicate. This is XMPP after all.

  143. daniel

    And that's complicated even on an single db

  144. daniel

    I mean can you tell me the sql command for insert with id=max(I'd) +1?

  145. Holger

    Don't SQL engines have this built-in? But that'll obviously be expensive on a cluster, yes.

  146. daniel

    I think the bad ones do

  147. Holger

    lovetox: Sequential is 1,2,3,4, incrementing is 1,4,394,1039.

  148. lovetox

    then incrementing is enough

  149. daniel

    But from my understanding you try to avoid this in db design

  150. daniel

    lovetox: how do you find gaps then?

  151. lovetox

    yeah this fixes just the message ordering problem

  152. lovetox

    you still have to track gaps somehow

  153. Zash

    I started writing a thing based on linked lists once

  154. Zash

    So what problem can I solve by tagging each message with the id of the previous message?

  155. Holger

    You solve the same problems and run into the same problems as with sequential IDs, no?

  156. Zash

    Given a bag of unordered messages, you can shuffle them into sequences, no?

  157. Holger

    I guess what you do these days is DAGs, i.e. you can add a merge message that has multiple parents once the cluster notices the conflict. Leave it to clients to cope with it.

  158. lovetox

    the problems we are facing are two fold, 1. have a way to determine where you have a gap in your local storage and fill it efficiently by requesting from mam 2. If you start your client, display all messages in the correct order

  159. lovetox

    2. can be solved by just increasing IDs, or just microtimestamp

  160. flow

    > 1 day is pretty random

  161. flow

    make mam allow query the last N stanzas?

  162. Zash

    flow: ... <before/N>

  163. lovetox

    we can do this already

  164. Zash

    wait no, before="" max=N

  165. Zash

    high resolution timestamps has problems too

  166. Zash

    like like being unavailable from C stdlib

  167. lovetox

    maybe the server can solve 1. for us, what if we have a query i give 2 mam-ids, can the server tell me if there are messages in between?

  168. Zash

    and also having no guarantee of being strictly increasing

  169. flow

    lovetox, then why 1 day and not, say, 100 messages?

  170. lovetox

    Zash its enough if its most unlikely to produce duplicates

  171. lovetox

    i can live with a duplicated timestamp 1 out of a million messages

  172. flow

    Holger, are you talking about Matrix? :)

  173. flow

    but serious, this sounds appealing

  174. Holger

    Zash: The C standard doesn't return the current time at all, no? So you can't implement MAM with it anyway.

  175. lovetox

    flow it can be done, but its not the same thing, last 100 can only be done by backpaging

  176. lovetox

    you get the last 10

  177. lovetox

    then 10 before that etc

  178. Holger

    flow: Yeah Matrix and I think various other distributed DBs are doing it that way.

  179. lovetox

    while from a date, gives you all messages orderd from old to new

  180. Holger

    And all those DCVSes ...

  181. lovetox

    and this is pretty important, because i need the messages sent ordered to me

  182. flow

    lovetox, ahh so MAM is missing a "give me the last N messages starting with the oldest" query?

  183. lovetox

    i dont know if it needs it .. but yes i guess would be nice

  184. flow

    (I think we possibly have been there before)

  185. lovetox

    i more and more think, maybe we dont need this at all, internet gets faster and faster, if i join a muc i show a loading screen and count the messages with a nice UI

  186. Zash

    flow: I don't think MAM is missing query related things like that

  187. lovetox

    so the client needs 30 seconds, if you dont start it a week, so what?

  188. lovetox

    show me an application that does it much better

  189. flow

    Zash, possibly, possibly not

  190. flow

    lovetox, na, that's not what drives me, but I can see why one could be happy with that

  191. Zash

    Fetch the last chunk of messages and show them. Then do the sync thing quietly in the background.

  192. flow

    Zash, fetch using <before/> and max=N?

  193. Zash

    flow: right

  194. lovetox

    i could pull with before say 20 messages, but dont store them to db then sync the db in the background

  195. flow

    Dunno, I think you run in all kinds of oddities with current MAM

  196. lovetox

    but there is no "background"

  197. lovetox

    there is only one connection to the server

  198. lovetox

    and it will be slow to the user if i fetch stuff contstantly

  199. lovetox

    it would be nice to know what the user wants to do and priorities that

  200. lovetox

    but he could switch to any muc instantly and then i need the full stuff there

  201. flow

    lovetox, do small chunks of background sync and pause them once such "high priority" things happen?

  202. lovetox

    and all that seems rather complex, instead of just a loading screen

  203. lovetox

    :D

  204. flow

    or just do small chunks and see if it turns out to be a real issue

  205. flow

    before we are talking about potential solutions for non-issues ;)

  206. lovetox

    joining 20 mucs is also slow if you dont fetch MAM at all

  207. Zash

    It is

  208. flow

    hmm, dunno, my poezio joins the ~15 MUCs reasonably fast I'd say, but YMMV

  209. lovetox

    yeah can you give me a time on that?

  210. lovetox

    just so i have something to compare Gajim with

  211. flow

    lovetox, a few seconds I'd say, but it is really hard to tell as the UI elements are already seen even if the MUC is still in the process of joining

  212. lovetox

    hm other topic, nickname conflicts when joining a muc how do clients handle these

  213. lovetox

    gajim does a popup and the user has to choose another nick

  214. lovetox

    but im thinking i dont want to ask the user anymore and just join with a added "_" or something like that