How is WhatsApp written and how is Telegram written - briefly?
WhatsApp is primarily written in Java for its Android client and in Objective-C for its iOS client. In contrast, Telegram's core is built using C++, with additional components like the desktop app being developed in JavaScript and TypeScript.
How is WhatsApp written and how is Telegram written - in detail?
Both WhatsApp and Telegram are popular messaging platforms, each with its unique architecture and design principles.
WhatsApp, developed by Facebook, primarily utilizes the Extensible Messaging and Presence Protocol (XMPP) for its backend infrastructure. XMPP is an open-standard communications protocol for message-oriented middleware which the Internet Engineering Task Force (IETF) developed. WhatsApp employs a centralized server architecture where all messages are routed through Facebook's servers. This approach ensures that users can seamlessly communicate with each other regardless of their network connectivity or device type. The data is encrypted end-to-end, guaranteeing that only the communicating users can read the messages.
On the other hand, Telegram, founded by Pavel and Nikolai Durov, adopts a more decentralized approach. It uses a custom-built protocol called MTProto (Mobile Theoretical Protocol), which was specifically designed for Telegram. MTProto is optimized for speed and reliability on mobile networks. One of the key features of Telegram's architecture is its use of distributed data centers around the world. This design allows messages to be routed through the closest available server, reducing latency and improving message delivery times. Additionally, Telegram offers various encryption options, including end-to-end encryption for secret chats, ensuring a high level of security for users who require it.
In summary, WhatsApp relies on a centralized server architecture with XMPP for its backend, while Telegram employs a decentralized approach using MTProto and distributed data centers. Both platforms prioritize user privacy and security through various encryption methods.