Old meets New!
May 20, 2009
Ok, I just finished an unusual project for a client today. Specs were roughly as follows…
- collect data daily from an embedded computer
- legacy interface of computer is DDE via a propriatory gateway app running on a windoze box
- Take said data and visualise it on the company intranet in the form of a graph
This really is old meets new here as I have no choice but to use the legacy DDE link but then it needs visualising on the net! There are several ways to do this and I know I will get shouted at by someone, but this is the way I opted for given the time constraints!
The Daemon Process
I created a daemon process in c++ which parses an XML configuration file containing the the DDE topic and the various data to be collected (re-usable of course by changing only the XML). Once a day the data is collected via DDE via the gateway app and is dropped into a SQL database instance. The daemon process lives and breathes on the same windoze box as the gateway app.
The Webserver
This is the easy bit! A quick Java class to run in Tomcat 6 to pick up the data from the database and visualise it in a graph applet! Incidentally, if you need a simple, does-what-it-says-on-the-tin, open source Java graph library, then look no further than the JavaTao, Java Charts library!
Dont you just love hacking together systems to include legacy gear? It’s not forward thinking, but it does make you think, dde has after all been with us since windows 2.0 way back in 1987!
All in all I spent about 10 hours designing, coding and testing this solution, that doesn’t include my midnight chinese takeaway though!
Cheers,
Matt
Java Charts JavaTao Charts Library