{"id":118,"date":"2011-09-23T12:55:21","date_gmt":"2011-09-23T16:55:21","guid":{"rendered":"http:\/\/www.cloppermillweather.org\/blog\/?p=118"},"modified":"2011-10-01T00:31:19","modified_gmt":"2011-10-01T04:31:19","slug":"plug-computer-and-web-site","status":"publish","type":"post","link":"https:\/\/www.cloppermillweather.org\/blog\/2011\/09\/23\/plug-computer-and-web-site\/","title":{"rendered":"Plug Computer and Web Site"},"content":{"rendered":"<p>I&#8217;ve been continuing to test with the Guruplug.\u00a0 The software and computer have been very stable.\u00a0 However, with my weather application running, the load average is at just above 1, with occasional spikes that go higher.\u00a0 This is OK, but doesn&#8217;t leave room for everything else I had been running on my old weather server.<\/p>\n<p>For my old weather server, I had written a Java application that would run periodically using cron, and aggregate information from the weather station, the National Weather Service, and a couple of other sources.\u00a0 It would then build a Web site using a template and all of the aggregated information.\u00a0 Finally, the application would upload the Web site to my ISP every few minutes.\u00a0 Based on the load average, the Guruplug probably wouldn&#8217;t be able to handle that extra processing.\u00a0 So I chose to offload the data downloads and Web page creation to the server at my ISP.<\/p>\n<p>I created a shell script to download all of the data feeds I needed and ran it as a cron job.\u00a0 I also created a cron job on the Guruplug to upload my weather data to my ISP once a minute.\u00a0 No problem so far.\u00a0 I had planned to run my Web site builder Java application on the server at my ISP.\u00a0 That is, until I learned that my ISP doesn&#8217;t really support Java applications.\u00a0 They don&#8217;t prohibit them.\u00a0 Just discourage their use.\u00a0 So I looked\u00a0at using PHP to dynamically build my Web site, which the ISP does support.<\/p>\n<p>That approach will work fine, but requires a significant amount of work on my part to recreate in PHP everything I was previously doing using Java.\u00a0 The two languages have some similarities, but enough differences to make for a fair bit of work.\u00a0 I started out with the basic weather data, as that was the simplest structure to work with.\u00a0 That conversion was fairly straightforward.\u00a0 I then started working on the statistics.\u00a0 That has turned into a lot of work as I have several hundred data fields to parse from the XML statistics file.\u00a0 I also should have formed the XML differently to make it easier to process.\u00a0 Lesson learned for next time I create an XML schema.<\/p>\n<p>After I finish with the statistics, I still need to do the weather forecast, advisories, traffic reports, and a couple of others.\u00a0 I also want to change my pages to have a shared file for the header, navigation bar, and footer.\u00a0 So a lot of work is left to be done before the Web site is ready for prime time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been continuing to test with the Guruplug.\u00a0 The software and computer have been very stable.\u00a0 However, with my weather application running, the load average is at just above 1, with occasional spikes that go higher.\u00a0 This is OK, but &hellip; <a href=\"https:\/\/www.cloppermillweather.org\/blog\/2011\/09\/23\/plug-computer-and-web-site\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-weather"],"_links":{"self":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":0,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts\/118\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/media?parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/categories?post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/tags?post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}