-
xcoder
Hello!
-
xcoder
Anyone here ?
-
xcoder
Why response in XML ?
-
xcoder
Why not JSON ?
-
xcoder
Is XML faster than JSON !
-
eta
xcoder: they're about equal!
-
eta
xcoder: read https://xmpp.org/about/myths.html
-
xcoder
Not equal !
-
xcoder
JSON is easy to read , delivered fast than xml.
-
eta
those are both subjective, arbitrary metrics
-
j.r
> JSON is easy to read Modern hypster webdev in a nutshell...
-
eta
j.r: quite :p
-
xcoder
Which one you would use in a project ?
-
Zash
> hypster Haha, amazing word
-
xcoder
😛
-
xcoder
This is not my question btw.
-
xcoder
I asked why xmpp server using xml in response ?
-
pep.
Because that's how XMPP is specified?
-
xcoder
I trace the the response using console.
-
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
-
eta
xcoder: well XMPP is much older than modern JSON-using applications
-
eta
s/applications/protocols/
-
eta
it's also naturally extensible (via namespaces), which has allowed the protocol to adapt
-
xcoder
I read an article about xmpp, "Whatsapp using ir".
-
xcoder
Is that right ?
-
eta
(if you think JSON is also extensible, look at the tire fire that is JSON-LD)
-
Zash
WhatsApp is based on XMPP with a custom compression scheme.
-
Zash
Zoom is also based on XMPP. And Google Talk, and LoL, and lots of things.
-
eta
(and Jitsi Meet)
-
xcoder
Also i see a request repeated after 10 s to get the updates, what makes it different form normal setInterval !
-
pep.
what?
-
Zash
Are you looking at the BOSH requests?
-
xcoder
Yes :V
-
Zash
It's using long-polling
-
eta
Zash: (does BOSH use lo---
-
eta
snap
-
xcoder
I know.
-
xcoder
Any communication application using long polling to get the updates the difference is the method.
-
xcoder
What i noticed , is there no lag.
-
xcoder
Normal SetInterval makes lag after some minutes of initialization.
-
Zash
Because the long-polling. The request isn't answererd until there's something new.
-
Zash
(or a timeout, in which case it does another request)
-
pep.
xcoder, pulling at predefined intervals wouldn't be able to get payloads faster or slower as necessary✎ -
pep.
xcoder, pulling at predefined intervals wouldn't allow to get payloads faster or slower as necessary ✏
-
Zash
It could also use websockets. Or plain TCP.
-
xcoder
Which is more preferable [sockets - setinterval]
-
pep.
setInterval has nothing to do with protocol, that's a JS function
-
xcoder
I'm a web developer.
-
pep.
Surely you could use that to implement some really bad long-polling
-
Zash
There was "normal" polling back one billion years ago, but I don't think anyting uses that anymore.
-
xcoder
Sockets can consume more memory ?
-
xcoder
I never tried sockets so i can't judge it.
-
xcoder
I'm asking if anyone has the experience.
-
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.
-
Zash
But BOSH is also more tolerant of network issues, IP address changes, or navigation to different web page.
-
Zash
Desktop applications would use normal TCP sockets. Probably similar to websockets in overhead and stuff.
-
xcoder
So what's the recommended resources if i want to build large chat system [text - audio - video]
-
Zash
Hire a large team of experts.
-
xcoder
"Resources" not experts.
-
Zash
Human Resources :P
-
xcoder
I already developed many chat system, but not high traffic.
-
Guus
Don't reinvent the wheel, use one of the many available implementations.
-
Guus
That saves you a lot of resources
-
xcoder
I'm asking what is the "infrastructure" that whatsapp,imo,telegram are using.
-
Zash
https://xmpp.org/uses/instant-messaging.html and https://xmpp.org/uses/webrtc.html of any use?
-
pep.
And don't forget to contribute back✎ -
pep.
And don't "forget" to contribute back ✏
-
Zash
IIRC whatsapp was using a heavily customised ejabberd in the beginning, no idea what they're doing now
-
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.
-
Guus
If you are things in action, you can learn how to adapt things to your needs.
-
Guus
That gives you a pragmatic approach, that you can actually see do something.
-
xcoder
Zash thanks for the link.
-
xcoder
Guus, Yes i will use one of these servers just a start.
-
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 😃
-
xcoder
Are you ios developer ?
-
vanitasvitae
xcoder: luckily not :P
-
xcoder
😒