Presentation is loading. Please wait.

Presentation is loading. Please wait.

IEEE CCGrid May 22, 20021 The gSOAP Toolkit Robert van Engelen Kyle Gallivan Florida State University.

Similar presentations


Presentation on theme: "IEEE CCGrid May 22, 20021 The gSOAP Toolkit Robert van Engelen Kyle Gallivan Florida State University."— Presentation transcript:

1 IEEE CCGrid May 22, 20021 The gSOAP Toolkit Robert van Engelen Kyle Gallivan Florida State University

2 IEEE CCGrid May 22, 20022 Overview Web Services gSOAP design and implementation Results Conclusions

3 IEEE CCGrid May 22, 20023 Web Services: the Big Picture SOAP RPC SOAP DSIG WSDL UDDI

4 IEEE CCGrid May 22, 20024 SOAP Light-weight protocol based on XML as the marshalling format for data in request and response messages  Vendor- and platform-neutral  Language-neutral  Object-model-neutral  Transport-neutral XML allows data transformation (XSLT) XML enables long-term data persistence

5 IEEE CCGrid May 22, 20025 WSDL Web Service registers with UDDI Web Service publishes WSDL Clients can develop proxies from the WSDL for SOAP RPC and messaging

6 IEEE CCGrid May 22, 20026 gSOAP Open source (C, C++, and Java) >2000 registered users Uses a source-to-source stub and skeleton compiler to automate the integration of SOAP RPC in applications  Automates the deployment of (legacy) C/C++ applications as Web Services  Automates the development of clients Suitable for high-performance computing

7 IEEE CCGrid May 22, 20027 gSOAP Goals Application-centric  Minimize application code adaptation  Support (de)marshalling of application’s native data structures in SOAP/XML  Preserve the logical structure of data Minimize data migration overhead and formatting errors  Avoid (hand-written) wrappers  Generate fast (de)marshalling routines and streaming XML parsers  Efficient run-time remote object allocation

8 IEEE CCGrid May 22, 20028 The gSOAP Stub and Skeleton Compiler Generates source code stubs and skeletons for SOAP RPC Generates XML (de)marshalling routines for native and user- defined C/C++ data types The gSOAP runtime provides low- level HTTP, TCP, SOAP/XML handling and memory management capabilities HTTP/TCP/SOAP and XML API Stub/Skeleton and Marshalling Code User application Runtime Library gSOAP-generated

9 IEEE CCGrid May 22, 20029 Development Service Application gSOAP-generated Skeleton Routines gSOAP-generated Request Dispatcher Specification of Data Types and Remote Procedures in C/C++ Header File gSOAP Compiler Server WSDLIDL

10 IEEE CCGrid May 22, 200210 Development Specification of Data Types and Remote Procedures in C/C++ Header File gSOAP-generated Stub Routines Client Application Client WSDLIDL gSOAP

11 IEEE CCGrid May 22, 200211 Example Service description (WSDL): Namespace: urn:xmethods-delayed-quotes Method name: getQuote Input parameter: symbol of type xsd:string Output parameter: result of type xsd:float Generated remote procedure declaration for stub generation with gSOAP: ns__getQuote(char *symbol, float &result); Client code: main() { float q; if (soap_call_ns__getQuote(“URL”, “”, “AOL”, q) == 0) cout << “AOL: “ << q << endl; }

12 IEEE CCGrid May 22, 200212 Encoding C/C++ Data Types in XML Primitive C/C++ types, enum, struct/class with single inheritance, pointers, arrays, special types (e.g. base64) Not supported: unions, void*, templates, multiple inheritance

13 IEEE CCGrid May 22, 200213 Serialization gSOAP generates serialization routines for application types Serialization code traverses object graph at run time to detect co- referenced objects and cycles Serialization code outputs object graph in XML according to SOAP encoding rules

14 IEEE CCGrid May 22, 200214 Serialization Example struct BG { int val; struct BG *left; struct BG *right; }; 1 2 3 1 2 3

15 IEEE CCGrid May 22, 200215 Deserialization gSOAP generates deserialization code, including schema-driven XML pull parser  Auto-validating  Streaming  Fast: match inbound XML elements to “expected” elements in the schema Keep table with “forward” XML refs  Back-patching method: resolve forward refs later by copying pointers and/or referenced data

16 IEEE CCGrid May 22, 200216 Deserialization Example 123 1 2 3

17 IEEE CCGrid May 22, 200217 Results 1. Interoperability testing 2. Legacy code integration 3. Scalability and performance

18 IEEE CCGrid May 22, 200218 Interoperability Testing WhiteMesa.org “interop lab” Suite of test cases designed for real-time interoperability testing over the Web Apache Axis,.NET, Delphi,…

19 IEEE CCGrid May 22, 200219 Legacy Code Example: Linear System Solver Application code from Numerical Recipes in C Web Service:  LU Decomposition  Backsubstitution  Solve  Multi-solve  Matrix inversion

20 IEEE CCGrid May 22, 200220 Linear System Solver Original Numerical Recipes in C routine: ludcmp(double **a, int n, int *indx, double *d) { … sum = a[i][j]; … } Modified routine (array size n stored in class instances): ludcmp(matrix *a, ivector *indx, double *d) { … sum = a[i][j]; … } C++ class declarations for the generation of (de)serializers with gSOAP: class vector { double *__ptr; // pointer to array of double int __size; // run-time array size double& operator[](int i); }; class matrix { vector *__ptr; // pointer to array of vectors int __size; // run-time array size double& operator[](int i); };

21 IEEE CCGrid May 22, 200221 Linear System Solver Remote procedure declaration for stub and skeleton generation with gSOAP: ns__ludcmp ( matrix *a, // input matrix struct ns__ludcmpResponse { matrix *a; // output matrix ivector *i; // output index reordering vector double d; // output parameter for determinant } *result ) Remote procedure SOAP server interface routine called by skeleton: ns__ludcmp(matrix *a, struct ns__ludcmpResponse &result) { result.a = a; // input to output matrix if (ludcmp(result.a, result.i, &result.d) != 0) return SOAP_FAULT; return SOAP_OK; }

22 IEEE CCGrid May 22, 200222 Linear System Solver Linear system solver server code (CGI-based): main() { soap_serve(); // process request (skeletons) } Example client code: main() { struct ns__ludcmpResponse result; matrix a; … if (soap_call_ns__ludcmp(“URL”, “”, &a, &result) != 0) soap_print_fault(stderr); … }

23 IEEE CCGrid May 22, 200223 Scalability and Performance Scalability and overhead of communication vs. computation  LU-based matrix inversion Performance (send 32bit int matrix)  Full SOAP XML-encoded matrix  SOAP Base64-encoded matrix  CGI-based SOAP Web Service  Stand-alone SOAP Web Service  Java RMI

24 IEEE CCGrid May 22, 200224 Matrix Inversion Stand-alone linear system solver service (TCP sockets) Full double fp. matrix representation in SOAP XML Total time of client request and server response (10BaseT, Dual PIII 550MHz, Red Hat Linux)

25 IEEE CCGrid May 22, 200225 CGI-Based Web Service Total time of client request and server response (10BaseT, Dual PIII 550MHz, Red Hat Linux) SOAP XML-encoded 32bit int matrix SOAP Base64- encoded 32bit int matrix

26 IEEE CCGrid May 22, 200226 Stand-Alone Service and Java RMI Total time of client request and server response (10BaseT, Dual PIII 550MHz, Red Hat Linux) SOAP XML-encoded 32bit int matrix SOAP Base64- encoded 32bit int matrix Java RMI (1.2.2)

27 IEEE CCGrid May 22, 200227 Conclusions Application centric SOAP/XML Web Service interoperable Legacy numerical code integration Scalability and performance Future work:  IDL  DIME  Performance enhancements  Peer-to-peer networks


Download ppt "IEEE CCGrid May 22, 20021 The gSOAP Toolkit Robert van Engelen Kyle Gallivan Florida State University."

Similar presentations


Ads by Google