jdev - 2024-08-06


  1. gideon

    I intend to apply to join the XSF this year and would like a wiki account. Name: Gideon White Username: GideonW Email: gideon@purelymail.com JID: gideon@xmpp.earth Any other info I need to provide for the account?

  2. Guus

    gideon: ah, good to see new people join! I have created an account for you on the wiki. You should have received an email with a temporary password. That is all you need to create a membership application.

  3. Guus

    You probably want to add it to https://wiki.xmpp.org/web/Membership_Applications_Q3_2024

  4. edhelas

    One small question, on connect, are you displaying a notification for all the roster items that are in ask="suscribe" ? Or just listing them as the other roster elements ?

  5. MattJ

    Don't display a notification (as in a pop-up one), but do display them somewhere of course

  6. jonas’

    what is the "latest" or "most advanced" stage where a stream reset would occur in XMPP?

  7. jonas’

    is there any case where you would reset a stream after having exchanged a stanza (message/iq/presence)?

  8. singpolyma

    I don't think so

  9. dwd

    Weeeeell... Technically, XEP-0138 doesn't specify when compression is negotiated, so in principle it could be after stanzas have been exchanged. But, XEP-0138 is out of fashion (because of the SeCuRiTy!!!) and even when it wasn't, it was usually done just after authentication (see XEP-0170). I'm assuming we're not counting XEP-0077, though, because that can occur quite early, and before SASL for one thing.

  10. Zash

    dwd, but, the real reason was the exessive memory usage compression added on servers :)

  11. Zash

    (one of the reasons it's hard to motivate bringing back compression at least)

  12. moparisthebest

    Hmm, would it still if servers never kept any per-stream compression state laying around?

  13. Zash

    You mean, using a stanza framing layer? For me, equally unlikely to be something I do.

  14. dwd

    Somewhere I might have my notes on compression memory usage, but a naive implementation got something around 5-10% higher compression at a cost of 300-400% of the memory usage. But yeah, compression isn't very interesting in most cases. And when it is interesting, it's often an S2S case.

  15. singpolyma

    why not interesting in c2s? that's where all the bandwidth constrained devices are

  16. Zash

    If anything, I might be interested in compressing pending CSI-held stanzas, that's megabytes for me due to all the MUCs I am in

  17. singpolyma

    that could be fun. compression but only with csi

  18. Zash

    And that would not be externally visible

  19. Zash

    Just compress data into a buffer, decompress when sending.

  20. singpolyma

    or send the compressed buffer and save both sides that pain

  21. Zash

    Or the inevitable moving of that buffer into persistent storage ... :(

  22. moparisthebest

    > You mean, using a stanza framing layer? For me, equally unlikely to be something I do. Zash: no I mean the vulnerability was sharing compression context across stanzas, the fix is not to do that, which probably drops memory use

  23. Zash

    So doing a full flush? I think there were experiments on that, I don't remember what the effects on memory use were, only that compression ratio went to like 50% or something

  24. Zash

    It still kept some compression context so I am not sure it was a clear win for 50% bytes sent

  25. moparisthebest

    With zstd and a dictionary tuned for XMPP?

  26. moparisthebest

    I still need to try it... I imagine it performs pretty well

  27. Zash

    I don't think zstd existed and IIRC someone pointed out that you can't actually tune a dictionary that way

  28. moparisthebest

    What do you mean? Zstd explicitly supports training and using a shared dictionary

  29. Zash

    I don't remember who said it where, but the point was that it didn't work the way we would need it to. Maybe that was wrong. I never got through the Zstd C library to the point of writing a Lua binding anyway, so it was of no use to me. I only remember that it was very complicated.

  30. Zash

    Okay if I'm reading some words from somewhere¹ correctly, dictionaries work as I think they do, i.e. just like if you were to insert a prefix before your content. So if you then compress a stanza and do a full flush of the state, the dictionary would also be lost and you would start from zero. ¹https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary-format

  31. Zash

    Unless you go and compress each stanza in a fresh state unitialized with a dictionary, and then you would need some framing to know where boundaries are.

  32. Zash

    Unless you go and compress each stanza in a fresh state initialized with a dictionary, and then you would need some framing to know where boundaries are.

  33. moparisthebest

    You already split stanzas on boundaries to route them, same boundaries for clearing compressor state?

  34. Zash

    Sigh. No.

  35. Zash

    I was talking about the compressed data, not an XML stream.

  36. moparisthebest

    Oh, on the recieving end, if needed you can put framing there but not sure if it's needed yet

  37. Zash

    Anyway, all that's way past the point where I ran out of energy and motivation.

  38. moparisthebest

    As a quick test on the command line I seperately compressed 3 different text files, cat *.txt.zst > all.zst, and it successfully decompresses to the same as cat *.txt

  39. moparisthebest

    Which probably means it has a header/framing of some sort built in to the format