<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7710546271775573796</id><updated>2011-07-08T15:54:50.283+01:00</updated><category term='w3'/><category term='xml'/><category term='birmingham'/><category term='mySQL'/><category term='SQL'/><category term='javascript'/><category term='cache'/><category term='ajax'/><category term='LHC'/><category term='gadget'/><category term='monitoring'/><category term='distributed computing'/><category term='igoogle'/><category term='openoffice'/><category term='presentation'/><category term='grid'/><category term='student'/><category term='css'/><category term='python'/><category term='CERN'/><category term='html'/><category term='todo'/><category term='GET'/><category term='JSON'/><category term='data'/><category term='progress'/><category term='university'/><category term='google'/><title type='text'>Monitoring the Grid with iGoogle Gadgets</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gridgadgets.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/08594993195751900686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7710546271775573796.post-1746825491995792934</id><published>2009-10-11T22:13:00.003+01:00</published><updated>2009-10-13T17:45:31.134+01:00</updated><title type='text'>Finished</title><content type='html'>It should be obvious to any following this blog that 10 weeks of this student-ship project have long since ended, however until now there were a few outstanding issues. I can now finally say that the project is finished and ready for public use. It can be found at &lt;a href="http://epdt77.ph.bham.ac.uk:8080/webgrid/"&gt;http://epdt77.ph.bham.ac.uk:8080/webgrid/&lt;/a&gt;, although the link may change at some point in the future &amp; the "add to iGoogle" buttons won't work for now. &lt;br /&gt;&lt;br /&gt;The gadget is currently configured to utilize all available data from 2009. Specifically it holds data for all jobs submitted in 2009, up-to around mid September (the most up to date data available from the Grid Observatory). &lt;br /&gt;&lt;br /&gt;In addition to this I have produced a small report giving an overview of the project which is available &lt;a href="http://epdt77.ph.bham.ac.uk:8080/webgrid/shortreport.pdf"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7710546271775573796-1746825491995792934?l=gridgadgets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://epdt77.ph.bham.ac.uk:8080/webgrid/' title='Finished'/><link rel='replies' type='text/html' href='http://gridgadgets.blogspot.com/2009/10/finished.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/1746825491995792934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/1746825491995792934'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/2009/10/finished.html' title='Finished'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/01308085297169165213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7710546271775573796.post-7331858816648551853</id><published>2009-07-31T14:49:00.002+01:00</published><updated>2009-07-31T16:11:45.501+01:00</updated><title type='text'>Another Update (Day 30)</title><content type='html'>As week six comes to a close I thought it was about time for another progress update. So same as last time, stealing the bullet points from 2 posts back, with new additions in italics. &lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;&lt;a href="http://gridportal-ws01.hep.ph.ic.ac.uk/gridload/"&gt;GridLoad&lt;/a&gt; style stacked charts.&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;A "League Table" (totaled over the time period).&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Pie charts (of the "League Table").&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Filters and/or sub filters (just successful jobs, just jobs by one VO, just jobs for this CE etc).&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;A tabbed interface.&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Regular Expression based filtering&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Variable Y-axis parameter (jobs submitted, jobs started, jobs finished etc).&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Transition to university web servers.&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Move to a more dynamic chart legend style.&lt;/del&gt; Not done for pie chart yet.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Ensure &lt;a href="http://www.w3.org/"&gt;w3&lt;/a&gt; standards compliance&lt;/del&gt;/cross-browser compatibility &amp;amp; testing.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Automate back end data-source (currently using a small sample data set). &lt;i&gt;Need automatic renewal of grid certificates.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Variable X-axis time-step granularity.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Data/&lt;i&gt;image&lt;/i&gt; export option.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;A list of minor UI improvements. (About 10 little jobs, not worth including in this list as they would be meaningless, without going into a lot more detail about how the gadget's code is implemented).&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Optimise database queries and general efficiency testing.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Make the interface more friendly. (Tool-tips etc.)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Possible inclusion of more "real time" data.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Gadget documentation.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;A Simple project webpage.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;A JSON data-source API reference page.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;2nd gadget, to show all know infon for a given JobID.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;2nd gadget: Add view of all JobIDs for one user (DN string).&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;The items in this list are now approximately in the order I intend to approach them.&lt;br /&gt;&lt;br /&gt;On another note, I have finally managed to get some decent syntax highlighting for google gadgets, thanks to this blog &lt;a href="http://www.guyrutenberg.com/2008/03/28/vim-syntax-highlighting-for-google-gadgets/"&gt;post&lt;/a&gt;  even if it means being stuck with &lt;a href="http://www.vim.org/"&gt;VIM&lt;/a&gt;. To get this to work add the vim modeline to the very bottom of the xml gadget file, other wise it tends to break things, such as the gadget title, if added at the top. Whilst VIM is not &lt;a href="http://www.geany.org/"&gt;my editor/IDE of choice&lt;/a&gt; it's pretty usable and can, with some configuration, match most of the &lt;a href="http://vimdoc.sourceforge.net/htmldoc/options.html#'list'"&gt;key&lt;/a&gt; &lt;a href="http://www.geany.org/manual/current/index.html#display"&gt;features&lt;/a&gt; (show whitespaces), I use in Geany. However Geany's &lt;a href="http://www.geany.org/manual/current/index.html#folding"&gt;folding&lt;/a&gt; feature would save a lot of time &amp; scrolling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7710546271775573796-7331858816648551853?l=gridgadgets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/another-update-day-30.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/7331858816648551853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/7331858816648551853'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/another-update-day-30.html' title='Another Update (Day 30)'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/01308085297169165213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7710546271775573796.post-1907302242585583415</id><published>2009-07-17T16:28:00.005+01:00</published><updated>2009-07-17T17:53:37.291+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='todo'/><category scheme='http://www.blogger.com/atom/ns#' term='progress'/><category scheme='http://www.blogger.com/atom/ns#' term='w3'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='openoffice'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><category scheme='http://www.blogger.com/atom/ns#' term='mySQL'/><title type='text'>Progress Update</title><content type='html'>Yesterday a gave a short presentation on the progress of this project. The slides for this presentation are available for &lt;a href="http://www.openoffice.org/"&gt;OpenOffice&lt;/a&gt; as &lt;a href="http://laurencehudson.co.uk/gadgets/gridgadgetsOO2.odp"&gt;OPD&lt;/a&gt; or as &lt;a href="http://laurencehudson.co.uk/gadgets/gridgadgetsOO2.pdf"&gt;PDF&lt;/a&gt;.&lt;br /&gt;The presentation included a summary of progress on the gadget outlined in the previous blog post. Using the bullet points from the previous post, the current to-do list now looks something like this (points in italics are new ideas):&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;&lt;a href="http://gridportal-ws01.hep.ph.ic.ac.uk/gridload/"&gt;GridLoad&lt;/a&gt; style stacked charts.&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;A "League Table" (totaled over the time period).&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Pie charts (of the "League Table").&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;Filters and/or sub filters (just successful jobs, just jobs by one VO, just jobs for this CE etc).&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;A tabbed interface.&lt;/del&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Variable X-axis time-step granularity.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Variable Y-axis parameter (jobs submitted, jobs started, jobs finished etc).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Data export option.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Automate back end data-source (currently using a small sample data set).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;del&gt;&lt;i&gt;Regular Expression based filtering&lt;/i&gt;&lt;/del&gt;&lt;i&gt; (Full regexp support added after the presentation.)&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Make the interface more intuitive, including tool-tips etc.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Optimise database queries.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Make the interface more friendly.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Move to a more dynamic chart legend style.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Ensure &lt;a href="http://www.w3.org/"&gt;w3&lt;/a&gt; standards compliance/cross-browser compatibility &amp; testing.&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;Possible inclusion of more "real time" data.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Today I was perticularly pleased to fix a small bug that had been a persistent problem for quite a while. This problem related to an &lt;a href="http://www.w3schools.com/SQl/default.asp"&gt;SQL&lt;/a&gt; database query containing both a &lt;a href="http://www.w3schools.com/sql/sql_groupby.asp"&gt;GROUP BY&lt;/a&gt; and a &lt;a href="http://www.w3schools.com/SQl/sql_where.asp"&gt;WHERE&lt;/a&gt; clause. Specifically I was grouping by a &lt;a href="http://www.w3schools.com/SQl/func_date.asp"&gt;DATE(columnid)&lt;/a&gt; and the produced result contained a &lt;a href="http://www.w3schools.com/SQl/sql_func_count.asp"&gt;COUNT&lt;/a&gt; of the number of jobs submitted per day WHERE the jobs had to meet a set of criteria. However the result set was far from optimal, specifically the WHERE clause caused the days for which there were no jobs meeting the criteria to be omitted from the results. Whilst this is perfectly reasonable, I required those days to be shown (but with a COUNT of '0' next to them). My initial thought was to &lt;a href="http://www.w3schools.com/SQl/sql_join.asp"&gt;JOIN&lt;/a&gt; (right outer) this results set onto a list of all possible days, unfortunately this had no effect as the WHERE clause still prevented COUNT '0' rows from being show (in reality these rows had a '&lt;a href="http://www.w3schools.com/SQL/sql_null_values.asp"&gt;NULL&lt;/a&gt;' COUNT instead of a '0' COUNT, which would have displayed). After much Google-ing, I eventually found the solution was rather trivial although not at all documented and very non-intuitive. I simply had to switch the WHERE for an &lt;a href="http://www.w3schools.com/SQl/sql_and_or.asp"&gt;AND&lt;/a&gt; (normally AND is used to chain WHERE clauses and as such can never normally appear without a preceding WHERE). A particularly unusual solution.&lt;br /&gt;&lt;br /&gt;Original: &lt;br /&gt;SELECT DATE(jobsubmitedtimestamp) AS date, COUNT(jobs) FROM maintable WHERE ui REGEXP 'ch' AND vo='alice' GROUP BY date;&lt;br /&gt;&lt;br /&gt;Joined, but still not right:&lt;br /&gt;SELECT &lt;span style="font-style:italic;"&gt;days.day&lt;/span&gt;, COUNT(jobs) FROM maintable &lt;span style="font-style:italic;"&gt;RIGHT JOIN days ON maintable.date=days.day&lt;/span&gt; WHERE ui REGEXP 'ch' AND vo='alice' GROUP BY &lt;span style="font-style:italic;"&gt;days.day&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;SELECT days.day, COUNT(jobs) FROM maintable RIGHT JOIN days ON maintable.date=days.day &lt;span style="font-style:italic;"&gt;AND&lt;/span&gt; ui REGEXP 'ch' AND vo='alice' GROUP BY days.day;&lt;br /&gt;&lt;br /&gt;(The above are simplified versions of the my queries.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7710546271775573796-1907302242585583415?l=gridgadgets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/progress-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/1907302242585583415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/1907302242585583415'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/progress-update.html' title='Progress Update'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/01308085297169165213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7710546271775573796.post-614441411528130046</id><published>2009-07-09T10:24:00.006+01:00</published><updated>2009-07-15T22:15:34.107+01:00</updated><title type='text'>First Gadget (Day 14)</title><content type='html'>A few days ago I "finished" my first &lt;a href="http://lcg.web.cern.ch/LCG/public/"&gt;WLCG&lt;/a&gt; monitoring gadget, although I use the term "finished" very loosely. More accurately my first proper attempt at a monitoring gadget had advanced to the stage at which it was usable and, if I was working with a full up to date data set not a small sample, it could potentially be useful. My original plan for this gadget and the gadget it's self are shown below.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_S22-QBNnNlE/SlW3ezZTmqI/AAAAAAAAABE/SZKkuyesXx8/s1600-h/aim.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 171px; height: 200px;" src="http://2.bp.blogspot.com/_S22-QBNnNlE/SlW3ezZTmqI/AAAAAAAAABE/SZKkuyesXx8/s200/aim.png" alt="" id="BLOGGER_PHOTO_ID_5356389071647382178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;[Embedded gadget removed (old gadget no longer functions, as data source has been updated)]&lt;br /&gt;&lt;br /&gt;It is now my intention to continue developing this gadget into something much richer in features and options. Some of the features that have been suggested and that I would eventually like to incorporate in to the gadget include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://gridportal-ws01.hep.ph.ic.ac.uk/gridload/"&gt;GridLoad&lt;/a&gt; style stacked charts.&lt;/li&gt;&lt;li&gt;A "League Table" (totaled over the time period).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Pie charts (of the "League Table").&lt;/li&gt;&lt;li&gt;Filters and/or sub filters (just successful jobs, just jobs by one VO, just jobs for this CE etc).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A tabbed interface.&lt;/li&gt;&lt;li&gt;Variable X-axis time-step granularity.&lt;/li&gt;&lt;li&gt;Variable Y-axis parameter (jobs submitted, jobs started, jobs finished etc).&lt;/li&gt;&lt;li&gt;Data export option.&lt;/li&gt;&lt;/ul&gt;A rough idea of what this might look like/how it might function is available &lt;a href="http://laurencehudson.co.uk/gadgets/gadgetfiles/LCGmonitoring_CountGraphs/plan.png"&gt;here&lt;/a&gt; (not embedded as its a large file). Another suggested feature has been to replace the legend with coloured check boxes for even easier showing/hiding of trends, however the &lt;a href="http://www.w3schools.com/HTMLDOM/dom_obj_checkbox.asp"&gt;HTML check box object&lt;/a&gt; does not allow use of colours. As such this goal has been put on hold for now until the rest of the design has been implemented.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7710546271775573796-614441411528130046?l=gridgadgets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/first-gadget-day-14.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/614441411528130046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/614441411528130046'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/first-gadget-day-14.html' title='First Gadget (Day 14)'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/01308085297169165213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_S22-QBNnNlE/SlW3ezZTmqI/AAAAAAAAABE/SZKkuyesXx8/s72-c/aim.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7710546271775573796.post-6143004349158970129</id><published>2009-07-02T16:27:00.005+01:00</published><updated>2009-07-02T17:03:35.924+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='igoogle'/><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><category scheme='http://www.blogger.com/atom/ns#' term='gadget'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Google Gadgets (Day 9)</title><content type='html'>For those unfamiliar with the concept of a Google Gadget, they are generally small "widgets" which can be added to any web page (although they are rarely used outside of &lt;a href="http://www.blogger.com/img/blank.gif"&gt;iGoogle homepages&lt;/a&gt;). Two sample gadgets are shown below, one very simple one and one less simple one.&lt;br /&gt;&lt;br /&gt;Counter gadget:&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;iframe id="1" name="1" src="http://1.blogger.gmodules.com/gadgets/ifr?lang=en&amp;amp;country=ALL&amp;amp;view=default&amp;amp;url=http://laurencehudson.co.uk/gadgets/gadgetfiles/counter.gadget" style="width: 200px; display: block;" frameborder="1" height="40"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;Date/time gadget:&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;iframe id="1" name="1" src="http://1.blogger.gmodules.com/gadgets/ifr?lang=en&amp;amp;country=ALL&amp;amp;view=home&amp;amp;url=http://www.google.com/ig/modules/datetime.xml" style="width: 430px; display: block;" frameborder="1" height="140"&gt;&amp;&lt;/iframe&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;The gadget its self consists of a publicly accessible &lt;a href="http://en.wikipedia.org/wiki/XML"&gt;XML&lt;/a&gt; file, for example: &lt;a href="http://laurencehudson.co.uk/gadgets/gadgetfiles/counter.gadget"&gt;Counter gadget&lt;/a&gt; or &lt;a href="http://www.google.com/ig/modules/datetime.xml"&gt;Date/time gadget&lt;/a&gt;. These XML files can contain a range of preference values including gadget title and author, but most importantly they contain a "CDATA" section. Within this section the data is read as &lt;a href="http://www.w3schools.com/html/"&gt;HTML&lt;/a&gt; text instead of XML, this is where the main content of the gadget resided. The HTML in this section is very similar to the HTML found in any standard web page, with a few key differences.&lt;br /&gt;&lt;br /&gt;Probably the biggest of these of differences is that the HTML no longer contains &amp;lt;head&amp;gt; or &amp;lt;body&amp;gt; tags, only the content of the "body" tag (as shown below). However this does not prevent the inclusion of &lt;a href="http://www.w3schools.com/css/css_intro.asp"&gt;CSS&lt;/a&gt; or &lt;a href="http://www.w3schools.com/JS/js_intro.asp"&gt;JavaScript&lt;/a&gt; which can still be included with the &amp;lt;script&amp;gt; or &amp;lt;style&amp;gt; tags in the "body" of the gadget.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;&lt;br /&gt;&amp;lt;Module&amp;gt;&lt;br /&gt;       &amp;lt;ModulePrefs title="hello world example" /&amp;gt;&lt;br /&gt;       &amp;lt;Content type="html"&amp;gt;&lt;br /&gt;               &amp;lt;![CDATA[&lt;br /&gt;                       &amp;lt;!-- START OF HTML --&amp;gt;&lt;br /&gt;                       Hello, World&lt;br /&gt;                       &amp;lt;!-- END OF HTML --&amp;gt;&lt;br /&gt;               ]]&amp;gt;&lt;br /&gt;       &amp;lt;/Content&amp;gt;&lt;br /&gt;&amp;lt;/Module&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;For anyone considering developing Google Gadgets it is definitely worth noting that Google implement heavy caching of Gadgets, as such even if you update the publicly accessible XML file for a Gadget you may not immediately see any change in the browser rendered Gadget. One easy way around this is to test your Gadget on an iGoogle homepage and adding the &lt;a href="http://www.google.com/ig/adde?moduleurl=www.google.com/ig/modules/developer.xml"&gt;developer&lt;/a&gt; &lt;a href="http://www.google.com/ig/adde?moduleurl=www.google.com/ig/modules/codechecker/codechecker.xml"&gt;gadgets&lt;/a&gt;, which allows you to disable the caching of certain Gadgets. However this will not prevent the caching of any external JavaScript or CSS files linked to by your Gadget.&lt;br /&gt;&lt;br /&gt;A further complication caused by the caching of gadgets is that this means they must be static, not dynamically generated. In the context of this project that means that the gadget file itself can not contain any of the ever-changing Grid data. As such any data required by the Gadget must be loaded with an &lt;a href="http://en.wikipedia.org/wiki/Ajax_(programming)"&gt;AJAX&lt;/a&gt; type call (in the project I will be using JSON responses instead of XML), the simplest way to prevent the requested page from being cached is to add a randomly generated number on to the end of the GET request url each time the page is called e.g. "'http://www.url.com/file.php?rand=' + randomNumber()". The more experienced web developer may at this point be asking, "aren't JavaScript GET requests locked to the current domain? How are you going to acess data outside of google.com", well the answer is yes it is domain locked, however Google provide a range of &lt;a href="http://code.google.com/apis/gadgets/docs/remote-content.html"&gt;alternatives&lt;/a&gt; to the standard JavaScript "&lt;a href="http://www.w3schools.com/XML/xml_http.asp"&gt;XmlHttpRequest()&lt;/a&gt;" function, each of which triggers google to act as an "AJAX proxy" such that the browser accesses the data from within the Google domain. This is shown schematically in the picture below, where steps 4-8 would be skiped if the Gadget file was already cached and 9-13 would be skipped if the requested page was already cached:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_wVlM3NCmqpI/SkzU3bYdiQI/AAAAAAAAAAM/dzOOr4F0VPI/s1600-h/flow3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 258px; height: 320px;" src="http://1.bp.blogspot.com/_wVlM3NCmqpI/SkzU3bYdiQI/AAAAAAAAAAM/dzOOr4F0VPI/s320/flow3.png" alt="" id="BLOGGER_PHOTO_ID_5353888105744926978" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7710546271775573796-6143004349158970129?l=gridgadgets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/google-gadgets-day-9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/6143004349158970129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/6143004349158970129'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/google-gadgets-day-9.html' title='Google Gadgets (Day 9)'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/08594993195751900686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_wVlM3NCmqpI/SkzU3bYdiQI/AAAAAAAAAAM/dzOOr4F0VPI/s72-c/flow3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7710546271775573796.post-3985349586525490405</id><published>2009-07-01T10:53:00.007+01:00</published><updated>2009-07-01T11:59:39.927+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data'/><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><category scheme='http://www.blogger.com/atom/ns#' term='GET'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='grid'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>The Journey Thus Far (Day 8)</title><content type='html'>As I mentioned in the previous post, the first part of this project involved finding a way to make the Grids "Logging and Bookkeeping" (L&amp;amp;B) data accessible to a Google Gadget. Initially it was suggested that I used a &lt;a href="http://www.python.org/"&gt;python&lt;/a&gt; &lt;a href="http://hoohoo.ncsa.illinois.edu/cgi/overview.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;CGI&lt;/span&gt;&lt;/a&gt; script  to simply parse the tab delimited data files provided. This data could then be used to the build a &lt;a href="http://en.wikipedia.org/wiki/JSON"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;JSON&lt;/span&gt;&lt;/a&gt; object, using the &lt;a href="http://code.google.com/apis/visualization/"&gt;Google Visualization &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;API&lt;/span&gt;&lt;/a&gt;, which could be returned in response to a &lt;a href="http://en.wikipedia.org/wiki/HTTP#Request_methods"&gt;GET request&lt;/a&gt; sent to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;CGI&lt;/span&gt;. However, upon receiving a sample of the L&amp;amp;B data it immediately became clear that this would not be a sensible approach. This was because for just one weeks worth of data the uncompressed file size exceeded several hundred &lt;a href="http://en.wikipedia.org/wiki/Megabyte"&gt;MB&lt;/a&gt;. As such using a single &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;CGI&lt;/span&gt; script to parse, process and return the data would result in all 882MB (or more if additional weeks are to be considered) of data being read in response to each GET request. This would be very computationally inefficient and result in large delays for the end user (it is also likely that the GET request would timeout before any data was returned).&lt;br /&gt;&lt;br /&gt;I therefore determined that the best approach would be to load the L&amp;amp;B data into a &lt;a href="http://www.mysql.com/"&gt;database&lt;/a&gt;, which could then be &lt;a href="http://en.wikipedia.org/wiki/SQL#Queries"&gt;queried&lt;/a&gt; to in response to a GET request and the required &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;JSON&lt;/span&gt; object built from the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;database's&lt;/span&gt; response. The architecture I had planned for the system looked something like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_S22-QBNnNlE/Sks-6pEwqOI/AAAAAAAAAAU/1SeWqgdHLIs/s1600-h/flow1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 257px;" src="http://4.bp.blogspot.com/_S22-QBNnNlE/Sks-6pEwqOI/AAAAAAAAAAU/1SeWqgdHLIs/s320/flow1.png" alt="" id="BLOGGER_PHOTO_ID_5353441759239121122" border="0" /&gt;&lt;/a&gt;For the database &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;RDBMS&lt;/span&gt; I am currently using a the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;excellent&lt;/span&gt; open-source &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;mySQL&lt;/span&gt;, although the L&amp;amp;B data only forms a single table. I think, although I haven't quite reached the current state of the project, I'll end this post for now, as I feel an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;explanation&lt;/span&gt; of the basic structure/layout of Google Gadget is needed before going any further.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7710546271775573796-3985349586525490405?l=gridgadgets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/journey-thus-far-day-8.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/3985349586525490405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/3985349586525490405'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/2009/07/journey-thus-far-day-8.html' title='The Journey Thus Far (Day 8)'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/01308085297169165213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_S22-QBNnNlE/Sks-6pEwqOI/AAAAAAAAAAU/1SeWqgdHLIs/s72-c/flow1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7710546271775573796.post-762241639101585325</id><published>2009-06-30T15:28:00.005+01:00</published><updated>2009-07-01T10:17:37.679+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data'/><category scheme='http://www.blogger.com/atom/ns#' term='CERN'/><category scheme='http://www.blogger.com/atom/ns#' term='birmingham'/><category scheme='http://www.blogger.com/atom/ns#' term='student'/><category scheme='http://www.blogger.com/atom/ns#' term='university'/><category scheme='http://www.blogger.com/atom/ns#' term='LHC'/><category scheme='http://www.blogger.com/atom/ns#' term='distributed computing'/><category scheme='http://www.blogger.com/atom/ns#' term='monitoring'/><category scheme='http://www.blogger.com/atom/ns#' term='grid'/><title type='text'>A Brief Introduction</title><content type='html'>Over the coming weeks I will be developing one or more &lt;a href="http://www.google.com/ig/"&gt;iGoogle&lt;/a&gt; &lt;a href="http://www.google.com/webmasters/gadgets/"&gt;Gadget&lt;/a&gt; with the aim a making the monitoring data recorded by "the &lt;a href="http://www.gridpp.ac.uk/"&gt;Grid&lt;/a&gt;" more accessible. Whilst there are &lt;a href="http://grid-observatory.org/"&gt;currently&lt;/a&gt; &lt;a href="http://gridportal.hep.ph.ic.ac.uk/rtm/"&gt;a&lt;/a&gt; &lt;a href="http://gridmap.cern.ch/gm/"&gt;range&lt;/a&gt; &lt;a href="http://pprc.qmul.ac.uk/%7Elloyd/gridpp/ukgrid.html"&gt;of&lt;/a&gt; &lt;a href="http://status.gridpp.rl.ac.uk/public/"&gt;tools&lt;/a&gt; &lt;a href="http://gridportal-ws01.hep.ph.ic.ac.uk/gridload/"&gt;available&lt;/a&gt; for visualising the Grid monitoring data "it can still be quite difficult to find answers to many straightforward questions". I will be undertaking this project at the University of Birmingham over a 10 week period, which will hope result in the production of a genuinely useful grid monitoring tool.&lt;br /&gt;&lt;br /&gt;For the benefit of anyone who happens to stumble upon this blog, who does not have a physics background, "the Grid" is large distributed network of computers predominantly used by particle physics researchers including those involved in the &lt;a href="http://public.web.cern.ch/public/en/LHC/LHC-en.html"&gt;LHC&lt;/a&gt; experiments at &lt;a href="http://public.web.cern.ch/public/"&gt;CERN&lt;/a&gt;. The Grid has a hierarchical design consisting of several higher tier regional centers, each connected to many lower tier nodes, &lt;a href="http://maps.google.com/maps?q=http:%2F%2Fgridportal-ws01.hep.ph.ic.ac.uk%2Fdynamic_information%2Frtm_beta.kmz"&gt;totaling&lt;/a&gt; "more than 140 computing centres in 34    countries". The "distributed grid" approach was selected due to the large computing requirement of the LHC's data analysis.&lt;br /&gt;&lt;br /&gt;In this project I will specifically working with the data recorded by the grids "Logging and Bookkeeping" service inconjunction with the various "Workload Management Systems" (WMS). This data consists of 37 fields of information relating to each "job" submitted to the Grid. Initially I will be dealing with the issue of making this data available in such a form that it can easily be accessed and read by the the &lt;a href="http://code.google.com/apis/visualization/"&gt;Google Visualization API&lt;/a&gt;. Once I have achieved this I should be able to move on to creating gadgets to display this data in the most useful and informative way.&lt;br /&gt;&lt;br /&gt;So far I have been working on this project for 7 days. I intend to follow up this post with a summery of my progress thus far, as well as a regular series of progress reports.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7710546271775573796-762241639101585325?l=gridgadgets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='text/html' href='http://gridgadgets.blogspot.com/2009/06/brief-introduction_30.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/762241639101585325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7710546271775573796/posts/default/762241639101585325'/><link rel='alternate' type='text/html' href='http://gridgadgets.blogspot.com/2009/06/brief-introduction_30.html' title='A Brief Introduction'/><author><name>Laurence Hudson</name><uri>http://www.blogger.com/profile/08594993195751900686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
