High-Performance Predictive XML Parsing with gSOAP

Download Report

Transcript High-Performance Predictive XML Parsing with gSOAP

High-Performance
Predictive XML
Parsing with gSOAP
Robert van Engelen
Florida State University
The gSOAP Toolkit

v1.1
streaming
XML;
SOAP1.1
RPC
Project timeline
v1.2
latency
hiding;
WSDL
output
v2.0
v1.3
v2.1
v2.2
v2.3
v2.4
v2.5 v2.6 v2.7
HTTPS MT/safe DIME streaming SOAP1.2 Doc/Lit; WS-BP1.0a
SwA;
SSL
DIME
WSDL1.1
WS-*
tools
>50,000 downloads
www.genivia.com
http://gsoap2.sourceforge.net
Early Versus Late Bindings
Static proxy generation with schema-specific DFA-based XML parsing
Static proxy generation with schema-specific PDA-based XML parsing
Static proxy generation with generic XML parsing
Dynamic proxy generation (DII) with generic XML parsing
LATE BINDING
flexibility
performance
EARLY BINDING
gSOAP Architecture

Static binding



Schema-specific predictive XML parsing


WSDL tools to generate bindings
Stub/skeleton compiler to generate C and C++ code
Supports in-situ serialization and deseralization of
application’s native C/C++ data structures in XML
Integrated stacks


TCP/IP - HTTP/S - DIME/MIME - SOAP/XML
Transport latency hiding
Client Application Development
and Deployment
Service definition:
service.wsdl
WSDL Importer
Client Application
Bindings:
service.h
Client Proxy Object
gSOAP Compiler
Client-side code
Stub
Marshal
Demarshal
Server Development and
Deployment
Service definition:
service.wsdl
WSDL Importer
Web Service
Bindings:
service.h
Server Object
gSOAP Compiler
Server-side code
Skeleton
Marshal
Demarshal
Server Development and
Deployment (Alternative)
Web Service
Bindings:
service.h
Server Object
gSOAP Compiler
Service definition:
service.wsdl
Server-side code
Skeleton
Marshal
Demarshal
Schema-Specific Predictive
XML Parsing
Bindings
XML Schemas
WSDL Importer &
gSOAP Compiler
<complexType name=“List”>
<complexContent>
<sequence>
<element name=“item”
type=“xsd:string”
maxOccurs=“unbounded”/>
</sequence>
</complexContent>
</complexType>
Predictive
XML Parser
class ns__List
{ std::vector<char*> item;
int in(char* tag);
int out(char *tag);
};
int ns__List::in(char* tag)
{ if (begin_element(tag) != OK)
return TAG_MISMATCH;
in_vectorOfstring(item, “item”);
end_element(tag);
}
Latency Hiding with Integrated
Stacks
Serialization
HTTP
over
TCP/IP
Deserialization
Latency and Speedup
Interop Round 2 Base echoVoid() latency
gSOAP
XSOAP
AxisC++
.NET
AxisJava
alpha
v1.1.4322
v1.2
0.0027
0.0034
0.0101
2.4
Latency
(sec)
0.0013
0.0016
better
Relative average speedup for array-based SOAP messages
(10 to 80,000 ints, doubles, and strings)
gSOAP
XSOAP
2.4
Speedup
20.3
14.0
.NET
AxisC++ AxisJava
v1.1.4322
alpha
v1.2
14.0
10.7
1.0
better
DFA-Based Parsing
Expat
gSOAP
DFA (opt)
better
DFA
Conclusions





Static bindings with predictive XML parsing
delivers performance
Two-stage compilation 1) bindings 2) code
Integrated stacks to improve performance
DFA-based parsing probably too limited for
realistic applications
More info: http://gsoap2.sourceforge.net