how do I refresh data every x seconds...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 10 of 10

Thread: how do I refresh data every x seconds...

Hybrid View

  1. #1
    John Butler Guest

    how do I refresh data every x seconds...

    I have a market data application which needs to show live price updates in a
    table. This table will refresh every 10-15 seconds. The table is read-only.

    Currently, in ASP, I refresh the frame itself, which works fine. However, I
    now need to highlight a changed price, as it happens, using some kind of
    highlight-fade DHTML sequence..

    Hunting around, there seem to be two ways to do this:
    1. Use a Web service behaviour
    2. Use DotNet remoting

    Has anyone grappled with live data refreshes yet? So much of the
    documentation assumes there will always be some kind of user response (push
    a "refresh" button, edit a record etc)...there isn't a lot on what the
    _best_ way to do dynamically refresh a dataset is...without any interaction
    and using a timer or something....

    Any help appreciated
    Regards
    John Butler




  2. #2
    Hari Guest

    Re: how do I refresh data every x seconds...


    <META HTTP-EQUIV="REFRESH" CONTENT=15> - This meta tag will send the request
    to the server in every 15 sec. Hope this will help you!

    - Hari


    "John Butler" <nospamjrbutler@btinternet.com> wrote:
    >I have a market data application which needs to show live price updates

    in a
    >table. This table will refresh every 10-15 seconds. The table is read-only.
    >
    >Currently, in ASP, I refresh the frame itself, which works fine. However,

    I
    >now need to highlight a changed price, as it happens, using some kind of
    >highlight-fade DHTML sequence..
    >
    >Hunting around, there seem to be two ways to do this:
    >1. Use a Web service behaviour
    >2. Use DotNet remoting
    >
    >Has anyone grappled with live data refreshes yet? So much of the
    >documentation assumes there will always be some kind of user response (push
    >a "refresh" button, edit a record etc)...there isn't a lot on what the
    >_best_ way to do dynamically refresh a dataset is...without any interaction
    >and using a timer or something....
    >
    >Any help appreciated
    >Regards
    >John Butler
    >
    >
    >



  3. #3
    John Butler Guest

    Re: how do I refresh data every x seconds...


    "Hari" <v_hari@indya.com> wrote in message news:3c57bbc5$1@10.1.10.29...
    >
    > <META HTTP-EQUIV="REFRESH" CONTENT=15> - This meta tag will send the

    request
    > to the server in every 15 sec. Hope this will help you!
    >
    > - Hari


    Thanks but I am already doing it that way...I'm looking for a better way....

    Obviously not many people have wrestled with displaying (constantly
    changing) data in a browser with DotNet yet....<sigh>





  4. #4
    David Rothgery Guest

    Re: how do I refresh data every x seconds...


    "John Butler" <nospamjrbutler@btinternet.com> wrote in message
    news:3c59c28e@10.1.10.29...
    >
    > "Hari" <v_hari@indya.com> wrote in message news:3c57bbc5$1@10.1.10.29...
    > >
    > > <META HTTP-EQUIV="REFRESH" CONTENT=15> - This meta tag will send the

    > request
    > > to the server in every 15 sec. Hope this will help you!
    > >
    > > - Hari

    >
    > Thanks but I am already doing it that way...I'm looking for a better

    way....
    >
    > Obviously not many people have wrestled with displaying (constantly
    > changing) data in a browser with DotNet yet....<sigh>


    It's more that there really isn't a good solution to that problem.


    --
    Dave Rothgery
    david_rothgery@stratagene.com




  5. #5
    John Butler Guest

    Re: how do I refresh data every x seconds...


    "David Rothgery" <drothgery@alum.wpi.edu> wrote in message
    news:3c59cdd9$1@10.1.10.29...
    >
    > It's more that there really isn't a good solution to that problem.


    Guess you're right. I will probably go with the web services behaviour
    method and see how far it takes me...





  6. #6
    Jesper Gjedde Guest

    Re: how do I refresh data every x seconds...


    Look into remote scripting.
    Brent Ashley have made an example of how to make a VERY lightweight Remote
    Scripting based on ASP.
    I have used it for an application, that refreshes a table every second using
    this and DHTML.

    http://www.ashleyit.com/rs/main.htm

    Regards

    Jesper

    "John Butler" <nospamjrbutler@btinternet.com> wrote:
    >I have a market data application which needs to show live price updates

    in a
    >table. This table will refresh every 10-15 seconds. The table is read-only.
    >
    >Currently, in ASP, I refresh the frame itself, which works fine. However,

    I
    >now need to highlight a changed price, as it happens, using some kind of
    >highlight-fade DHTML sequence..
    >
    >Hunting around, there seem to be two ways to do this:
    >1. Use a Web service behaviour
    >2. Use DotNet remoting
    >
    >Has anyone grappled with live data refreshes yet? So much of the
    >documentation assumes there will always be some kind of user response (push
    >a "refresh" button, edit a record etc)...there isn't a lot on what the
    >_best_ way to do dynamically refresh a dataset is...without any interaction
    >and using a timer or something....
    >
    >Any help appreciated
    >Regards
    >John Butler
    >
    >
    >



  7. #7
    Jason Guest

    Re: how do I refresh data every x seconds...


    This is one of the most basic and fundamental limitations of HTTP. You can't
    have "events" from the server to the client. The only way to pass data is
    for the client to send a request and then receive a response from the server.
    This is also a fundamental limitation of Web Services, since they are built
    on HTTP.

    Note that this is NOT a .NET limitation - it exists for Java, Perl, C++,
    and assembly language as well. Anything that uses HTTP will have the same
    limitation.

    The way to get around this is a bit painful. You have to write your own
    messaging service. You also have to write a "rich client," something like
    a .NET applet that plugs into the browser. .NET provides most of the stuff
    you need to do this, but it can be complex to implement. Certainly more
    complex than doing a simple web app. Microsoft has made web development
    almost laughably easy with ASP.NET and Web Services, so if you can live with
    a polling solution (check every 15 seconds - which severely limits scalability
    of your system), then you should try that first.

    "David Rothgery" <drothgery@alum.wpi.edu> wrote:
    >
    >"John Butler" <nospamjrbutler@btinternet.com> wrote in message
    >news:3c59c28e@10.1.10.29...
    >>
    >> "Hari" <v_hari@indya.com> wrote in message news:3c57bbc5$1@10.1.10.29...
    >> >
    >> > <META HTTP-EQUIV="REFRESH" CONTENT=15> - This meta tag will send the

    >> request
    >> > to the server in every 15 sec. Hope this will help you!
    >> >
    >> > - Hari

    >>
    >> Thanks but I am already doing it that way...I'm looking for a better

    >way....
    >>
    >> Obviously not many people have wrestled with displaying (constantly
    >> changing) data in a browser with DotNet yet....<sigh>

    >
    >It's more that there really isn't a good solution to that problem.
    >
    >
    >--
    >Dave Rothgery
    >david_rothgery@stratagene.com
    >
    >
    >



  8. #8
    John Butler Guest

    Re: how do I refresh data every x seconds...


    "Jason" <jason@creative_nospam_corp.com> wrote in message
    news:3c6456b2$1@10.1.10.29...

    Thanks for the reply..for those of you interested, I've actually found a
    solution:

    I built a webservice to retrieve the data, as per the normal documented
    methods. Then I use a Microsoft Scripting behaviour to call the web method
    from the client side. Works like a charm...I have a web page with live data
    updating dynamically every 10 seconds, without any page refreshes. I'm now
    working on pretty-ing it all up, so that changes to the table cause a
    highlight-fade of the cell when they occur.

    It's a solution limited to IE5+, but since it is for a corporate intranet,
    that is no problem.

    IT was quite painful getting around to what the solution should be, but it
    is great to have found such a workable solution (for intranets)

    Rgds
    John Butler




  9. #9
    John Butler Guest

    Re: how do I refresh data every x seconds...


    "Jesper Gjedde" <jg@tocsi.dk> wrote in message news:3c6250d7$1@10.1.10.29...
    >
    > Look into remote scripting.
    > Brent Ashley have made an example of how to make a VERY lightweight Remote
    > Scripting based on ASP.
    > I have used it for an application, that refreshes a table every second

    using
    > this and DHTML.
    >


    Thanks for the info Jesper...I found another solution as in the post above,
    but the one you mention is less browser-specific...I'll be sure to look into
    it.

    Rgds
    John Butler



  10. #10
    Derek Guest

    Re: how do I refresh data every x seconds...


    I'm really interested in the details of how you did it..can you please tell
    me more information..


    "John Butler" <nospamjrbutler@btinternet.com> wrote:
    >
    >"Jason" <jason@creative_nospam_corp.com> wrote in message
    >news:3c6456b2$1@10.1.10.29...
    >
    >Thanks for the reply..for those of you interested, I've actually found a
    >solution:
    >
    >I built a webservice to retrieve the data, as per the normal documented
    >methods. Then I use a Microsoft Scripting behaviour to call the web method
    >from the client side. Works like a charm...I have a web page with live data
    >updating dynamically every 10 seconds, without any page refreshes. I'm now
    >working on pretty-ing it all up, so that changes to the table cause a
    >highlight-fade of the cell when they occur.
    >
    >It's a solution limited to IE5+, but since it is for a corporate intranet,
    >that is no problem.
    >
    >IT was quite painful getting around to what the solution should be, but

    it
    >is great to have found such a workable solution (for intranets)
    >
    >Rgds
    >John Butler
    >
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center