Overview of WMS/LB API Emidio Giorgio www.eu-egee.org
Outline API vs. CLI Overview of WMProxy API Overview of Logging and Bookkeeping API Usage examples
API vs. CLI Users applications can be integrated on grid either using CLI users have to provide code invoking command line and handling outputs Pros faster deploy Cons tight dependency from command line behavior bad performance API calls to middleware services are embedded within applications Pros better perfomance real integration of application Cons slower deploy
CLI approach
CLI approach Your application Command line User Interface
CLI approach Your application Command line User Interface
CLI approach Your application Command line User Interface
CLI approach Your application Command line User Interface
CLI approach Your application Command line User Interface
CLI approach Your application Command line User Interface
CLI approach Your application Command line User Interface Output
API approach API
API approach Your application API
API approach Your application API
API approach Your application API
API approach Your application API
API approach Your application API Output
API Rub-up API are usually provided as libraries libraries have to be included when compiling the application code $ gcc -o simple-job-stat -I/opt/glite/include -L/opt/glite/ lib -lglite_lb_client_gcc32dbgpthr myappl.c calls to functions provided are inserted inside the application code // get the filesystem path to jdl-file from CLI string jdlpath=argv[argc -1]; jdl::ad ad; // declare a new ClassAd // initialize the ClassAd with file content ad.fromfile (jdlpath); // convert AD to String and save it in jdlstring string jdlstring (ad.tostring()); /* call joblistmatch */ vector < pair < string,long > > matchingces = joblistmatch(jdlstring, delegationid, &cfg);
WMS API glite 3.1 $ rpm -qa grep -i glite-wms grep api glite-wms-wmproxy-api-python-3.1.8-4.slc4 glite-wms-wmproxy-api-java-3.1.3-1 glite-wms-wmproxy-api-cpp-3.1.10-5.slc4 $ rpm -ql glite-wms-wmproxy-api-cpp-3.1.10-5.slc4 /opt/glite/include/glite/wms/wmproxyapi /opt/glite/include/glite/wms/wmproxyapi/wmproxy_api.h /opt/glite/include/glite/wms/wmproxyapi/wmproxy_api_utilities.h /opt/glite/lib/libglite_wms_wmproxy_api_cpp.a /opt/glite/lib/libglite_wms_wmproxy_api_cpp.so /opt/glite/lib/libglite_wms_wmproxy_api_cpp.so.0 [cut...] Allow to list-match and submit a jdl file output retrieve more details during practicals JDL API are requested too Have a look to the included header files to check out how to improve functionalities and info provided
LB API Not directly deployed same libraries used by command lines are included Only in C For each query to LB, expressed through the job ID, a struct is returned, and filled with all the information about the queried job Users inspect the returned struct in order to get infomations about the job Challenge Improve the output provided from the example providing more info? Have a look to edg_wll_queryattr within /opt/glite/include/glite/lb/consumer.h to see what can be obtained from a query
Material Working examples http://grid.ct.infn.it/twiki/bin/view/gilda/apiusage http://grid.ct.infn.it/twiki/bin/view/gilda/wmproxycppapi http://grid.ct.infn.it/twiki/bin/view/gilda/apilbcpp http://grid.ct.infn.it/twiki/bin/view/gilda/apijavawmproxy References Google...