Live Meter Data on the Web - Advice Please

  • Thread starter Thread starter BCM
  • Start date Start date
B

BCM

I've been asked to display some meter data on the web and I need preliminary
advice.

We have several hundred meters on site, with a system that writes out xml
files at 10 second intervals containing their data. (These files are
overwritten every 10 seconds, not appended to.)

First, I need to display two numeric pieces of this data just as numbers in
a web page. Naturally that's easy enough: where I'm stumped is REFRESHING
that data when it's updated every 10 seconds. Of course I don't want to
refresh the whole page, but only update a particular number when its
associated xml file is updated.

I've seen this done client side with javascript, but it was pretty cludgey.
Can ASP.NET help me here with a kind of persistant connection to these xml
files? (I thought the DataSet did such business out of the box, but it
doesn't as far as I can tell.)

Second, I need to use this data later for graphic trend displays. In other
words, I need to show in graph or chart form how each of these meters is
performing over time. Since the xml files are overwritten, I obviously have
to persist each piece of data somehow. I can think of any number of ways to
do this, but none of them seem too elegant. Any advice anyone might have
will help me think this through.
 
I can see two ways to implement it: make own Java applet/ActiveX control
that periodically downloads the data and displays it to an user, and put it
on the page -- or write a Javascript code. The latter would be much simpler
than you think, you just need to call a function which downloads certain
image and substitutes it with an existing one, and calls itself in 10
seconds. Then on the server side you read xml and write the (very
lightweight B&W GIF) image with the value of your meter every 10 seconds.

What do you want persistent connection with: the XML file or web page?

As far as the trend display goes, you need to store the N most recent values
somewhere -- if N is little it can be in a global server variable (unsure if
ASP supports them) and if it's larger, store to a file or database. Then
when you make your value image you can also write the trend image. If the
image to display would be significant in size you'll need to consider other
options -- but they depend on exact size and type (graphical/textual).
Anyway, I would use an applet.

Ask further if I weren't clear enough.
 
BCM,

Is your project to write this fully custom or do you entertain off-the-shelf
solutions to this problem? Live meter data on the web can be quite easy
depending on your time, budget, infrastructure, etc.

I'd be happy to make some quick suggestions that you could find useful but I
don't want this to turn into a commercial.
 
Back
Top