What about adding NodeJS + SocketIO to your stack?
SocketIO let's you create a room for your clients and it can emit messages to a room of clients.
Let me show you a basic example:
notification.js
var app = require('http').createServer(),
io = require('socket.io').listen(app);
app.listen(3000);
io.sockets.on('connection', function (socket) {
// Joining a room
socket.join('chatroom');
socket.on('newUserJoinRequest', function(data) {
socket.broadcast.to('chatroom').emit('newUserJoinedNotification', data);
})
});
client.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://localhost:3000/socket.io/socket.io.js"></script>
</head>
<body>
<input type="text" id="username" placeholder="name">
<button type="text" id="joinButton">Join</button>
<div id="responses">
<h2>NodeJS+SocketIO responses:</h2>
<ul></ul>
</div>
<script>
var socket;
jQuery(document).ready(function() {
socket = io.connect('//localhost:3000');
socket.on('newUserJoinedNotification', function(data) {
var li = '<li>A new user joined the room: ' + data.name + '</li>';
jQuery('#responses ul').append(li);
});
});
jQuery('#joinButton').click(function() {
var username = jQuery('#username').val();
socket.emit('newUserJoinRequest', {name: username});
});
</script>
</body>
</html>