logo

Server sent Event with Angular

This is a simple application to show how to make a server sent event with PHP and communicate with client side in angular

GET STARTED

SSE

Server-sent events (SSE) is a technology where a browser receives automatic updates from a server via HTTP connection.

Redis | Predis

Redis is a data structure server. it is open source and is used to store in memory , keys for a period of Temp.

Predis is a PHP library for connect with redis.

Explanation


diagram

When we have several clients, one must be able to send messages to everyone in one go. In our case , admin form sends a Message to the server. The server (Redis) receives and broadcasts the message to the other connected clients. B and A.

Quick start


Download redis for Windows Here

$ git clone git://github.com/nrk/predis.git

$ git clone git://github.com/clamarque/Angular_SSE.git

Start redis-server and lauch application with localhost (wamp, xamp, etc.)