jdev - 2024-05-16


  1. Victorious

    moparisthebest: Can you now please explain to me, why text parsing is more efficient than working with binary data?

  2. singpolyma

    It often is not

  3. Victorious

    ikr

  4. moparisthebest

    Victorious: there's a few things, one is the "text is wasteful in terms of bandwidth" when in actuality it takes the same bandwidth to send 1 byte or 1000 bytes over the internet where MTU is always 1500

  5. Victorious

    >when in actuality it takes the same bandwidth to send 1 byte or 1000 bytes over the internet where MTU is always 1500 you can always send a few messages together

  6. Victorious

    message in more broad meaning, that includes service-related stuff

  7. moparisthebest

    Sure, in both cases. now come up with a binary encoding as eXtensible as XML but that's smaller than XMPP with compression, I'll wait

  8. moparisthebest

    EXI is an existing attempt at this that virtually no one has bothered adopting because it doesn't matter in the real world

  9. Victorious

    >now come up with a binary encoding as eXtensible as XML why some chat protocol needs that level of extensibility?

  10. Victorious

    moparisthebest: if there are no more arguments, I'll leave

  11. singpolyma

    Victorious: seems like you just came here to pick a fight

  12. Victorious

    singpolyma: I was invited here to continue one discussion, nothing more.

  13. moparisthebest

    Victorious: XMPP is not a "chat protocol"

  14. singpolyma

    Binary isn't a magic bullet, but sure if the only thing you care about is efficiency of size or decode speed then a bespoke packed binary will always be best at those things

  15. Victorious

    moparisthebest: in other chat we were talking about chat protocols, xmpp was just mentioned.

  16. moparisthebest

    Regardless, even in chat only uses, it's obvious it needs that eXtensiblity by... All the extensions? And everything not-xmpp attempting to poorly recreate it, see: matrix, IRCv3 etc etc

  17. singpolyma

    Luckily matrix and IRC are also text so not relevant 😉

  18. Victorious

    singpolyma: yeah, thats my point. But binary protocols are harder to design :(

  19. moparisthebest

    To clarify, XMPP is not only for chat

  20. singpolyma

    Victorious: I would never suggest bespoke packed binary for a standardized protocol

  21. Victorious

    singpolyma: what extensions? I'm not a xmpp user

  22. moparisthebest

    XMPP has a binary only protocol named EXI if that's what you want, but in the real world, not much use

  23. Victorious

    sorry, that message was for moparisthebest

  24. singpolyma

    Well, EXI isn't xmpp related, but xmpp implementations with very specific needs could use it

  25. moparisthebest

    https://xmpp.org/extensions/

  26. moparisthebest

    EXI is https://xmpp.org/extensions/xep-0322.html

  27. Victorious

    sigh, now I need to waste my time on yet-another-protocol and its extensions just for a quick discussion

  28. singpolyma

    moparisthebest: if we required everything to go via the XSF we could have packed binary that we extended sanely. But it's very hard to do ad-hoc extension, which I would argue is important at internet scale

  29. Victorious

    >https://xmpp.org/extensions/ no wonder xmpp isn't widespread

  30. Victorious

    there is like six gorillion extensions

  31. singpolyma

    >>https://xmpp.org/extensions/ > > no wonder xmpp isn't widespread Hmm. It is widespread actually? Not sure what you mean

  32. Victorious

    (some of which can be realized client-side)

  33. singpolyma

    No one cares about that extensions list just ignore moparisthebest 😛

  34. Victorious

    >Hmm. It is widespread actually? Not sure what you mean maybe, as I've said - I'm not a xmpp person.

  35. singpolyma

    In the end the reason almost every internet protocol is text is to make debugging easier, honestly

  36. Victorious

    as for extensions: properly designed protocol may escape the need for them

  37. Victorious

    yeah, its just easier to understand but for machines its harder to process

  38. singpolyma

    And yes, most internet protocols also support ad hox extensibility because we can never assume to have thought of every use case someone might have

  39. singpolyma

    > yeah, its just easier to understand > > but for machines its harder to process Not enough harder to matter in 99% of cases though. Which is why its so popular

  40. wgreenhouse

    binary protocols have to be incompatibly redone whenever the schema changes a little. a design like xmpp's avoids that

  41. Victorious

    >And yes, most internet protocols also support ad hox extensibility because we can never assume to have thought of every use case someone might have Agree. But in modern age it isn't hard to ignore unsupported features (like telegram client does) and it's not hard to break compatibility

  42. wgreenhouse

    graceful degradation is a desirable feature

  43. singpolyma

    wgreenhouse: well, you can have extensible binary just fine. But not at hoc extensible, at least not well

  44. singpolyma

    wgreenhouse: well, you can have extensible binary just fine. But not ad hoc extensible, at least not well

  45. Victorious

    >binary protocols have to be incompatibly redone whenever the schema changes a little that depends on the protocol design if its designed for maximum efficiency, it will be hard to maintain compatibility without bit/byte sacrifices

  46. singpolyma

    I honestly don't know if there are any standardized, widespread, binary internet protocols

  47. singpolyma

    In the 80s even we were using text protocols already

  48. Victorious

    QUIC

  49. singpolyma

    > QUIC Sorry, I meant layer7. Obviously tcp ip itself is binary

  50. Victorious

    quic is also replacement for text-based http

  51. wgreenhouse

    there is xmpp over quic

  52. Victorious

    xmpp is still based on xml, so it doesnt matter what transport protocol is being used

  53. singpolyma

    > quic is also replacement for text-based http Oh you mean http3? Pretty sure it still allows arbitrary headers...

  54. Victorious

    >Oh you mean http3? Pretty sure it still allows arbitrary headers... yeah, and binary-based chat protocols also carry text messages

  55. singpolyma

    Sure, but with http the verb and headers are the protocol... So if they're both still text I don't know how it's not a text protocol? I guess you no longer have to split on colon, perhaps a small win there at scale

  56. pulkomandy

    Xmpp is a bit higher level than http I think. And instant messaging is changing a lot over the years (threads, message reactions are some examples tht come to mind, but this happens all the time). So that explains why a very flexible protocol is needed, and with xml namespaces this is easy to do. With a binary protocol you need a registrar to allocate identifier numbers, and then people don't fill in the proper paperwork and pick whatever number they think is unused

  57. pulkomandy

    If in your case you think you don't have this specific problem, sure, you can try a binary protocol. You will surely occasionally need to replace it with an incompatible version, but that can also be acceptable in some usages

  58. Victorious

    >With a binary protocol you need a registrar to allocate identifier numbers pulkomandy: There is no need for a registrar, just use a header or version of protocol. There is no registrar for binary file formats!

  59. pulkomandy

    There is, for example for iff chunks or png chunks

  60. Victorious

    good point, but there is no internet police that will imprison a person that makes a new binary protocol

  61. pulkomandy

    But again this really depends on your needs. In xmpp it is really about having several independant extensions, and each client or server can pick what it needs and ignore the rest. This works well for xmpp, maybe not so well in other places

  62. pulkomandy

    No, but if you want several apps to talk with each other, you have to set some rules. And if the rules are "I made a new version of the protocol and all old apps are incompatible with it", it seems not great?

  63. Victorious

    I agree with you, but that sometimes happens. Clients/servers need upgrades, e.g. for security reasons. It shouldn't be a problem.

  64. moparisthebest

    > as for extensions: properly designed protocol may escape the need for them Lol no, exactly the opposite

  65. singpolyma

    I mean, sometimes the XMPP community acts as though ad hoc extensability is bad, wanting everything to be a xep and only to use the urn:xmpp namespace. But I personally think it's important and am glad we have it

  66. Victorious

    >Lol no, exactly the opposite can you explain? the way I see it, perfect chat protocol should just pass messages, it must care only about some very basic things, rest is up to a client and server software

  67. singpolyma

    Victorious: if everything iskup to the client anhid server that's exactly when you need ad hoc extensibility

  68. singpolyma

    So the client and server can safely make stuff up that don't clash with each other

  69. Victorious

    singpolyma: I guess a protocol version should be enough.

  70. Victorious

    tbh I think I need to start drafting something binary - then I'll have more to share with you

  71. singpolyma

    If you have a protocol version only then the client and server can't make stuff up and everything must be in the protocol

  72. pulkomandy

    It's not just about passing the data around. The client also needs to know how to present the data to the user. And in xmpp, the server also does more than passing data around. You can query history for a chat room, upload files, do audio/video chats, store stuffon the server and query it (for example, your contact list)

  73. pulkomandy

    So it's not just about the protocol. Sure, it's easy to define something like mqtt, at the protocol level this is binary and doesn't need extensions. But then, it's just a wire protocol, and you can't do much more with it. And so you will have the extensibility in the layers above it

  74. pulkomandy

    And more layers means more complexity and overhead, usually

  75. rion

    ... copy paste from xsf@ ... Hi. A question about avatar conversion (xep-398). What's going to happen if I publish my vcard without photo? Will it reset avatar in pubsub? XEP says "A service MAY support conversion from vCard to PEP in order to display avatars in clients that only support XEP-0084.". I assume it means if two clients are connected (one publishing vcard and second one supporting just xep-84, then the second one MAY receive pubsub update). and that's all. From other side the xep insist all the control to be done via pubsub. So it's no clear should I always add an avatar to the publishing vcard or not.

  76. moparisthebest

    Victorious: note XMPP isn't a "protocol used only for chat" or "between a client and a server" , it's a federated message passing protocol meaning it's between clients and servers and also between servers and other servers, if you try to invent your own, you'll reinvent XMPP, it's inevitable and repeats itself every so often That's why most of the world just uses XMPP...