FAQ
I'd avoid the term "real-time" and use live-updated data (or something
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)
--
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 golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 1, '14 at 3:45p
activeApr 1, '14 at 5:02p
posts4
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase