Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Push System without node.JS

Push System without node.JS

Problem

I want to create a facebook-like notification system (the one who appears on the bottom-left side of the screen when someone comment on your post, for example).

The thing here is that the server needs to send you a notification when someone comments in the site in this exactly moment. I think this is called PUSH-System (sorry for my bad english).

I tried with node.JS but my dedicated server can't install it. Only if I buy a very expensive VPS plan.

So, is there a way using jQuery or something like that to make this Push notification system?

Thanks !!

, rodrigo.-

Problem courtesy of: rec

Solution

If you want a low latency, efficient solution you should use Websockets. However you need to have fallbacks in place such as long-polling / short polling available if the browser doesn't Support Websockets.

The WebSocket Protocol provides a full-duplex (two way) connection between the server and client. Traditional HTTP is half-duplex (one way). This link will give you an overview of the benefits of using WebSockets vs HTTP: http://www.websocket.org/quantum.html.

You need to be aware that most modern Browsers Support WebSockets, but use different protocols. See here: What browsers support HTML5 WebSocket API?.

Solution courtesy of: Jack

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Push System without node.JS

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×