130 likes | 223 Views
Use of Web Services. Stephen Mock San Diego Supercomputer Center TeraGrid 2007 Madison, WI. Outline. What Are Web Services? Services Offered by and for TeraGrid Example Available Documentation. Example Job Gateway WS Use. UC Santa Barbara. Batch Queue Prediction Service. Gateway.
E N D
Use of Web Services Stephen Mock San Diego Supercomputer Center TeraGrid 2007 Madison, WI
Outline • What Are Web Services? • Services Offered by and for TeraGrid • Example • Available Documentation TeraGrid 2007
Example Job Gateway WS Use UC Santa Barbara Batch Queue Prediction Service Gateway TeraGrid MDS MDS4 Info Service 1. How long will this job take on TG-Resource X? What is the endpoint of WS-Gram and RFT On TG-Resource X? Web Services TG-Resource X Submit/Monitor Job WS-GRAM Job Submission Stage and unstage files RFT File Transfer TeraGrid 2007
What Are Web Services? • Interoperable machine-to-machine application accessed over a network • No Graphical User Interface (GUI) • XML used to define the datatypes and operations • Language and Operating System Independent • XML documents passed back and forth • Services described in standardized XML document called WSDL • Stateless TeraGrid 2007
Why Use Web Services • If you’re building software that makes use of remote data or operations • Want to use a programmatic API within your software • Don’t care about Platform/Language of the web service TeraGrid 2007
Services Offered By TeraGrid • Globus Toolkit 4 Services • MDS4 : Information Discovery • WS-Gram : Job Submission, control, and monitoring • RFT : File movement • Delegation Service : Credential Delegation • GRAM4-Audit : Job Cost Information • NWS Batch Queue Prediction Service TeraGrid 2007
MDS4 • GT4 Service • Each TG Resource has an IndexService • Contains resource-specific information • Service locations, software versions, #’s of CPUs, free CPUs, queue names • Reports info to TG-wide IndexService • MDS.TERAGRID.ORG • Aggregating point for TG-wide information • Authenticated MDS • Requires credentials for access • Sensitive info like queue listings • WebMDS website listing MDS info • http://mds.teragrid.org:8080/webmds/webmds?info=indexinfo&xsl=sgservicetablexsl TeraGrid 2007
WS-Gram • GT4 Service • Web Service version of GRAM from GT 2.x • Job Submission • Either ‘fork’ or to a scheduler like pbs, lsf, loadleveler • Job Defined in XML • Simple Job Example <?xml version="1.0" encoding="UTF-8"?> <job> <executable>/bin/echo</executable> <directory>${GLOBUS_USER_HOME}</directory> <argument>Welcome to the Teragrid.</argument> <stdout>${GLOBUS_USER_HOME}/echo-stdout.txt</stdout> <stderr>${GLOBUS_USER_HOME}/echo-stderr.txt</stderr> </job> TeraGrid 2007
Reliable File Transfer (RFT) • GT4 Service • Transfer files to and from TG-Resources • Relies on GridFTP’s 3rd party transfer • Adds reliability, retry, and recovery over globus-url-copy Data Source TG-Resource 1 myFile 1. Please move myFile To TG-Resource 2 GridFTP 3rd PartyTransfer Data Destination TG-Resource 2 Third Party Transfer TeraGrid 2007
NWS Batch Queue Prediction Service • Predict queue wait time for specific job size • Predict probability specific job will run given a deadline • No credentials needed • Developed by and running at UCSB • http://nws.cs.ucsb.edu/ewiki/nws.php?id=Batch+Queue+Prediction TeraGrid 2007
NWS Code Example package edu.ucsb.cs.nws; public class NwsBatchqClient { public static void main(String[] args) throws Exception { NwsBatchqServiceLocator loc = new NwsBatchqServiceLocator(); NwsBatchqSoapBindingStub stub = (NwsBatchqSoapBindingStub) loc.getNwsBatchq(); System.out.println(stub.getMachines()); //prints list System.out.println(stub.predict(0, //timestamp "datastar", //machine "normal", //queuename 4, //# of nodes 34l, //wallTime (s) 0, 0)); } } TeraGrid 2007
Example Job Gateway WS Use UC Santa Barbara Batch Queue Prediction Service Gateway TeraGrid MDS MDS4 Info Service 1. How long will this job take on TG-Resource X? What is the endpoint of WS-Gram and RFT On TG-Resource X? Web Services TG-Resource X Submit/Monitor Job WS-GRAM Job Submission Stage and unstage files RFT File Transfer TeraGrid 2007
Documentation • Documentation on TG Wiki • http://www.teragridforum.org/mediawiki/index.php?title=TeraGrid_Science_Gateways_Primer • http://www.teragridforum.org/mediawiki/index.php?title=Teragrid_Web_Services_Documentation TeraGrid 2007