Wednesday, April 30, 2008

Useful TeraGrid REST Information Services

Courtesy of J. P. Navarro and Laura Pearlman. See http://info.teragrid.org for more. These aren't all strictly REST but close enough for my purposes. They return simple XML formats.

Here's how you can get a list of Grid services on Abe at NCSA.
http://info.teragrid.org/restdemo/xml/tg/sites/ncsa.teragrid.org/resources/abe.ncsa.teragrid.org/kits/data-movement.teragrid.org/services

Some other examples:
http://info.teragrid.org/restdemo/xml/tg/services/gridftp
http://info.teragrid.org/restdemo/xml/tg/services/prews-gram
http://info.teragrid.org/restdemo/xml/tg/services/ws-gram


Some finer grained examples using XPath.

Give me all gridftp URLs in TeraGrid:
http://info.teragrid.org:8080/webmds/webmds?info=tgislocal&xmlSource.tgislocal.param.xpathQuery=//KitRegistration//Service[Type='gridftp']/Endpoint

Give me all gridftp URLs at NCSA:
http://info.teragrid.org:8080/webmds/webmds?info=tgislocal&xmlSource.tgislocal.param.xpathQuery=//KitRegistration[SiteID='ncsa.teragrid.org']//Service[Type='gridftp']/Endpoint

Give me the URLs of all advertised services at Big Red:
http://info.teragrid.org:8080/webmds/webmds?info=tgislocal&xmlSource.tgislocal.param.xpathQuery=//KitRegistration[ResourceID='bigred.iu.teragrid.org']//Service/Endpoint

Give me a little more information about all services at Big Red:
http://info.teragrid.org:8080/webmds/webmds?info=tgislocal&xmlSource.tgislocal.param.xpathQuery=//KitRegistration[ResourceID='bigred.iu.teragrid.org']//Service

Friday, April 04, 2008

Mildly Interesting KML+Google Maps Bug

Google map keys are of course tied to a particular base URL. You can get a key for http://localhost for development, but you may have noticed this isn't necessary: maps will load correctly in http://localhost/ for any map key.

However, you can't load KML into your maps on localhost unless you are using a key for http://localhost. That is, your map will load but the KML overlay wont' be added. That is,

geoXml=new GGeoXml("http://mapgadgets.googlepages.com/cta.kml");
map.addOverlay(geoXml);

won't add the overlay to your map if you are using mismatched keys. To see this in inaction, try serving up the code sample http://code.google.com/apis/maps/documentation/examples/geoxml-kml.html
from your own web server (using your own key, of course). First try using localhost:8080 and then use http://your.real.server.name:8080/. This assumes the google key was generated for http://your.real.server.name:8080/.