Analysing Performance of XML Data Binding Solutions for SOS Applications
-
Upload
cybera-inc -
Category
Technology
-
view
697 -
download
2
Transcript of Analysing Performance of XML Data Binding Solutions for SOS Applications
Analysing Performance of XML Data Binding Solutions for SOS Applications
Alain Tamayo, Carlos Granell, Joaquín Huerta Geospatial Technologies Research Group, Universitat Jaume I, Spain
SWE 2011, Oct 6-‐7, Banff, Alberta, Canada
Analysing Performance of XML Data Binding Solutions for SOS Applications 2
1 . Motivation
SOS-‐based applications are commonplace in server, web and desktop environments.
It’s just a matter of time they become commonplace in mobile devices
Analysing Performance of XML Data Binding Solutions for SOS Applications 3
2 . Motivation
SOS protocols are based in large schemas that describes the structure of exchanged messages in XML format (+700 types, +80 schema files)
• Low-‐Level APIs: • Tree APIs: DOM
• Streaming APIs: SAX, StaX, … • XML Data Binding: XMLBeans, JAXB,
XBinder, …
Using low-‐level APIs in the presence of large schemas is time-‐consuming and error-‐prone.
Using XML data binding is advised, but frequently generated code needs more computational resources.
Analysing Performance of XML Data Binding Solutions for SOS Applications 4
3 . Objectives
• To analyse to what extent the use of XML data binding solutions is a problem in SOS applications running in different platforms (Windows 7 and Android): • Execution speed (without including storage or network transfer
times).
• Memory consumption • Size of generated code
Analysing Performance of XML Data Binding Solutions for SOS Applications 5
4 . Experimental Setup
• 4 datasets of real SOS data: • CAPS (capabilities files)
• SD (Sensor description files) • OBS (Observation files)
• MEA (Measurement files)
• 4 XML data binding tools: • XMLBeans (PC)
• JAXB (PC) • XBinder (PC and Mobile)
• DBMG (PC and Mobile)
• 2 Hardware platforms: • HTC Desire Android Phone (1 GHz CPU, 576 RAM)
• Windows 7 PC (Intel Quad Core i7 2.8 GHz CPU, 8GB RAM)
Analysing Performance of XML Data Binding Solutions for SOS Applications 6
5 – Execution Speed (CAPS Dataset)
Mobile Scenario PC Scenario
The execution times for the mobile phone were about 60 times slower than for the personal computer.
XML processing code does not seem to be a bottleneck for PCs.
High processing times for mobiles raises the question if the current SOS protocol is appropriate for being implemented in these devices. XML is a verbose format.
Analysing Performance of XML Data Binding Solutions for SOS Applications 7
6 – Execution Speed (SD Dataset)
• SD dataset: • SensorML files used to be small (<20KB). As a consequence, the
execution times were not high. • OBS and MEA datasets:
• Observation files contains about 7 times more observation values than measurement files of the same size. As a consequence, we recommend to use the former in mobile device SOS clients.
• Observation files represent observation values inside a xsd:anyType element that is not mapped successfully by some XML data binding tools. Additionally, as the “block” of observation values is represented as a String the application code must parse this information again.
Analysing Performance of XML Data Binding Solutions for SOS Applications 8
7 – Execution Speed (Parsers – CAPS Dataset)
PC Scenario
Small files (<100KB)
Large files (>100KB)
Analysing Performance of XML Data Binding Solutions for SOS Applications 9
8 – Execution Speed (Parsers – CAPS Dataset)
Mobile Scenario
Writing XML processing code using a manual approach do not necessarily produce a code that is much faster than code generated by some tools.
Analysing Performance of XML Data Binding Solutions for SOS Applications 10
9 – Memory Consumption (CAPS dataset)
Small files (<100KB) Large files (>100KB)
JAXB and XMLBeans show higher memory consumption, but it does not seem to represent a problem for a desktop or server application.
Analysing Performance of XML Data Binding Solutions for SOS Applications 11
10 – Size of Generated Code
Code generated based on large schemas usually has a large size. Customised code fits better the limitations of mobile devices. Customised code does not necessarily has to be written manually.
Analysing Performance of XML Data Binding Solutions for SOS Applications 12
11 -‐ Conclusions
We have presented a study to measure the influence of XML processing code in the performance of desktop and mobile SOS applications. The results have shown that XML processing does not seem to be a bottleneck in PC applications. On the other hand, the opposite happens in mobile devices where the time needed to process large XML files is very high due to their associated resource constraints.
¿? Thank you for your attention