Binding XML-RPC data to tables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • FunGuySF

    #1

    Binding XML-RPC data to tables

    I've created an XML-RPC server, and would like to somehow bind the XML
    server responses to a table for users to view. Here's the catch, that data
    changes frequently (every few seconds), so I'm using setInterval to
    periodically get updated XML content from the server.

    Currently, the setInterval function requests the entire dataset, then
    rewrites the entire table. I'm concerned that it's a waste of bandwidth,
    and disrupts the user scrolling through the data whenever it rewrites.
    Ideally, I'll have the XML-RPC server generate only data changed since the
    last request, then somehow update the table with the changes.

    Anyone do anything like this before? Thoughts on how to accomplish it?

    Thanks!


  • BMR

    #2
    Re: Binding XML-RPC data to tables

    FunGuySF a écrit :[color=blue]
    > I've created an XML-RPC server, and would like to somehow bind the XML
    > server responses to a table for users to view. Here's the catch, that data
    > changes frequently (every few seconds), so I'm using setInterval to
    > periodically get updated XML content from the server.
    >
    > Currently, the setInterval function requests the entire dataset, then
    > rewrites the entire table. I'm concerned that it's a waste of bandwidth,
    > and disrupts the user scrolling through the data whenever it rewrites.
    > Ideally, I'll have the XML-RPC server generate only data changed since the
    > last request, then somehow update the table with the changes.
    >
    > Anyone do anything like this before? Thoughts on how to accomplish it?
    >
    > Thanks!
    >
    >[/color]

    Why not use setInterval along with DOM functions that would just change
    necessary cells content in the table ?

    BMR

    Comment

    • FunGuySF

      #3
      Re: Binding XML-RPC data to tables

      "BMR" wrote in message
      [color=blue]
      > Why not use setInterval along with DOM functions that would just change
      > necessary cells content in the table ?[/color]

      That sounds like a winner... I'm just not sure how to go about it.

      I imagine that I'd have to send, for example, some key data to the server,
      so it knows what I have, then have it return any changes (adds, removes,
      changes).

      Then, I'm assuming I can use DOM features to search my own table to see what
      should be updated? Where can I find specifics on methods I could use?

      Thanks!




      Comment

      • Matthew Lock

        #4
        Re: Binding XML-RPC data to tables

        Just off the top of my head you could have the client send back the
        date and time of the last time it received a table update, and then
        have the server compare this against the the date and time some data
        changed, and if it was newer to send the data up to the client.

        As for the DOM you could either iterate through the rows and cells of
        the table replacing as needed, or ad id's to each cell and replace
        directly.

        That ought to get you started anyway.

        Comment

        Working...