Ajax loader to fetch MySql instead of clientraw

I’m just playing with an idea to get all requests for updates from a MySql table instead of textfiles (clientraw).
I have already started to use a Table that I call a CDA (common data area) where php can fetch current values from. This takes the load off the textfiles when traffic is high. Hence the CDA will have to hold all the information applicable from the clientraw. I’ve already implemeted the CDA read for my flash gauges: http://vindkast.no/wx_live
Since I don’t know much about Java I don’t know how to approach this. I don’t even know if it’s worth it since Java operates on the client side.

Any thoughts on this matter?
Regards Audun
Weather, lightning, seismograph & AIS


You can change the script to fetch a PHP page which will do the mySQL query and return text for you to process.

Keep in mind that loading a text file from a webserver is much less intensive than loading a page which does a mySQL query, and since clientraw.txt is < 1kb in size, you won’t get much savings in load (or traffic) on your webserver by doing the change.

Just my opinion…

Best regards,

Thanks Ken,
In my opinion, your opinion should always be treated with respect.
That’s a valid point you’re making. However I had to do something like this for my flash gauges, that crashed every now and then. Now it updates for months without any trouble. These gauges are permanently on display in a reception area, and maintenance is extremely low since I started feeding updates through MySql.
I might give your suggestion a go. It should be straightforward since I have all the parameters set up in WUHU to create a ‘wannabe’ clientraw. (Sorry guys, I’m not runnng WD). The template it run’s is easily converted to return a ‘clientraw’ populated from the database.

Best wishes for the upcoming season.