5 ms·
Indeed. XML itself is nontrivial to parse and the "infinite" extensibility is just overkill for probably 99% of the time I've seen it used, XMPP included. As a
by userbinator 7y ago
Indeed. XML itself is nontrivial to parse and the "infinite" extensibility is just overkill for probably 99% of the time I've seen it used, XMPP included.
As an aside, this article seems quite devoid of actual content, bordering on spam IMHO. The title mentions IoT but the term appears only once in the entire article at the end, in a vague "XMPP is for messaging and IoT also needs messaging, so.... XMPP and IoT!" way. This is the sort of page that clogs search engine results with useless non-content.
- duskwuff 7y agoXMPP's own extensibility is a huge stumbling block as well. Almost every major feature of the protocol is implemented as an optional extension, so it's very difficult for clients to rely on anything being consistently available.
- upofadown 7y agoWell you have a choice. You make a protocol extensible and live with the fact that people are eventually going to extend it. Otherwise you choose a different fixed protocol for each and every task and live with the fact that you will never get any level of interoperability at all. If one complains about extensible protocols, one should be willing to come up with some other approach that works.
- Andrew_nenakhov 7y agoYou frame it like a bad thing, while in reality it's a good thing that makes a protocol more resilient and capable to evolve.
- Andrew_nenakhov 7y agoWhat exactly is nontrivial in parsing XML? Any popular computer language has plenty of libraries for working with XML.
- tylerl 7y agoWhen I'm building firmware for an ATMega or a Cortex-M0 or Tensilica device, the idea of dedicating the required space in my firmware for an XML parser, burning the CPU overhead for doing the parsing, losing the network overhead for the verbose text encoding... all this is absolutely absurd. Just so I can use XMPP? Why? That's my battery life getting wasted, that's my features getting displaced. There's no place for XML in iot, and definitely no place for XMPP. Even json is luxury you often can't afford, not if you want to make a reasonable cost target or battery life.
- Andrew_nenakhov 7y agoThe cases you describe do not require really hard xml parsing. It's trivial. Composing and sending an xmpp stanza is extremely easy. Parsing is easy too. Why you might want it? Well, maybe for the same reason any home router has a built in web interface (despite all the overheads of having a kinda webserver on such device) - for user's convenience and interoperability. And yes, stating that JSON is somehow better than XML for such cases is just... wrong.