The Effects of Data Compression on Performance of Service-Oriented Architecture (SOA)

Document Sample
The Effects of Data Compression on Performance of Service-Oriented Architecture (SOA) Powered By Docstoc
					    International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
       Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012                                          ISSN 2278-6856



      The Effects of Data Compression on
 Performance of Service-Oriented Architecture
                     (SOA)
                                 Hosein Shirazee1, Hassan Rashidi2,and Hajar Homayouni3
                         1
                          Department of Computer, Qazvin Branch, Islamic Azad University, Qazvin, Iran
                             2
                             Department of Computer, Qazvin Branch, Islamic Azad University, Qazvin, Iran
                                     3
                                      Department of Computer, Al-Zahra University, Tehran, Iran



Abstract: Due to the various areas of applicability, there is a    2. PREREQUISITES
need for overcoming performance problem of service oriented
architecture. In this paper, the impressive parameters on             2.1 XML in service oriented architecture
response time in service oriented architecture are determined.
                                                                   XML is a data format for web service infrastructure. It is
One of the important factors in reducing response time is the
size of data being transferred in the network. Therefore, in       an open standard and flexible format which can represent
this research the effect of using compressing algorithms on        various types of text data. XML documents are readable
response time is analyzed. The experimental results obtained       by human beings which is much better than binary
using two compressing algorithms and XML dataset show              formats. Furthermore, metadata can be embedded
that using compressing algorithms has a deep impact on             between XML documents. However, using XML as data
reducing response time and increasing the whole
                                                                   representation format in web services leads to data
performance of service oriented architecture.
                                                                   processing and transferring overhead.
Keywords:Service Oriented Architecture Performance,
Compressing Algorithm, Response time                               The size of XML messages is 10 to 20 times larger than
                                                                   binary form of data, thus their transferring time on
                                                                   networks is too long. As XML is based on text, a
1. INTRODUCTION
                                                                   preprocessing on it is needed before any kind of
Service oriented architecture as a novel and complete way          operations which includes at least 3 following activities
of implementing distributed architecture through services          that all need CPU and memory.
with loose coupling is applicable for different                     Decomposition: transforming XML data to correct
organizations and applications. The main problem of this               structure of components used XML. This
architecture is its performance which is the result of being           decomposition includes lots of processes on strings.
loose coupling and its heterogeneous nature. Due to the
                                                                    Validation: a step before or through decomposition
various areas of applicability, there is a need for
                                                                       phase for making sure about the correct structure of
overcoming performance problem of service oriented                     received data. This phase might take even more time
architecture. For this purpose, the reasons of this problem            than decomposition phase, especially when DDT or
should be analyzed and some well-defined metrics for                   schema is specified remotely.
performance measurement should be indicated [1].
                                                                    Transformation: this is transforming one XML
In this paper, the effective parameters on response time in
                                                                       structure to other. This phase is commonly when
service oriented architecture are indicated first, and
                                                                       integration between services and components obtained
showes that one of the important factors in response time
                                                                       from different providers is needed. This phase can
is the size of data being transferred. Therefore, the effect
                                                                       reduce XMLdecomposition speed 10 times less and
of using compressing algorithms on response time is
                                                                       should be taken in to consideration as the first factor
analyzed. The experimental results obtained using two
                                                                       for increasing performance of web services[2].
compressing algorithms and XML (as a data format for
                                                                   Different techniques for minimizing transformation and
web service infrastructure) dataset show that using
                                                                   processing cost are proposed that some of them are
compressing algorithms has a deep impact on reducing
                                                                   mentioned as follows.
response time and increasing the whole performance of
                                                                    Utilization of compressing approach on XML
service oriented architecture. The rest of the paper is
                                                                       documents: in this method both compression and
organized as follows.Section 2 speaks about some
                                                                       decompression times should be considered.
prerequisites for the research. Section 3 is our proposed
                                                                    Using dedicated decomposition model: this approach
method and section 4 and 5 are obtained results analysis.
                                                                       helps to use a specified model for each decomposition
Finally section 6 is about future works.
                                                                       ways. For example when there is a need to edit or read
Volume 1, Issue 2 July-August 2012                                                                                 Page 265
   International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
       Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012                                          ISSN 2278-6856


  a part of document, it’s better to use an document           files: (1) XML documents include two very different
  object model but if a serial reading of data is needed,      kinds of data: markup and payload. (2) There is a reason
  it’s better to use programmatically interface for XML        for using markup in XML documents, and by
  or there is a need to read only a part of a whole            compressing it as if were payload, we reduce the
  document, it’s better to read it locally instead of          usefulness of the document. For instance, an XML
  reading all of a document.                                   document compressed with Gzip cannot be queried using
 Not using validation: in most of cases that there is an      XQuery [10]without first decompressing the entire
  assurance that XML document are well-defined, there          document. The simplest XML-aware compressors are
  is no need to validate documents. In addition, when a        substitution-based algorithms that work at the markup
  XML document is validated, it’s possible to convert it       level. BXML [11]is an example which is an adaptive
  to a non-included DDT or schema document.                    algorithm that maintains a dictionary of already seen
  Although caching non-local DDT or schema is                  tags, attributes and namespace prefixes while scanning an
  another way.                                                 XML document. When a previously seen entity is
                                                               encountered, it is replaced by a single byte. This byte is
   2.2 XML document compression
                                                               an index in the embedded dictionary. The compression
The use of compressing methods can lead to a reduction         algorithm compresses only the markup of the XML
in the information transferred size and response time and      document. BXML is a simpler version of the Wireless
therefore an increasing in the whole performance of            Application Protocol (WAP) Binary XML (WBXML)
system. Choosing an appropriate method to compress data        [12]. A major difference between BXML and WBXML is
is an important task. Generally speaking there are three       that the dictionary of WBXML also includes well-known
different classes of XML data compression methods that         attribute values.
are explained as follows.                                      The main problem with both BXML and WBXML is the
                                                               limited token space that one byte can offer. BXML solves
   1. General purpose Compression algorithm:                   this by using limited memory and by replacing dictionary
Gzip [3], [4] is based on Huffman coding [5] and LZ77          entries as needed using a FIFO strategy. WBXML uses
algorithm [6]. Bzip2 [7] is an implementation of the           different code spaces, each divided into code pages.
Burrows-Wheeler block-[8]sorting algorithm [9]. This           Therefore, the meaning of a byte token is dependent on
algorithm has three-stage process. The first stage, called     the code space and code page currently in use. Millau
block sort, is a pre-processor that makes data more            [13], [14]is for improving WBXML. A major difference
compressible which is achieved by dividing the data into       between these two compression schemes is that Millau
N blocks, and by performing all possible cyclic shifts of      separates the XML markup from payload by putting them
these blocks to form an N × N matrix. In this matrix, the      in different streams. Millau further tries to solve the
rows are the N unique rotations which are then sorted in       problem of the limited token space of WBXML in two
lexicographical order. The shift and sort operations bring     ways: (1) by optimizing the scheme used by WBXML and
commonly repeated strings close to each other. The row         by trying to minimize the code page switches; (2) by
number of the original row in the sorted matrix is             trying variable byte encoding, where the frequency of a
included; therefore the pre-processor increases the size of    token effects on the number of bytes needed to encode it.
the data. In the second stage of the algorithm, this data is   The frequency is either guessed from the XML Schema
typically passed to a simple move-to-front encoder, where      Definition (XSD) or the Document Type Definition
each symbol that was previously seen is encoded using the      (DTD) file, or calculated while analyzing the XML
distance from where it was last seen. The last stage of the    document.
algorithm is a statistical compressor (e.g., Huffman
coding). The LZ77 algorithm is a substitution-based            While improving on the simple substitution-based
compressor. In this algorithm, data sequences previously       WBXML, Millau attempts to separate markup from
seen are replaced with (1) a tuple including a reference to    payload. The XMill [15]compressor uses a similar
the previously seen data and (2) the length of the             strategy and a simple binary encoding for the markup of
sequence. In LZ77, the previously seen data is limited to      the document. Based on tag names, the payload is then
data available in a fixed-size read buffer which is referred   divided into different containers. It is assumed that
to as a window, and the reference to previously seen data      related data items in the payload will show a greater
is given relative to that window.                              redundancy when grouped. Each container can utilize its
                                                               own compression scheme, including custom-made
  2. XML Aware Compression Algorithm:                          compressors.
There are two important problems when treating XML as
                                                               XMLPPM [16] is a Prediction by Partial Match- based
general-purpose data, both due to the fact that XML
                                                               (PPM) compressor algorithm [17]. This algorithm uses
messages are generally more structured than most text
                                                               the input data to build a statistical model and exploits this
Volume 1, Issue 2 July-August 2012                                                                              Page 266
   International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
       Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012                                          ISSN 2278-6856


model to generate a probability distribution which can        However, they all rely on the schema, so if this schema
help predict the next symbol and is then used by an           changes, all the encoders and decoders must be
arithmetic coder [18]. XMLPPM first transforms the            regenerated and deployed. This can require recompilation
XML document into Encoded SAX (ESAX), which is a              and redeployment, depending on the structure of the
binary version of the Simple API for XML (SAX) similar        software. This makes them application specific.
to BXML. Then, this ESAX representation serves as
input to several multiplexed PPM encoders.
   All above-mentioned compression algorithms have the        3. PROPOSED METHOD
same problem which is the lack of support for queries.        In this research the effective parameters on response time
Many compression algorithms (e.g., LZ77) are adaptive.        of web services used in service oriented architecture and
While adaptive algorithms do not require several passes       their effects are analyzed. Due to the fact that the
to compress a file, they present the disadvantage that the    messages transferred between web services are in
representation of a compressed string depends on the          standard XML format and this format is too long, it is
actual location of the string in the file. Therefore, to      necessary to compress this information. In other words, in
support queries, one must be able to search the               this research it is claimed that one of the effective factors
compressed payload. XGrind[19], which is another XML          on response time in service oriented architecture is the
compressor, solves this problem by separating markup          length of messages to be transferred. In this paper, the
from payload, and then applying a non-adaptive                influence of using compression algorithms on response
Huffman-based compression scheme for the payload. The         time in service oriented architecture is studied in real
XCQ [20]system uses an adaptive compression scheme,           experiments.
but divides the payload into smaller blocks that are
compressed independently of each other. This way, only
relevant blocks need to be decompressed before they can          3.1 Effective parameters on response time
be queried.                                                   In this part parameters which have influence on response
   3. Schema-aware Compression Algorithm:                     time in service oriented architecture are indicated
The previous compressors exploit the separation between       separately and the effect of data compression in response
XML markup and payload, but note the fact that the            time when it is applied on source and destination is
markup of an XML document can be further specified by         analyzed. The response time is defined as the time needed
a schema defined in an XSD or a DTD file. These               for calculating the response by a web service.
schema-aware methods do not encode the parts of the
XML Infoset that can be reconstructed by the decoder of        Encoding and decoding time:
the receiving party. These encoders and decoders are          Due to the fact that the Standard XML format is utilized
automatically generated from the XML Schema; much             for data transitions, the encoding and decoding time is
like a compiler front-end can be generated from a             composed of the time needed for data preparation in
grammar. For instance, the encoder/decoder approach can       standard XML format and also data extraction on
help to remove tag names and namespace prefixes.              destination and vice versa.
Millau includes a schema-aware compression scheme
known as Differential DTD, in which only the non-              The number of transferred messages:
predictable parts of the DTD are included. Examples of        Any services can response to a limited number of requests
non-predictable parts consist of choice, optional elements,   and any requests use some hardware resources and in
and unbounded lists. Levene and Wood [21]also suggest a       some cases services cannot response to different requests
similar approach.                                             simultaneously. Therefore the number of transferred
Schema-aware encodings consist of Fast Schema and Bin-        messages can effect on response time in service oriented
XML. Fast Schema is part of Sun’s Fast Web Services           architecture. For simplification, the simultaneous
technology [22]. An XML document representing a Web           messages can be ignored and consider that only one
Service message is serialized into a corresponding            request is sent to the destination each second.
document in Abstract Syntax Notation One (ASN.1). The
ASN.1 description is generated from the XML Schema,            Average compression rate:
which in turn is retrieved from the WSDL specification of     Different compressing algorithm differs in compression
a Web Service. Another schema-aware method is Bin-            rate. The higher the compression rate of algorithm is, the
XML [23] which supports dynamic updates and random            lower the transferring data time gets. This leads to a
access.                                                       reduction in response time and an increasing in
Schema-aware methods generally present better                 throughout of web services and finally results in
opportunities to achieve a higher compression ratio, since    performance of service oriented architecture.
they can drop information which is not necessary.
Volume 1, Issue 2 July-August 2012                                                                             Page 267
   International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
       Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012                                          ISSN 2278-6856


                                                               the percentage of compression using these algorithms are
 The number of processes needed for transferring in           calculated (table 1 and figure 1) and then the needed time
    Http and TCP protocols:                                    for compression or decompression processes is indicated
Using HTTP and TCP protocols for transferring                  (table 1 and figure 1). Each algorithm was 15 minutes in
messages, the number of processes involved effect on           run mode in order to obtain more accurate results.
message transferring time in source and destination.           Furthermore, 5 data packs with different size but all
 Passing time from network components:                        related to web service invocation are used to increase
A local network contains some components such as               accuracy and indicate the effect of data size on
routers and other equipment. The needed time for passing       compressing algorithm.
from these components are sometimes considerable.               Table 1: The percentage of compression using Bzip2 and
 The geographical distance:                                                        BXML algorithms
Considering service oriented architecture as a kind of
distributed architecture, the geographical distance                                                   Data Size(KB)
between service provider and service invoker might be too             Compressing
long. Suppose that the information are transferred in light                           .7         32       65       100         130
                                                                        Algorithm
speed in long distances, thus in small distances this time
will be almost equal to zero.                                               Bzip2     69         30       16       11          6

  3.2 Data compression effects analysis                                     BXML      81         64       55       45          46
 Choosing an appropriate data set:
Since there is no training data set for web services in web
service community, in this research we prepared a
standard data set for our tests. This data set includes some         100
SOAP messages (for instance XML documents) which are                  80
real data and are used in other experiments. Two main                 60
                                                                      40                                                       Bzip2
ideas for creating this data set are:
   1. The data set should contain real world data                     20                                                       BXML
   2. The data set should be common in web services                    0
       messages.
                                                                            0.7 32 65 100 130
For this purpose we use a dataset which concerns with
database invoked by web services. This dataset is
messages related to a web service invocation which
provides the access to a database. For accessing to this       Figure 1The percentage of compression using Bzip2 and
                                                                                BXML algorithms
database, the web service receives an SQL query as an
input to read from database and run it on the database and       Table 2: The compression time according to data size
the resulted output is returned in XML format. Each
column is tagged in this output. These tags are repeated                                                   Data Size(KB)
for each extracted record from database.                                Compression
The size of resulted document varies from 700 B to 130                 Algorithm           .7         32       65        100         130
KB. This leads to an acceptable dataset for XML
                                                                            Bzip2          .03        3        7          9          15
messages in real world.
 Choosing appropriate compressing algorithms:
                                                                            BXML           .01        1        2.5       3.1          4
Two different open source algorithms i.e. BXML and
Bzip2 are selected for doing our experiments. There was
an implementation for Bzip2 algorithm in .Net
framework. Since no implementation was found for                      100
                                                                                                                        without
BXML, we implement it in .Net framework.
                                                                                                                        compress
                                                                       50                                               ion
4. EXPERIMENTAL RESULTS
                                                                                                                        Bzip2
In this part the results obtained using two compressing                 0
algorithms and XML dataset are analyzed. The
algorithms are implemented using .Net framework. The                        0.7 32 65 100130
performance of data transfer using compression is
studied. For this purpose both algorithms are executed in      Figure 2The average response time of web service using
the same conditions using the same platforms. First of all                    compressing algorithm

Volume 1, Issue 2 July-August 2012                                                                                                 Page 268
   International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
       Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012                                          ISSN 2278-6856


5. RESULTS                                                        data can be very important as a future work.
This research is based on this fact that using XML          References
standards in Service Oriented Architecture and large
amount of data in this standard will cause low              [1]     M. Ericsson, "The Effects of XML Compression on
performance in this system. Because of that, using                  SOAP Performance," WorldWide Web, vol. 10, pp.
compressing algorithm will increase response time and               279-307, 2007.
performance on Service Oriented Architecture.               [2]     S. Chen, B. Yan, J. Zic, R. Liu and A. Ng,
This research has presented a new way to decrease                   "Evaluation and Modeling of Web Services
response time in Service Oriented Architecture. This                Performance," in IEEE International Conference on
technique includes using a compression algorithm and                Web Services, 2006.
improving response time in this architecture. With          [3]     . P. Deutsch, "DEFLATE Compressed Data Format
analyzing experiments results, we can approve that:                 Specification version 1.3. RFC 1951," in IETF,
 Using compressing algorithms when data size is more               1996.
    than a threshold may increase response time and         [4]     P. Deutsch, "GZIP file format specification version
    improve performance,but when data size is no more               4.3. RFC 1952," in IETF, 1996.
    than a threshold, compression’s overhead causesin
                                                            [5]     D. Huffman, "A method for the construction of
    increasing response time.
                                                                    minimum redundancy codes," in Proceedings of the
 Network bandwidth has a positive effect on using                  Institute of Radio Engineers, 1952.
    compression algorithm. In lower bandwidth network,
                                                            [6]     . J. Ziv and A. Lempel, "A universal algorithm for
    compression ratio and decreased data size can have a
                                                                    sequential data compression," IEEE Trans.
    less threshold. But higher bandwidth network needs a            Inf.Theory., p. 337–343, 1977.
    higher threshold.
                                                            [7]     J. Seward, "The bzip2 home page.," 1997. [Online].
 In order to compressing Bzip2 and BXML and
                                                                    Available: http://sources.redhat.com/bzip2/.
    experiments results, can inference that Bzip2
    algorithm has a better compression ratio. When          [8]     Advanced Risc Machines: An Introduction to
                                                                    Thumb, 1995.
    BXML algorithm was used, compression ratio was
    never more than 45 percent. In the other side, when     [9]     G. Manzini, "The Burrows-Wheeler transform:
    Bzip2 was used 6 percent compression ratio was                  theory and practice," in Proceedings of the 24th
                                                                    International     Symposium      on    Mathematical
    achieved.
                                                                    Foundations of Computer Science (MFCS). LNCS,,
 Although BXML algorithm’s compression ratio is less
                                                                    1999.
    than Bzip2 algorithm, it has less processing time in
    average. For example for compressing a specified data   [10]    . M. Fernández, A. Malhotra, J. Marsh and M.
                                                                    Nagy , "XQuery 1.0 and XPath 2.0 data model
    with a size of 100 KB through BXML algorithm 3 sec
                                                                    (XDM)," Recommendation REC-xpath-datamodel-
    is consumed whereas for compressing same data using
                                                                    20070123, 2007.
    Bzip2 9 sec is needed.
                                                            [11]    M. Ericsson and R. Levenshteyn, "On optimization
 In experiments with data size of 65 KB, both of two
                                                                    of XML-based messaging," in Proceedings of the
    different ways has an equal time. Since although
                                                                    2nd Nordic Conference on Web Services, 2003.
    compressing this size of data hasn’t an equal time,
    BXML has a less consumed time for compressing data      [12]    "Wireless Application Protocol: Wireless Markup
                                                                    Language Specification version 1.3," 2000.
    in comparison with Bzip2.
                                                                    [Online]. Available: http://www.wapforum.org.
6. FUTURE WORKS                                             [13]    M. Girardot and N. Sundaresan, "Millau: an
                                                                    encoding format for efficient representation and
  Due to research experiments and related works we can              exchange of XML documents over the WWW," in
suggest following ways for future:                                  Proceedings of the 9th InternationalWorld Wide,
 Using other Compressing Algorithms:                               2000.
   We have considered 2 different XML Data                  [14]    . N. Sundaresan and R. Moussa, "Algorithms and
   compressing algorithms and as a future work, it’s                programming models for efficient representation of
   good to use other algorithmsto compare with these                XML for internet applications," in Proceedings of
   ones.                                                            the 10th International Conference on World Wide
 Studying Encryption methods affection:                            Web (WWW), 2001.
   Using encryption algorithm for transferring XML data     [15]    . H. Liefke and D. Suciu, "XMill: an efficient
   is regular and will have effect on performance and               compressor for XML data," in Proceedings of the
   compressing ratio. In this case, Studying encryption             2000      ACM      International    Conference   on
   method and a finding a good method for compressing
Volume 1, Issue 2 July-August 2012                                                                               Page 269
   International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
       Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012                                          ISSN 2278-6856


       Management of Data (SIGMOD), 2000.
[16]   J. Cheney, "Compressing XML with multiplexed
       hierarchical PPM models," in Proceedings of the
       IEEE Data Compression Conference, 2001.
[17]   J. Cleary and I. Witten, "Data compression using
       adaptive coding and partial string matching," IEEE
       Trans. Commun, p. 396–402, 1984.
[18]   A. Moffat, R. Neal and I. Witten, "Arithmetic
       coding revisited," in Proceedings of the 5th IEEE
       Data Compression Conference, 1995.
[19]   . P. Tolani and J. Haritsa, "Xgrind: a query-friendly
       XML compressor," in Proceedings of the 18th
       International Conference on Data Engineering
       (ICDE), 2002.
[20]   W. Lam, . W. Ng, P. Wood and M. Levene, "XCQ:
       XML compression and querying system," in
       Proceedings of the 12th International World Wide
       Web Conference (WWW), 2003.
[21]   M. Levene and P. Wood, "XML structure
       compression," School of Computer Science and
       Information Systems, Birkbeck College, University
       of London, 2002.
[22]   P. Sandoz, S. Pericas-Geertsen, K. Kawaguchi and
       M. Hadley, "Fast Web Services.," Sun Developer
       Networ,        2003.        [Online].     Available:
       http://java.sun.com/developer/technicalArticles/Web
       Services/fastWS.
[23]   R. Berjon, "Expway’s position paper on binary
       infosets," in Proceedings of the 2003 W3C
       Workshop on Binary Exchange of XML
       Information Sets, 2003.




Volume 1, Issue 2 July-August 2012                                                  Page 270

				
DOCUMENT INFO
Description: International Journal of Emerging Trends & Technology in Computer Science (IJETTCS) is an online Journal in English published bimonthly for scientists, Engineers and Research Scholars involved in computer science, Information Technology and its applications to publish high quality and refereed papers. Papers reporting original research and innovative applications from all parts of the world are welcome. Papers for publication in the IJETTCS are selected through rigid peer review to ensure originality, timeliness, relevance and readability. The aim of IJETTCS is to publish peer reviewed research and review articles in rapidly developing field of computer science engineering and technology. This journal is an online journal having full access to the research and review paper. The journal also seeks clearly written survey and review articles from experts in the field, to promote intuitive understanding of the state-of-the-art and application trends. The journal aims to cover the latest outstanding developments in the field of Computer Science and engineering Technology.