XML-RPC Agents for Distributed Scientific Computing
|
Overview
|
Goals
Component project [Gannon], Globus [Foster], the Grid [Foster], Nasa IPG, WebFlow [Fox] |
Goals (cont'd)
|
Component-Based SystemsWell known desktop component systems are CORBA, DCOM, ActiveX, Java Studio, Java Voyager
|
Object-Registry ServiceComponent systems offer simple object-registry services
|
Problems with Component Systems in Scientific Computing
|
Encapsulating Applications using Wrappers
|
SOAP: Simple Object Access ProtocolSOAP is a remote procedure calling protocol for the Internet.SOAP is an XML/HTTP-based protocol for accessing services, objects and servers in a platform-independent manner SOAP v1.1 recently submitted for standardization by W3C SOAP is available as a package for Java, Perl, and C(++)/COM SOAP main transport is HTTP but is adaptable:
|
Problem: SOAP for C/C++ Consist of I/O Libraries onlyC/C++ library routines for I/O of SOAP client and server applicationsRoutines to translate SOAP payload to/from internal XML tree representation (DOM) Translation between DOM and internal data structures necessary
for many applications
Thus, the development of a SOAP enabled application costs
significant programming efforts as the XML serialization must be implemented
by hand
|
Project 1: Automatic Wrapper CompilationFor legacy codes written in Fortran and C, our solution is to automatically generate wrapper routines for direct SOAP data exchange and RPC without resorting to JavaThe compiler takes native data type definitions as source and produces routines to serialize and deserialize the actual data in C Serialization effectively traverses the data structures thereby producing a flattened representation by avoiding traversing nodes in a data structure graph multiple times FORTRAN version of the wrapper compiler will rely on compiling
C interfaces that are linked with FORTRAN program
|
SOAP v1 Stub Compiler for C
|
Supported Data Types
|
Example Compiler Inputstruct matrix { ... };
struct vector { ... };
int solve(struct matrix A, struct vector b, struct vector *x); |
Example Compiler Outputint soap_call_solve(char *URL, struct matrix A, struct vector b, struct vector *x)
{ ... }
int soap_serve() { ... }
User calls soap_call_serve(...) in client application
To set up the service, user writes main program and the solver: main() { soap_serve(); }
int solve(struct matrix A, struct vector b, struct vector *x) { ... }
The user then compiles the program and installs executable
as a CGI application
The generated programs allow client-server model (shown), message-passing model, or Gannon's component system model with containers |
Example SOAP Request and ResponseClient request:POST /~engelen/solve.cgi HTTP/1.1 Host: www.cs.fsu.edu Content-Type: text/plain Content-Length: 192 SOAPMethodName: solve <SOAP:Envelope xmlns:SOAP="urn:schemas-xmlsoap-org:soap.v1"> <SOAP:Body> <solve> <matrix>...</matrix> <vector>...</vector> </solve> </SOAP:Body> </SOAP:Envelope>Server response: <SOAP:Envelope xmlns:SOAP="urn:schemas-xmlsoap-org:soap.v1"> <SOAP:Body> <vector>...</vector> </SOAP:Body> </SOAP:Envelope> |
Some Implementation IssuesMinimal space and time overhead for serializing and deserializing the C data structures
![]() <s><p href="#7"/> <a><int>5</int>...<int id="7">3</int>... </a> </s> |
Resolving Name ConflictsXML namespace mechanism allows identification of different data structures sharing same name but are conceptually differentElectronic address versus physical address: struct e__address { char *email; ... };
struct p__address { char *street; ... };
Define namespaces (run-time adaptable):
struct Namespace namespaces[] =
{ "e", "urn:my-electronic-address",
"p", "urn:my-physical-address"
};
SOAP payload:
<e:address xmlns:e="urn:my-electronic-address"> <email>engelen@cs.fsu.edu</email> ... |
Project 2: Registry and Indexing of Scientific ServicesRegistry and indexing methods for non-scientific applications are well developedEg. CORBA, Jini location service However, characterization of scientific applications is very often functional behavior (eg. solve linear system) We need a generic semantic description of behavior eg. using lambda calculus notation with OpenMath Example: solve = lambda (A,b).(A^-1*b) OpenMath technology includes "content dictionaries" for sparse matrix forms, definitions of common mathematical operations, and a type system OpenMath design is "compositional": function composition is central for component composition XML namespace mechanism can be used to distinguish specific
services by name, eg. a sattelite image provider
|
Project 3: Connecting Applications using Mobile AgentsIn general, mobile agents can move to large data sources to perform a local computation on the data and to bring back the data products
|
Example ScenarioPredicting the impact of the pollution of a river on the environmentComponents:
|
Conclusions
|