09.07.2015 Views

SAGA: A Simple API for Grid Applications High-Level Application ...

SAGA: A Simple API for Grid Applications High-Level Application ...

SAGA: A Simple API for Grid Applications High-Level Application ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SAGA</strong> ET AL.: THE SIMPLE <strong>API</strong> FOR GRID APPLICATIONS 9Fig. 8.Code Example: Create a streaming clientFig. 9.Code Example: Potential RPC representation in <strong>SAGA</strong>#include int main (int argc, char** argv){// create stream to server contact in argv[1]saga::stream s (argv[1]);}// open the connections.connect ();// message to write in argv[2]s.write (argv[2]);// the stream gets destroyed at and of scope,// connection is closed in destructorE. Possible <strong>SAGA</strong> Extensions (Future Work)As described above, the current scope of the <strong>SAGA</strong> <strong>API</strong>specification is intentionally very limited, and drawn from afinite set of use cases. However, the <strong>SAGA</strong>-WG has receiveda number of requests to widen the scope of the <strong>API</strong>, and anumber of additional use cases <strong>for</strong> the respective areas havebeen submitted. <strong>SAGA</strong> is intended to follow up with theserequests in future versions of the specification. This sectionallows the reader a glimpse of the <strong>SAGA</strong> future, and describesthese extensions. It must be noted though that all materialdescribed here is very preliminary, and represents by no meansany part of the current <strong>SAGA</strong> specification.1) Monitoring and Steering: The ability to monitor remoteapplications (and in fact any remote grid resource) is integralpart of a number of received use cases. <strong>SAGA</strong> currently onlyallows polling of specific monitorables, such as the state ofjobs and tasks. <strong>Application</strong> level monitoring and steering iscurrently not supported. A number of use cases have beensubmitted to the group though, which require monitoring andsteering, in particular in the context of visualization.The UK-eScience project ‘Reality<strong>Grid</strong>’ [5] designed andimplemented a grid monitoring and steering infrastructure[36]. The Reality<strong>Grid</strong> Steering <strong>API</strong> has been used acrossa wide range of different scientific applications — rangingfrom classical molecular dynamics, lattice-Boltzmann simulationsand Monte-Carlo simulations of polymers — providingtestimony to its flexibility and breadth. Together withthe monitoring capabilities of GAT (which derive from themonitoring package Mercury [37]), the Reality<strong>Grid</strong> <strong>API</strong> willprobably <strong>for</strong>m the basic input <strong>for</strong> a future <strong>SAGA</strong> monitoringand steering <strong>API</strong>.2) Remote Procedure Calls: As described in section III, the<strong>Grid</strong>RPC Working Group in GGF defined another applicationoriented <strong>API</strong>, which provides Remote Procedure Calls (RPCs)in grid environments. The <strong>Grid</strong>RPC-WG and the <strong>SAGA</strong>-WGstarted to actively pursue the integration of <strong>Grid</strong>RPC into<strong>SAGA</strong>. That would provide a consistent look & feel <strong>for</strong> both<strong>API</strong>s, and provide grid application programmers with a morecomplete and more consistent set of programming paradigms.An example <strong>for</strong> the current candidate <strong>API</strong> extension is shownin Figure 9.#include #include #include void sample_rpc (){try{// initialize rpc function handlesaga::rpc handle("gridrpc://remote.host.net/bin_date");// initialize in/out argument stackstd::list stack;// call the remote functionhandle.call (stack);std::cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!