Any mode of telecommunications in which all users can exchange information instantly or with negligible latency. Although the link might contain several intermediate nodes, the data goes from source to destination without having to be stored anyplace In half-duplex RTC, data can be transmitted in both directions on a single carrier but not at the same time. In full-duplex RTC, data can be transmitted in both directions simultaneously on a single carrier. RTC generally refers to peer-to-peer communications, not broadcast or multicast.
Telephony in the conventional sense Mobile and cellular telephone Two-way or multi-way amateur radio IRC or other chatting modes Live videoconference and teleconference communications SMS/MMS/IM
Data Congestion during peak usage MMS is difficult to setup in the handset SMS 160 limit. Cannot send multimedia files unless converted to proprietary formats. Per Message rates set by the network providers
All of the communication services listed here use proprietary protocols. Yahoo used their proprietary protocol They all failed to evolve into the mobile platform expect Skype
China population 1.3 Billion India population 1.2 billion Snapchat of May 2014, the company has refused to disclose the total number of active monthly users Line app active users are mostly from Japan, Thailand ,Indonesia, Taiwan and South Korea
FB Messenger app used technologies it borrowed from Beluga pod which they acquired in 2011.
MQTT(formerly MQ Telemetry Transport) - MQTT publish-subscribe based "light weight" messaging protocol for use on top of the TCP/IP protocol. (a low-power, low-bandwidth protocol) It is designed for connections with remote locations where a "small code footprint" is required or the network bandwidth is limited. The publish-subscribe messaging pattern requires a message broker.
Facebook has used aspects of MQTT in Facebook Messenger. However, it is unclear how much of MQTT is used or for what; Moreover, it is to be noted that this is a phone application, not a sensor application.
Facebook recently switched its Messenger from pull based protocol to push based queueing system on top of MySQL storage backend.
How to implement MQTT in android: http://stephendnicholas.com/posts/power-profiling-mqtt-on-android
Its possible to set a descriptor so that it is placed in "non-blocking" mode. When placed in non-blocking mode, you never wait for an operation to complete. This is an invaluable tool if you need to switch between many different connected sockets, and want to ensure that none of them cause the program to "lock up."
Here you can see a supposed architecture of whatsapp. All of the server are clusters and distributed geographically
Which differs from HTTP by allowing either side to send data to the other asynchronously. The default transport protocol is TCP while WebSockets can also be used. XMPP connections are long lived, and data is pushed instead of pulled. Matured implementation first release at 1999 and still activity developed. Using Jingle Many Open source XMPP servers are Wildfire, ejabberd, Jabberd 2, Jabberd 1.4
Its only relationship to HTTP is that its handshake is interpreted by HTTP servers as an Upgrade request. ———————————————————————————————————————————
When you send bytes from a buffer with a normal TCP socket, the send function returns the number of bytes of the buffer that were sent. If it is a non-blocking socket or a non-blocking send then the number of bytes sent may be less than the size of the buffer. If it is a blocking socket or blocking send, then the number returned will match the size of the buffer but the call may block. With WebSockets, the data that is passed to the send method is always either sent as a whole "message" or not at all. Also, browser WebSocket implementations do not block on the send call.
But there are more important differences on the receiving side of things. When the receiver does a recv (or read) on a TCP socket, there is no guarantee that the number of bytes returned correspond to a single send (or write) on the sender side. It might be the same, it may be less (or zero) and it might even be more (in which case bytes from multiple send/writes are received). With WebSockets, the receipt of a message is event driven (you generally register a message handler routine), and the data in the event is always the entire message that the other side sent.
Note that you can do message based communication using TCP sockets, but you need some extra layer/encapsulation that is adding framing/message boundary data to the messages so that the original messages can be re-assembled from the pieces. In fact, WebSockets is built on normal TCP sockets and uses frame headers that contains the size of each frame and indicate which frames are part of a message. The WebSocket API re-assembles the TCP chunks of data into frames which are assembled into messages before invoking the message event handler once per message.
PubNub - PubNub is a global Data Stream Network (DSN) and realtime infrastructure-as-a-service (IaaS). Uses WebSockets, Socket.IO, SignalR, WebRTC PubNub provides SDKs for over 70 different programming languages PubNub also provides client libraries for board platforms including Raspberry Pi, Arduino, Texas Instruments, and Microchip. 2. Pusher mainly communicates over a WebSocket connection. Contus Fly - uses the similar technology stack used by whats app. that is XMPP and ejabberd
quickblox Firebase - realtime database and backend as a service.
Realtime communication in mobile
Realtime Communication in Mobile
Girish Rengaswamy, Senior Manager - Mobile Solutions
What is real-time communications (RTC) ?
•Instant exchange of information.
•Direct path between the source and the destination.
•Half-duplex or full-duplex modes.
Real-time communications can include:
• Telephony in the conventional sense
• Mobile and cellular telephone
• Two-way or multi-way amateur radio
• IRC or other chatting modes
• Live videoconference and teleconference communications
Why did RTC using SMS/MMS failed?
• MMS is difficult to setup in the handset
RTC in the Web: Early days
RTC in Mobile: Now!
WhatsApp FB Messenger
RTC Mobile apps usage
0 100 200 300 400 500 600 700 800 900 1000 1100
Active User (Millions)
Technologies used by RTC Mobile apps
WhatsApp FB Messenger Telegram Slack
XMPP MQTT MTProto WebSocket
Server Side Programming
Language Erlang/PHP* Java* Unknown Java/PHP
Mnesia/MySQL* Unknown Unknown MySQL
SQLite SQLite SQLite SQLite
* The information presented here has been collected from third party sources as many of apps mentioned here are not open about their architecture.
XMPP (eXtensible Messaging and Presence Protocol)
•XMPP is a client-server application protocol.
•Uses TCP while WebSockets can also be used.
•Push instead of pull.
•Serverless Messaging (P2P) for Video, Audio and File transfer
•Open source servers: Wildfire, ejabberd, Jabberd 2, Jabberd 1.4
•Supports wide variety of datastore like: MySQL, Postgresql, Oracle, sqlite, Berkeley
•WebSocket is a protocol providing full-duplex communication channels over a
single TCP connection.
•Works seamlessly over web, mobile and standalone application.
•Works over a firewall
•Client implementation in all most all the languages
•Can be implemented in mobile apps using the following library
•iOS : SocketRocket