FAQ
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

  • Aram Hăvărneanu at Apr 1, 2014 at 3:48 pm
    Real-time software means something else:
    http://en.wikipedia.org/wiki/Real-time_computing

    --
    Aram Hăvărneanu

    --
    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.
  • Konstantin Khomoutov at Apr 1, 2014 at 4:08 pm

    On Tue, 1 Apr 2014 08:45:22 -0700 (PDT) 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)
    An approach to take highly depends on what kind of UI you're talking
    about, right?

    --
    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.
  • Daniel Theophanes at Apr 1, 2014 at 5:02 pm
    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.

Related Discussions

Discussion Navigation
viewthread | post
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