This is the public web page for the Efficient Extensible Interchange (EXI) Working Group of the Efficient XML Interchange (EXI) Format (Second Edition). Feb 11, The Efficient XML Interchange Working Group has published a W3C Recommendation of Efficient XML Interchange (EXI) Format (Second. , Efficient XML Interchange (EXI) Format (Second Edition) Recommendation. , Proposed Edited Recommendation. .
|Published (Last):||15 June 2007|
|PDF File Size:||10.19 Mb|
|ePub File Size:||3.39 Mb|
|Price:||Free* [*Free Regsitration Required]|
This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process. Server decompression and recompression vs. Patch to avoid Formag for streams.
Reserved Schema IDs 4. For more information 9. This document provides information on how EXI can be used in XMPP streams to efficiently compress data transmitted between the server and the client. For certain applications like applications in sensor networks EXI is a vital component, 1. packet size enabling sensors with limited memory to communicate efficiently. The strong support in EXI for generating efficient forkat is also vital to build efficient code in constrained devices.
Activating EXI compression requires a handshake to take place prior, where the server and client agree on a set of parameters.
Some of these parameters may increase the compression ratio, at the cost of processing power and readability. These parameters will be discussed in greater depth in the following sections.
There are also default values that can vormat used to commence evaluating EXI compression. The single most important property to agree on however, is the set of schemas to use during EXI efficuent. Since the server is not supposed to know all possible XML schemas, a mechanism is provided in this document whereby schemas can be interchanged, so that the server can adapt its compression to the needs of the client. The second method describes an alternative binding.
This method does not use Stream compression as defined in XEPrather it allows intecrhange to connect to the server and start using EXI directly from the beginning.
The following sections assume the client connects through the normal XMPP port, and starts communicating with the server using uncompressed XML fragments.
When the client connects to the XMPP Server, it will receive a list of features supported by the server:. Support for EXI compression through the normal XMPP port is detected by the existence of the exi compression method in the features stanza.
More information about this alternative method is available in the Alternative Bindings section. Following is a list of use cases displaying how the client can configure and activate EXI compression on the current binding. If the client attempts to activate an EXI stream at this point, before the negotiation of EXI properties has been performed, the server must respond with a setup-failed response.
When the client decides to activate EXI compression, it sends a setup stanza containing parameter proposals to the server as follows:. Schema files are identified using three properties: Its target namespaceits byte size and its MD5 hash.
The MD5 hash provides a way to detect small changes in the file, even if the byte size and namespace are the same. It is important that the client specify not only application specific namespaces in this request, but also the versions of the schemas efficiejt the core XMPP protocol namespaces and the schema for the XML namespace, containing XML attributes. Hash values and byte sizes of known schemas at the interchagne of fornat, can be found edficient.
However, these values are informational only. It is recommended that the developer makes sure exactly what version of the schema to use, and calculate the hash for it correspondingly. Also, some changes to some schemas might intedchange necessary, which will affect the hash values.
For more information about this, lnterchange the inforamtion about known problems. After receiving the request, the server responds with a setupResponse stanza containing the parameters it can accept, based on the initial values provided by the client.
Any buffer sizes, etc.
Efficient XML Interchange (EXI) Format 1.0 (Second Edition) Publication History
Unable to accommodate parameters. Schema files that the server does not have based on namespace, byte size and MD5 hash are marked with the missingSchema element instead formag the normal schema element. At this point the client can choose to abort the EXI enablement sequence if it cannot accommodate itself with the proposed parameter settings provided by the server. The XMPP session will continue to work in its current state.
Aborting does not require taking further action from the client. If the server lacks information about a schema file, it is specified in the response through the missingSchema elements.
At this point, the client can either choose to accept that these schema files are not available, making compression less efficient, or choose to upload the missing schema files to the server. Of course, uploading schema files would require the device to have sufficient buffers and memory to store and upload the schema files in the first place.
If it is not possible to upload the schema files, consideration should be given to installing the schema files manually at the server. To upload a schema file, the client simply sends the schema file using an uploadSchema element, as follows:. The schema itself is sent using base64 encoding to the server. This is to make sure a binary exact copy is transferred, maintaining encoding, processing instructions, etc. The server then computes the target namespacebyte size and MD5 Hash from the sent schema file.
If the client desires, it can test the EXI setup again. This is optional, but can be used to test that uploading the schema files, and any new property values are accepted by the server. Testing newly uploaded schema files. Agreement between client and server.
Note the agreement attribute in the response this time.
The server must set this attribute to true if it agrees with the proposal from the client. The client in turn can check this attribute as a quick way to check if agreement exists. When the server is in agreement it must also return a Configuration ID in the configurationId attribute.
The uploadSchema command has an optional attribute called contentType that can be used to send different types of documents to the server. This is not a MIME content type, but an enumeration with the following options:. The schema files can be precompressed intercjange stored as binary files on the client for easier transmission. Since EXI compression does not perserve the extact binary representation of the schema intercgange for instance it doesn’t preserve white spacerfficient server cannot correctly compute byte size and an MD5 hash for the file.
Therefore, the client needs to provide this information in the uploadSchema command using the bytes and md5Hash attributes. They are mandatory in case EXI compressed schema files are uploaded to the server. Also note that the byte length and MD5 Hash should be computed on the original XML Schema file, not the compressed or decompressed version. As an alternative to uploading a schema file to the server, the client can ask the server to download a schema file by itself.
This is done using the downloadSchema command, as follows:. Downloading a new XML schema file on server. The server tries to download the schema by itself, and then computes the target namespacebyte size and MD5 Hash from the downloaded schema. When the schema has been downloaded, the following successful download response is returned:. If an HTTP error occurred while trying to download the schema, a response as follows is returned:. If the URL could not be resolved, the following response is returned:.
If a timeout occurred during the download attempt, the following response is returned:. If the url points to something that is not a schema, the following response is returned:. If an error occurs that is unforeseen by this specification, the server can simply respond with a generic error message, as follows:.
Downloading a schema, might interchante a version which does not correspond to the desired version of the schema.
It might for instance have been updated. This means the bytes and md5Hash values corresponding to the downloaded file will not match the values expected by the client.
Therefore, it’s in this case important the client checks that the server actually downloaded the version of the schema required by the client so it doesn’t assume the server uses the intercange version of the schema when in actuality it doesn’t.
Once an EXI setup has been accepted by the server, and agreement is reched, the server will provide the client with a quick Configuration ID dfficient the configurationId attribute. This Configuration ID can be used by the client during successive connections to the server, to skip the larger part of the handshake, as is shown in the following example:.
If the configuration is still available on the server, the server responds:. Note that schemas or options are not mentioned explicitly when using this quick setup approach.
If the server for some reason does not remember the specific configuration requested by the client the client might have been disconnected for a long timeit responds in the following manner:. The agreement attribute is optional, with a default value of false. So, if the attribute is omitted, the client must consider the agreement to be nonexistent.
When no agreement is reached using the quick configuration approach, the client must restart the handshake and propose new compression parameters. When EXI option negotiation has been completed, the client can tell the server that it is ready to start compression. It does this using the normal compress stanza, as follows:.
Efficient XML Interchange (EXI) Format (Second Edition) Publication History – W3C
The server now has the necessary knowledge on how the EXI engine should be configured for the current session and it responds as follows:. Instead, special streamStart and streamEnd elements are sent. More information about that later. Instead separate streamStart and streamEnd elements have to be sent, allowing for similar semantics on the EXI-compressed channel, as described in the following subsections. For clarity, examples in this section are displayed in XML for readability.
But it is understood that the elements are sent using EXI compression and using the options defined during setup. The first thing the client needs to do, once it opens the new EXI-compressed connection, whether it be through the normal XMPP connection or through the alternative EXI-only binding, is to send a streamStart element. This element replaces the start stream tag normally sent.
Start of EXI-compressed stream. The empty prefix is synonymous with the default namespace to use. Before closing the connection, the client needs to send a streamEnd element.