1 / 14

Faster Web services

Faster Web services. A proposal on how web service communication could be made faster. Reasons for Performance Degradations in Web services. Verbose nature of HTTP/SOAP Network / Internet Latency Synchronization Problems Parsing XML strings Other similar bottlenecks. XML.

aaralyn
Download Presentation

Faster Web services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Faster Web services A proposal on how web service communication could be made faster

  2. Reasons for Performance Degradations in Web services • Verbose nature of HTTP/SOAP • Network / Internet Latency • Synchronization Problems • Parsing XML strings • Other similar bottlenecks

  3. XML • XML is self describing Advantages • Offers flexibility and readability • Interoperability with other webservice Disadvantages • Inflates the data considerably • XML encoding adds overhead of almost 400% against equivalent Binary encoding formats* * A. Mani and A. Nagarajan. Understanding quality of service for Web services. http://www-106.ibm.com/developerworks/library/ws-quality.html, Jan. 2002.

  4. Some of the reasons for the performance drag in ICIS v5 WS • .NET Library is J-I-T compiled on the first instance • Java classes are J-I-T compiled on the first instance • Large amounts of time spent in parsing the returned XML, payload is too verbose. • .NET Interop, CCW is computationally expensive (bridge)

  5. Possible Solution • Restructure returned XML • Eliminate redundant tags • XMill Compression • Fast Infoset Project Specification • Binary encoding

  6. Restructuring returned XML • Example of XML returned from ICIS 5 JWS <list> <object-array>- <icis.Name> <nid>22446</nid> <gid>663</gid> <ntype>6</ntype> <nstat>1</nstat> <nuid>1</nuid> <nval>AZUCENA</nval> <nlocn>171</nlocn> <ndate>0</ndate> <nref>1</nref> </icis.Name> <icis.Germplasm> ……. </icis.Germplasm> </object-array> …. </list> Redundant end tags adds overhead to the XML

  7. Proposed restructuring <list> <object-array> <icis.Name> 22446 663 6 1 1 AZUCENA 171 0 1 </icis.Name> <icis.Germplasm> …….</icis.Germplasm> </object-array> …. </list> Or still <Name 22446 663 6 1 1 AZUCENA 171 0 1 /> • Advantages • Reduces redundant tags • Achieves reductions by almost 60% • Disadvantages • Receiver has to know the tags represented by the XML

  8. Xmill Compression • Used for XML data archiving and exchange • Uses zlib the library functions of gzip • AT&T Labs Research

  9. Xmill Logic • Separate data from structures • Group data items with related meaning • Apply different compressors to different containers • Compressed .xmi format is not human readable • Use xdemill to decompress xmi files to xml files Disadvantages • Adds to the processing time, especially in the compression phase, and can affect server-side performance.

  10. Example • A Select * on names table returned a XML similar to the XML returned by ICIS v5 WS • Size of returned XML is 337MB • Size of file after applying XMill compression 12.7MB • Percentage compression achieved almost 96%

  11. Fast Infoset Project Specification • Proposes an alternative to the W3C XML syntax • Binary Format for XML Infosets • This representation generally provides smaller encoding sizes and faster processing • To facilitate interoperability, the Fast Infoset specification uses the existing and proven ASN.1 standards • http://java.sun.com/developer/technicalArticles/xml/fastinfoset/

  12. Some features of Fast Infoset • No end-tags. The duplication of characters for end-tags is not required. • Indexing of repeated strings. Indexing reduces the size of the document by replacing a commonly-used string with an integer. Element and attribute names are examples of such repeated strings. • Indexing of qualified names.

  13. Dynamic Compression • Users of webservice have to choose between compressed or simplified XML which reduces latency time but increases processing time and between verbose XML which increases latency time but considerably reduces processing or parsing time taken to persist the XML data to programmatic objects. • Alternative to this approach would be dynamic compression

  14. Dynamic Compression • In this, clients specify, when they request a service, whether they want to receive responses in compressed format from the server. • Server compresses only the request of the clients that required such a service.

More Related