Narwhal: An extensible pub/sub messaging server for edge applications Why Narwhal? Narwhal was born out of a specific frustration: Building a modern chat feature shouldn't be this hard. When trying to integrate real-time chat into a startup project, the existing options forced a difficult trade-off: XMPP (e.g., ejabberd): Powerful, but massive complexity, XML overhead, and a steep learning curve for simple needs. MQTT Brokers: Lightweight and fast, but rigid. Implementing custom authentication, dynamic permissions, or message validation often requires writing complex broker plugins in C/C++ or wrapping the broker in a "sidecar" mess. Narwhal is the middle ground. It provides the lightweight performance of an edge broker but delegates the "brains" (Authentication, Authorization, Validation) to your application code via a Modulator. What is a Modulator? A modulator is an external service that implements custom application logic on top of Narwhal's messaging layer. Rather than embedding application-specific features in the server, Narwhal delegates these concerns to a modulator, keeping the core server lightweight and focused on message routing. Each Narwhal server connects to exactly one modulator, ensuring consistent application protocol semantics. Common Modulator Use Cases: Custom Authentication : JWT validation, OAuth flows, or proprietary auth schemes : JWT validation, OAuth flows, or proprietary auth schemes Authorization & Access Control : Complex permission rules beyond basic channel ACLs : Complex permission rules beyond basic channel ACLs Content Validation : Message schemas, size limits, or content policies : Message schemas, size limits, or content policies Message Transformation : Encryption, compression, or message enrichment : Encryption, compression, or message enrichment Business Logic : Game logic, chat moderation, presence systems : Game logic, chat moderation, presence systems Integration: Bridge with external services, databases, or APIs 🎬 Demo de...
First seen: 2026-01-31 19:42
Last seen: 2026-01-31 20:42