XSF Discussion - 2020-04-12


  1. xcoder

    Hello!

  2. xcoder

    Anyone here ?

  3. xcoder

    Why response in XML ?

  4. xcoder

    Why not JSON ?

  5. xcoder

    Is XML faster than JSON !

  6. eta

    xcoder: they're about equal!

  7. eta

    xcoder: read https://xmpp.org/about/myths.html

  8. xcoder

    Not equal !

  9. xcoder

    JSON is easy to read , delivered fast than xml.

  10. eta

    those are both subjective, arbitrary metrics

  11. j.r

    > JSON is easy to read Modern hypster webdev in a nutshell...

  12. eta

    j.r: quite :p

  13. xcoder

    Which one you would use in a project ?

  14. Zash

    > hypster Haha, amazing word

  15. xcoder

    😛

  16. xcoder

    This is not my question btw.

  17. xcoder

    I asked why xmpp server using xml in response ?

  18. pep.

    Because that's how XMPP is specified?

  19. xcoder

    I trace the the response using console.

  20. j.r

    If you have a bit more complex (nested) stuff JSON becomes really bad to read in my eyes... but yeah it's subjective

  21. eta

    xcoder: well XMPP is much older than modern JSON-using applications

  22. eta

    s/applications/protocols/

  23. eta

    it's also naturally extensible (via namespaces), which has allowed the protocol to adapt

  24. xcoder

    I read an article about xmpp, "Whatsapp using ir".

  25. xcoder

    Is that right ?

  26. eta

    (if you think JSON is also extensible, look at the tire fire that is JSON-LD)

  27. Zash

    WhatsApp is based on XMPP with a custom compression scheme.

  28. Zash

    Zoom is also based on XMPP. And Google Talk, and LoL, and lots of things.

  29. eta

    (and Jitsi Meet)

  30. xcoder

    Also i see a request repeated after 10 s to get the updates, what makes it different form normal setInterval !

  31. pep.

    what?

  32. Zash

    Are you looking at the BOSH requests?

  33. xcoder

    Yes :V

  34. Zash

    It's using long-polling

  35. eta

    Zash: (does BOSH use lo---

  36. eta

    snap

  37. xcoder

    I know.

  38. xcoder

    Any communication application using long polling to get the updates the difference is the method.

  39. xcoder

    What i noticed , is there no lag.

  40. xcoder

    Normal SetInterval makes lag after some minutes of initialization.

  41. Zash

    Because the long-polling. The request isn't answererd until there's something new.

  42. Zash

    (or a timeout, in which case it does another request)

  43. pep.

    xcoder, pulling at predefined intervals wouldn't be able to get payloads faster or slower as necessary

  44. pep.

    xcoder, pulling at predefined intervals wouldn't allow to get payloads faster or slower as necessary

  45. Zash

    It could also use websockets. Or plain TCP.

  46. xcoder

    Which is more preferable [sockets - setinterval]

  47. pep.

    setInterval has nothing to do with protocol, that's a JS function

  48. xcoder

    I'm a web developer.

  49. pep.

    Surely you could use that to implement some really bad long-polling

  50. Zash

    There was "normal" polling back one billion years ago, but I don't think anyting uses that anymore.

  51. xcoder

    Sockets can consume more memory ?

  52. xcoder

    I never tried sockets so i can't judge it.

  53. xcoder

    I'm asking if anyone has the experience.

  54. Zash

    BOSH consumes more bandwidth, since you can't idle for very long before doing another connection, also more overhead with HTTP headercs and stuff.

  55. Zash

    But BOSH is also more tolerant of network issues, IP address changes, or navigation to different web page.

  56. Zash

    Desktop applications would use normal TCP sockets. Probably similar to websockets in overhead and stuff.

  57. xcoder

    So what's the recommended resources if i want to build large chat system [text - audio - video]

  58. Zash

    Hire a large team of experts.

  59. xcoder

    "Resources" not experts.

  60. Zash

    Human Resources :P

  61. xcoder

    I already developed many chat system, but not high traffic.

  62. Guus

    Don't reinvent the wheel, use one of the many available implementations.

  63. Guus

    That saves you a lot of resources

  64. xcoder

    I'm asking what is the "infrastructure" that whatsapp,imo,telegram are using.

  65. Zash

    https://xmpp.org/uses/instant-messaging.html and https://xmpp.org/uses/webrtc.html of any use?

  66. pep.

    And don't forget to contribute back

  67. pep.

    And don't "forget" to contribute back

  68. Zash

    IIRC whatsapp was using a heavily customised ejabberd in the beginning, no idea what they're doing now

  69. Guus

    xcoder: to get started, install one of the freely available xmpp servers, and a client of choice. If you're into web, start with a web client like Converse.

  70. Guus

    If you are things in action, you can learn how to adapt things to your needs.

  71. Guus

    That gives you a pragmatic approach, that you can actually see do something.

  72. xcoder

    Zash thanks for the link.

  73. xcoder

    Guus, Yes i will use one of these servers just a start.

  74. vanitasvitae

    xcoder: if you think about implementing some feature, take a look at the wide range of existing protocol extensions before doing your own thing 😃

  75. xcoder

    Are you ios developer ?

  76. vanitasvitae

    xcoder: luckily not :P

  77. xcoder

    😒