To update client web app of notifications?

Can i avoid putting a timed event from client app which pings server, for event updates?

I am using Angularjs, Nodejs-expressjs, to build my web app.

The other alternative i can think of maybe

Can i do something like'/abc', function(req, res){
   res.send('event data');

The above will not return till the event happens.


There are multiple ways to implement push notifications:

HTTP Long Polling : The client initiates a request. The server checks if it has any new notifications. Irrespective of whether or not it has new notifications appropriate response is send and connection is closed. After time X client initiates another request (+ Very easy to implement - notifications are not real time. They depend on X since data retrieval is client initiated. As X decreases overhead on server increases )

HTTP Streaming: This is very similar to HTTP Long Polling however the connection is not closed. The server sends chunked response. So as soon as server receives new notification that it wants to push it can simply write to the socket. ( + lower latency than long polling and almost real time behaviour / overhead of closing connection and re opening reduced - memory usage client side keeps on piling up / ugly hacks etc )

WebSocket: TCP based protocol provides true two way communication. The server can push data to client any time. ( + ve: true real time - some older browsers dont support it ). Read more about it | About WebSocket

Now based on the technology stack there are various solutions available: (A) Nodejs : the cross-browser WebSocket for realtime apps. ( does heavy lifting for you. Gracefully falls back in case websocket is not supported ) (B) Django : As mentioned previously you can use signals for notifications. Also you can try django-websocket 0.3.0 for supporting websocket (C) Jetty / Netty and Grizzly (Java based) : All have websocket support

from link

Need Your Help

DirectoryInfo.GetDirectories() and attributes

.net file-io attributes directoryinfo getdirectories

I am using DirectoryInfo.GetDirectories() recursively to find the all the sub-directories under a given path.

CVS Checkout to a directory

cvs vcs-checkout tortoisecvs

How do i check out a specific directory from CVS and omit the tree leading up to that directory?