PHPackages                             ack/notification-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. ack/notification-bundle

ActiveSymfony-bundle[Caching](/categories/caching)

ack/notification-bundle
=======================

Symfony real time notification system

1.0.0(9y ago)259.3k↓100%4[1 issues](https://github.com/Acrack/AckNotificationBundle/issues)MITJavaScriptPHP ^5.3.9 || ^7.0

Since Oct 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Acrack/AckNotificationBundle)[ Packagist](https://packagist.org/packages/ack/notification-bundle)[ Docs](https://github.com/Acrack/AckNotificationBundle)[ RSS](/packages/ack-notification-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (3)Versions (4)Used By (0)

AckNotificationBundle
=====================

[](#acknotificationbundle)

Introduction
------------

[](#introduction)

This bundle offers a predefined architecture for a notification system using Redis and Node.js

Everything is based on the Pub/Sub (publish/subscribe) system of Redis, here is simple diagram of what happen behind the scene:

[![Alt text](diagram.png?raw=true "Diag")](diagram.png?raw=true)

Each messages contains a content rendered by twig and an array of the users id.

Installation
------------

[](#installation)

Use composer :

```
php composer.phar require ack/notification-bundle

```

Register the bundle in your app/AppKernel.php file :

```
$bundles = array(
    ...
    new Ack\NotificationBundle\AckNotificationBundle(),
    ...
);

```

If you already have a server node running on your application you have an example of implementation in example\_server.js

Else, after the assets install, you can go in /web/bundles/acknotification/nodejs and:

```
npm install

node server.js

```

Usage
-----

[](#usage)

From a controller or anywhere you have access to the 'ack.notifier' service:

```
$this->get('ack.notifier')->notify(
    ':notification:test.html.twig', // Any twig file
    array(1, 2, 3), // Array of the users id that need to be notified, use '*' if you want to notify everyone (anonymous users included)
    array() // Optional parameters according the your twig view
);
```

Do not forget to load socket.io.js and connect to the server.

```

    if (typeof io !== 'undefined') {
        var socket = io.connect('http://your.domain:1337');
    }

```

After you have emitted the 'loaded' event from your frontend, Node.js will catch it and store your user in a Redis hash. That way we have a list of the online users somewhere and each hash contains the socketId.

```

    socket.emit('loaded', {
        id : '{{ app.user is not null ? app.user.id : "anon." }}'
    });

```

Once Node.js receive a notification, it emits an event 'notification' to each users id, you can do that kind of script in your frontend, to notify users.

```
socket.on('notification', function (notification) {
    // get  "notifications" and append notification
});
```

This bundle has a dependency on snc redis, so do not forget to add this on your config.yml I recommend using redis for your other needs such as session storing, caching, logging and more here: [SncRedisBundle](https://github.com/snc/SncRedisBundle)

```
snc_redis:
    clients:
        default:
            type: predis
            alias: default
            dsn: redis://localhost
            logging: %kernel.debug%
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

3498d ago

Major Versions

0.1.3 → 1.0.02016-10-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/75eb7bb4622d2de1532d730208cdb31653c39fc3d1ee29c8e9749ab0f75e220a?d=identicon)[Acrack](/maintainers/Acrack)

---

Top Contributors

[![Acrack](https://avatars.githubusercontent.com/u/1526998?v=4)](https://github.com/Acrack "Acrack (25 commits)")[![takman1](https://avatars.githubusercontent.com/u/6367675?v=4)](https://github.com/takman1 "takman1 (1 commits)")

---

Tags

symfonynotificationredisnodejs

### Embed Badge

![Health badge](/badges/ack-notification-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ack-notification-bundle/health.svg)](https://phpackages.com/packages/ack-notification-bundle)
```

###  Alternatives

[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)[resquebundle/resque

A Symfony 4 bundle to manage Resque job queues

51137.1k1](/packages/resquebundle-resque)[mmoreram/rsqueue-bundle

Redis Symfony2 Queue Bundle, a simple and soft redis based message queue for symfony2

5360.7k1](/packages/mmoreram-rsqueue-bundle)[rsqueue/rsqueue-bundle

Redis Symfony2 Queue Bundle, a simple and soft redis based message queue for symfony2

1111.9k1](/packages/rsqueue-rsqueue-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
