I Built a P2P Messenger Without a Central Message Database — What I Learned About WebRTC, E2EE and Serverless Architecture
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
P2P messenger architecture with WebRTC and E2EE; relevant to serverless and data engineering.
OpenChat is an open-source P2P messenger that uses WebRTC DataChannels for direct browser-to-browser communication, MQTT only for signaling and peer discovery, and serverless functions for configuration—eliminating any central message database or traditional application server. The architecture ensures that once a WebRTC connection is established, losing the MQTT signaling link does not interrupt active message traffic, and the system relies on browser-native cryptography for end-to-end encryption. The author emphasizes that 'serverless' here means no central message storage or routing, not the absence of infrastructure, and that TURN relays may still be needed for NAT traversal.