News for hackers. Stuff that matters.
Re:Facebook Messenger protocol in Pidgin by golergka on Thursday January 14, 2016 @06:47AM (#10900801)
That's what I read in a couple of blog posts in articles by people who implemented it. I can't bring the up right now, but after one minute in google, I found this conversation to be quite interesting: https://news.ycombinator.com/item?id=2069810
Re:Facebook Messenger protocol in Pidgin by userbinator on Thursday January 14, 2016 @07:19AM (#10900899)
A representative comparison of what the notification for a user going offline looks like in several IM protocols:

MSNP (older versions):

    FLN [email protected]
IRC:

    :[email protected] PART #channel
XMPP:

    <message 
        from='[email protected]/balcony'
        to='[email protected]/orchard'
        type='chat'>
      <thread>act2scene2chat1</thread>
      <gone xmlns='http://jabber.org/protocol/chatstates'/>
    </message>
MSNP (newer versions, unfortunately also XML-ified):

    NFY PUT 268
    Routing: 1.0
    To: 1:[email protected]
    From: 1:[email protected]

    Reliability: 1.0

    Notification: 1.0
    NotifNum: 0
    Uri: /user
    NotifType: Partial
    Content-Type: application/user+xml
    Content-Length: 50

    <user><s n="IM">
    <Status>FLN</Status>
    </s></user>
I think older MSNP and IRC are the best of all the IM protocols I've seen, and I've written clients for both. OSCAR (ICQ/AIM) is a binary format that doesn't look too hard to parse; I'd say it's still better than working with XML.
Re:Facebook Messenger protocol in Pidgin by MattJ100 on Thursday January 14, 2016 @08:27AM (#10901198)
Your XMPP example is incorrect, what you pasted is a notification that the user you were chatting with closed the conversation.

A user going offline would be:

   <presence from="[email protected]/balcony" type="unavailable"/>
And yes, XMPP is extensible, so you might see such notifications with more content (e.g. the user can set an offline message), but the beauty is that not every client need implement support for that, which is handy if you're writing a thin client like a bot, or doing machine-to-machine communication. But every XMPP client will interpret the core meaning exactly the same: the user has gone offline.
Re:Facebook Messenger protocol in Pidgin by nly on Thursday January 14, 2016 @08:28AM (#10901200)
Message size is important, but for low-bandwidth instant messaging is XML really bothersome? I mean it's not like you're writing your own XML parser or serialiser, is it?
Re:Facebook Messenger protocol in Pidgin by drdaeman on Thursday January 14, 2016 @08:50AM (#10901327)
The sad truth about XMPP is that a lot of developers actually did this (at least in early days). Maybe because a lot of readily available libraries weren't really compatible with XML streams and XMPP's idea of framing.

And their XML parsing were quite limited.