The gSOAP Toolkit.ppt

上传人:progressking105 文档编号:373279 上传时间:2018-10-05 格式:PPT 页数:27 大小:1,001KB
下载 相关 举报
The gSOAP Toolkit.ppt_第1页
第1页 / 共27页
The gSOAP Toolkit.ppt_第2页
第2页 / 共27页
The gSOAP Toolkit.ppt_第3页
第3页 / 共27页
The gSOAP Toolkit.ppt_第4页
第4页 / 共27页
The gSOAP Toolkit.ppt_第5页
第5页 / 共27页
亲,该文档总共27页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、IEEE CCGrid May 22, 2002,1,The gSOAP Toolkit,Robert van Engelen Kyle Gallivan Florida State University,IEEE CCGrid May 22, 2002,2,Overview,Web Services gSOAP design and implementation Results Conclusions,IEEE CCGrid May 22, 2002,3,Web Services: the Big Picture,SOAP RPC,SOAP DSIG WSDL UDDI,IEEE CCGri

2、d May 22, 2002,4,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,IEEE CCGrid M

3、ay 22, 2002,5,WSDL,Web Service registers with UDDI Web Service publishes WSDL Clients can develop proxies from the WSDL for SOAP RPC and messaging,IEEE CCGrid May 22, 2002,6,gSOAP,Open source (C, C+, and Java) 2000 registered users Uses a source-to-source stub and skeleton compiler to automate the i

4、ntegration 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,IEEE CCGrid May 22, 2002,7,gSOAP Goals,Application-centric Minimize application code adaptation Support (de)marsh

5、alling of applications 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,IEEE CCGr

6、id May 22, 2002,8,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/T

7、CP/SOAP and XML API,Stub/Skeleton and Marshalling Code,User application,Runtime Library,gSOAP-generated,IEEE CCGrid May 22, 2002,9,Development,Server,IEEE CCGrid May 22, 2002,10,Development,Client,IEEE CCGrid May 22, 2002,11,Example,Service description (WSDL): Namespace: urn:xmethods-delayed-quotes

8、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 ,Client code: main() float q; if (soap_call_ns_getQuote(“URL”, “”, “AOL”, q) = 0) cout “A

9、OL: “ q endl; ,IEEE CCGrid May 22, 2002,12,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,IEEE CCGrid May 22, 2002,13,Serialization,gSOAP gen

10、erates 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,IEEE CCGrid May 22, 2002,14,Serialization Example,struct BG int val; st

11、ruct BG *left; struct BG *right; ;, 1 2 3 ,IEEE CCGrid May 22, 2002,15,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

12、-patching method: resolve forward refs later by copying pointers and/or referenced data,IEEE CCGrid May 22, 2002,16,Deserialization Example,1,2,3,IEEE CCGrid May 22, 2002,17,Results,Interoperability testing Legacy code integration Scalability and performance,IEEE CCGrid May 22, 2002,18,Interoperabil

13、ity Testing,WhiteMesa.org “interop lab” Suite of test cases designed for real-time interoperability testing over the Web Apache Axis, .NET, Delphi,IEEE CCGrid May 22, 2002,19,Legacy Code Example: Linear System Solver,Application code from Numerical Recipes in C Web Service: LU Decomposition Backsubs

14、titution Solve Multi-solve Matrix inversion,IEEE CCGrid May 22, 2002,20,Linear System Solver,Original Numerical Recipes in C routine: ludcmp(double *a, int n, int *indx, double *d) sum = aij; ,Modified routine (array size n stored in class instances): ludcmp(matrix *a, ivector *indx, double *d) sum

15、= aij; ,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,IEEE CCGrid May 22, 2002,21,Linear System Solver,Remote procedure declaration for stub and skeleton generation with gSOAP: n

16、s_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_ludcmpRespons

17、e ,IEEE CCGrid May 22, 2002,22,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”, “”, ,IEEE CCGrid May 22, 2002,23,Scalability and

18、 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,IEEE CCGrid May 22, 2002,24,Matrix Inversion,S

19、tand-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),IEEE CCGrid May 22, 2002,25,CGI-Based Web Service,Total time of client request and server response (10Ba

20、seT, Dual PIII 550MHz, Red Hat Linux) SOAP XML-encoded 32bit int matrix SOAP Base64-encoded 32bit int matrix,IEEE CCGrid May 22, 2002,26,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),IEEE CCGrid May 22, 2002,27,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,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 教学课件 > 大学教育

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1