Behind the scenes of Real Time Notifications
summary
Explains how HTTP hacks (XHR polling) cost resources and how long polling and Web APIs change that, then shows a working integration: CakePHP + Node.js + Socket.io sends JSON notifications when articles or comments change, PHP pushes to Node via an HTTP endpoint, Node emits into rooms per article, clients receive updates with almost no extra requests (demo shows two long-poll hits in 60 seconds versus ~60 XHRs), falls back to long polling for older IE, requires shared session cache and careful PHP serialization.
AI-written summary · about
