Noack[1] has compared two compact XML encodings,
namely Fast Infoset (FI) and Efficient XML
Interchange (EXI), with the
STRING
encoded XML specified in Subclause 6.3 of the IEC
61499 Compliance Profile for Feasibility Demonstrations. Noack's
results indicate that EXI is the most efficient, both in terms of
message size and parsing time, than either of the other two encoding
methods.
The table below presents a comparison of the
STRING
encoded XML as implemented in both the FBRT and FORTE runtimes,
versus the EXI and MGT_REQ
encodings. The length of the
MGT_REQ
encodings is always within 4 octets of the EXI encoding, and
represents a compression factor of approximately 4:1 vs. the
STRING
encoded XML.
- NOTE 1 - The examples presented by Noack did not include the
DTD-required
Type
attribute for theFB
element in the cases withID=3
andID=5
. The corrected XML code for these cases is given at the bottom of the table below, and Noack's reported byte count for the FORTE and EXI columns is accordingly incremented for these cases by 14 and 7 bytes, respectively. - NOTE 2 - The FORTE entry for
ID=7
appears to be a misprint in the original; a more likely value would be 12 bytes fewer than that forID=6
, i.e., 78 bytes. - NOTE 3 - The statement "The binary format using EXI is in average about 75 times smaller than the XML format" in Chapter 5 of Noack's thesis should be amended to "...75 percent smaller...."
The slightly greater length of the
MGT_REQ
encodings should be weighed against the memory and execution speed advantages of using
the built-in runtime parsing of IEC 61499 structured data types
instead of an additional EXI or XML parser.
ID |
Encoded Command Length, Octets | |||
---|---|---|---|---|
STRING -encoded XML |
EXI | MGT_REQ |
||
FORTE | FBRT | |||
1 | 78 | 88 | 19 | 22 |
2 | 102 | 112 | 26 | 29 |
3 | 92 | 88 | 20 | 22 |
4 | 33 | 38 | 5 | 9 |
5 | 90 | 86 | 20 | 22 |
6 | 90 | 100 | 21 | 22 |
7 | 55 | 96 | 18 | 19 |
Test Cases | ||||
<Request ID="1" Action="CREATE" > <FB Name="FBName" Type="FBType" /> </Request> <Request ID="2" Action="CREATE" > <Connection Source="FBName.Out" Destination="FBName.In" /> </Request> <Request ID="3" Action="DELETE" > <FB Name="FBName" Type="FBType" /> </Request> <Request ID="4" Action="START" /> <Request ID="5" Action="KILL" > <FB Name="FBName" Type="FBType" /> </Request> <Request ID="6" Action="WRITE" > <Parameter Reference="Location" Value="Data" /> </Request> <Request ID="7" Action="READ" > <Parameter Reference="Location" Value="*" /> </Request> |
[1] F.Noack, "Evaluation of Binary XML for Configuring Industrial Control Systems," Bachelor’s Thesis in Informatics, Technische Universität München, 2016-02-15.