Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Size of NIEM XML documents
A common concern regarding NIEM is the size of NIEM documents. Large documents may take longer to send, or may take more disk space or other resources to process.
Reducing the size of XML documents
One strategy is to design XML documents so that they contain less data, or to reduce the amount of data sent. Strategies include:
- Break up messages into small, independent parts.
- Use caching to reduce retransmission.
- Use lazy strategies: Only send what is needed, when it is needed.
- Use NIEM constructs to avoid replicating data in a NIEM XML document.
If you are concerned with the size of an on-disk XML document, standard compression applications, such as gzip, compress XML documents, including NIEM documents, very well.
An XML document sent as a network message may be compressed using numerous strategies, including:
Each of these options has advantages and disadvantages.
A server output filter is generally the simplest to implement; they are available as standard parts of web servers, and may be automatically descripted by client libraries and browsers. Their compression ratios are very good, but since they are not XML-oriented, parsing of XML documents may be slower than the other strategies.
Fast Infoset operates entirely at the XML document level, so it does not require any NIEM-specific work.
Efficient XML Interchange (EXI) works at the schema level, compressing XML documents using the XML Schema for the document to guide compression. This means that the sender and receiver must use the same XML Schema for the document. There are some strategies that will improve EXI's performance in compressing XML documents.