I want to develop an instant messaging for mobile application, like whatsapp, with nodejs as my backend. I have gone through XMPP protocols and read xmpp.org documentation as well.
I referred to this link and I am able to build some of the basic XMPP functionality like creating and messaging users. But I am still unable to implement the complete functionality of XMPP in nodejs.
So: are there any node js libaries available to build the complete functionality of xmpp protocol, such as asmack? Alternatively, how do I send calls to XMPP server via XML?
Definition. To clarify the nature of a node, it is first helpful to describe the architecture of XMPP systems. Because XMPP is a client-server technology that relies on the Domain Name System, the fundamental building block of XMPP systems is the "domain".
The original and "native" transport protocol for XMPP is Transmission Control Protocol (TCP), using open-ended XML streams over long-lived TCP connections. As an alternative to the TCP transport, the XMPP community has also developed an HTTP transport for web clients as well as users behind restricted firewalls.
SIP will run over UDP, TCP, and SCTP, while XMPP is TCP only. SIP is a text-based request-response protocol while XMPP is XML-based client-server architecture. In other words, clients do not talk directly to one another.
XMPP is an application layer protocol that defines the structure and syntax of XML fragments, called stanzas, which handle messaging, presence information, and contact lists. However, to send these stanzas, XMPP still relies on a transport protocol, such as a TCP/IP binding, HTTP/S, or a WebSocket connection.
Node js achieves high throughput via event driven programming techniques and non-blocking I/O. What is xmpp chat Extensible Messaging and Presence Protocol (XMPP), is a middleware based on XML which is used for messaging operations. Pidgin is the best example for xmpp chat.
XMPP is a short form for Extensible Messaging Presence Protocol. It’s protocol for streaming XML elements over a network in order to exchange messages and presence information in close to real time. This protocol is mostly used by instant messaging applications like WhatsApp. Let’s dive into each character of word XMPP: X : It means eXtensible.
Extensible Messaging and Presence Protocol (XMPP), is a middleware based on XML which is used for messaging operations. Pidgin is the best example for xmpp chat.
And as the client uses HTTP, most firewalls allow clients to fetch and post messages without any problem. Thus, in scenarios where the TCP port used by XMPP is blocked, a server can listen on the normal HTTP port and the traffic should pass without problems.
XMPP is the standard for messaging. But it is not clear how Node will help you better than an established library on another platform. Node does make it a breeze to do scalable web socket apps, which work a lot better using JSON instead of XML though. So perhaps what you want to do is build a web socket IM application in Node and also implement an XMPP interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With