Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push System without node.JS

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.-

like image 869
rec Avatar asked Jun 18 '26 12:06

rec


1 Answers

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?.

like image 149
Jack Avatar answered Jun 21 '26 01:06

Jack