notification_server
Notification Server is a developer module that provides real-time notification capabilities by integrating with an external notification server through HTTP and WebSocket protocols.
Important
This is a developer module that provides APIs and services for integrating real-time notifications. It will not do anything on its own and requires custom code or other modules to utilize its functionality.
Features
- HTTP API Client - Publishing notifications and managing channels
- WebSocket Integration - Real-time bidirectional communication with browser clients
- Channel Management - Creating channels and managing access control
- Client Management - Handling WebSocket client connections
- Demo Interfaces - Testing functionality (optional demo module)
Self-Hosted Alternative
The Notification Server is a self-hosted solution that provides an alternative to SaaS-based real-time messaging services like Pusher, Firebase, or Ably. By running your own notification server, you maintain full control over your data, avoid vendor lock-in, and can customize the solution to meet your specific needs.
Requirements
- External Notification Server - Requires a running instance of the Notification Server or compatible API
- Redis - The notification server requires Redis for data storage
Easy Setup with DDEV
For Drupal developers using DDEV, the notification server can be easily added using the DDEV addon:
ddev add-on get d34dman/ddev-notification-server ddev restart
Usage
Use the notification_server.client service to publish messages:
$notification_client = \Drupal::service('notification_server.client');
$notification_client->publishNotification('channel_name', 'Hello, World!');Perfect for real-time updates, push notifications, chat applications, and real-time dashboards.