similar).
While you could poll from the JS client using setInterval, I'd look into a
websocket based approach so you can simply push the data as it arrives
might use:
http://godoc.org/github.com/gorilla/websocket
I would recommend the websocket (push) approach unless you have to support
older clients.
-Daniel
On Tuesday, April 1, 2014 8:45:22 AM UTC-7, Mike Appenzellar wrote:
I am working on an app where I need to display real-time data that pulls
from a C library. Any advice on best approach? Setinterval from UI pushing
a few json requests every second? OR the opposite approach where you are
constantly watching from the backend and always pushing to the UI? Seems
like the setInterval from UI would be more expensive but interested to here
thoughts.....examples would be rad! ;o)
--I am working on an app where I need to display real-time data that pulls
from a C library. Any advice on best approach? Setinterval from UI pushing
a few json requests every second? OR the opposite approach where you are
constantly watching from the backend and always pushing to the UI? Seems
like the setInterval from UI would be more expensive but interested to here
thoughts.....examples would be rad! ;o)
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.