Push Notification
Created by Joe Burgess
So What Is Push?
It's the final frontier of AJAX.
Why Not Just Poll
- Peformance
- Usability
- Scalability
How Does It Work?
- Browser keeps an open connection to a server
- Used to be non standardized and hard
Intorducing....
WebSockets
WebSockets
Standarized way for bi-directional realtime
communication between servers
Faye
- Node.JS server
- Clients for Node.JS and Rails
Start The Server
Install the Faye and Thin Gems
Create a rack file
Run It!
Pub/Sub
The pusher publishes a message on
a channel.
The subscriber subscribes to a channel.
Any MASSIVE GLARING Problems?
Yup
Security! Anyone can post to faye right now.
Let's write a Faye Extension
Yup
Order of messages is not guaranteed.
Performance
- Open Connection for every subscriber
- Pushing Data vs. Pushing Notification