What is OpenEXI?
The W3C Efficient XML Interchange (EXI) recommendation describes a data storage and transfer format that has the mechanics of XML, but is
- more compact
- faster to exchange
- faster to process.
OpenEXI is a project developing open source Java implementations of EXI.
This short video, OpenEXI: A Quick Introduction, gives an overview of the key features of EXI implementations made available by OpenEXI project.
Introduction to OpenEXI is also available in PDF format.
The Nagasena Tutorial provides a concise yet comprehensive step-by-step guide to implementing EXI in your applications. It is accompanied by fully commented, working program code. Both the tutorial and the demonstration UI were developed by Dennis Dawson.
The implementation effort is led by Takuki Kamiya, in the hope that a solid open source implementation will catalyze EXI's adoption in many user communities.
EXI implementations produced by the OpenEXI project are available for public use under Apache License, Version 2.0.
Why not use GZip instead of EXI?
GZip is great for file compression, but that is not the only consideration. The processing time it takes to compress and expand files can outweigh the benefits of the compression itself. EXI not only achieves greater compression, but also provides substantially better performance than GZip.
Many EXI use cases involve efforts to modernize legacy applications in order to make them more suitable for interacting with technologies such as cloud computing and XML. Often, these applications use packed binary formats to increase the efficiency of data exchange. When smaller units of information are exchanged frequently, GZip does not always perform well enough to make XML format feasible. In fact, there are scenarios where GZip actually increases the size of an XML file after compression.
EXI competes well with and often surpasses performance of existing packed binary formats. EXI consistently beats GZip for XML file compression across datasets varying in size and complexity, collected from a wide range of use cases beyond those already discussed.
Implementations
The OpenEXI project provides two EXI implementations: Nagasena and Milinda.
-
Nagasena uses the algorithm described
in the EXI specification to generate schema-informed EXI grammars.
With regard to processing efficiency, Nagasena is faster than Milinda.
- Milinda uses a novel technique to generate schema-informed EXI grammars from schemas, whereby the number of grammar state objects generated is roughly the same as that of schema constructs such as elements, types and groups, regardless of minOccurs/maxOccurs constraint numbers given to particles in the schemas. This contrasts with Nagasena, where the number of state objects is additionally affected by the minOccurs/maxOccurs numbers given to each particle.
Aside from the fundamental difference in the way EXI grammar was implemented, Nagasena and Milinda provide very similar processor APIs. Whether you choose Nagasena or Milinda, either produces the same EXI file, given an XML input.
Both Nagasena and Milinda provide full implementations of the W3C EXI Recommendation except that support for the selfContained option is not planned at this time.
Download Nagasena
Download Nagasena from here.
External Links
- See Buddhism and Self if you are curious about Milinda and Nagasena.
- W3C EXI Working Group Public Page
- AgileDelta's Efficient XML
- EXIficient (another EXI Open Software Implementation)
