High-Performance Predictive XML Parsing with gSOAP - PowerPoint

Document Sample
High-Performance Predictive XML Parsing with gSOAP - PowerPoint Powered By Docstoc
					High-Performance
Predictive XML
Parsing with gSOAP
Robert van Engelen
Florida State University
     The gSOAP Toolkit
           Project timeline




   v1.1        v1.2     v1.3  v2.0    v2.1   v2.2     v2.3   v2.4      v2.5 v2.6 v2.7
streaming    latency   HTTPS MT/safe DIME streaming SOAP1.2 Doc/Lit; WS-BP1.0a   SwA;
  XML;       hiding;    SSL                 DIME           WSDL1.1               WS-*
SOAP1.1      WSDL                                            tools
   RPC        output

                                                               >50,000 downloads
                                    www.genivia.com
                             http://gsoap2.sourceforge.net
       Early Versus Late Bindings

                                    EARLY BINDING


              Static proxy generation with schema-specific DFA-based XML parsing
performance




                                                                                   flexibility
              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
gSOAP Architecture
   Static binding
       WSDL tools to generate bindings
       Stub/skeleton compiler to generate C and C++ code
   Schema-specific predictive XML parsing
       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        Server-side code        Skeleton

                                          Marshal   Demarshal
 Service definition:
   service.wsdl
 Schema-Specific Predictive
 XML Parsing
                                                 Bindings
                        WSDL Importer &
     XML Schemas                                Predictive
                        gSOAP Compiler
                                               XML Parser

                                 class ns__List
                                 { std::vector<char*> item;
<complexType name=“List”>
                                    int in(char* tag);
  <complexContent>
                                    int out(char *tag);
    <sequence>
                                 };
      <element name=“item”
       type=“xsd:string”
                                 int ns__List::in(char* tag)
       maxOccurs=“unbounded”/>
                                 { if (begin_element(tag) != OK)
    </sequence>
                                     return TAG_MISMATCH;
  </complexContent>
                                   in_vectorOfstring(item, “item”);
</complexType>
                                   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
                  2.4                     alpha   v1.1.4322     v1.2
     Latency    0.0013   0.0016      0.0027       0.0034      0.0101
        (sec)
                                 better

Relative average speedup for array-based SOAP messages
          (10 to 80,000 ints, doubles, and strings)
                gSOAP    XSOAP        .NET        AxisC++ AxisJava
                 2.4                 v1.1.4322     alpha        v1.2
     Speedup     20.3     14.0         14.0        10.7         1.0
                                 better
DFA-Based Parsing



   Expat

  gSOAP




                    better
    DFA

DFA (opt)
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