| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An alternative implementation of MessagePack for Java.
It is based on the original Java implementation
The primary goals of this alternative implementation are to keep the original tightness of MessagePack, while serving additionally the following use cases:
One limitation of the core MessagePack API that causes some inefficiencies is the fact that MessagePack does not nativelly support true streaming of data. What I mean is that data can put into raw, arrays or maps, but all of them require the API user to know how many bytes or values will be written a priory, which goes against the principle of "streaming". There is currently work to make MessagePack an official Internet standard, and as part of this effort, there is work to make the API extensible. This, I hope, will allow use to create raw/arrays/maps of unknown size.
There are generally a few patterns to serializing objects. They can either be written as a bunch of bytes (raw), where the API cannot recognize the actual content of the bytes, and the code deserializing the data must have the full knowledge. The second possibility is that each object's filed is written as a "value" that the API recognize, and so objects are always written in the same format, independent of the content. The third option is for the object to only write it's "non-default" fields to the stream. The last option requires that at least some field ID precedes each field data, so that the object can be reconstructed when de-serializing.
Most serialisation API require force you to use a single one of those patterns for each and every type you want to persist. This API lets you choose, although MessagePack itself puts limitation on "raw" objects, which currently requires wrapping them in an array first, therefore causing one additional byte of overhead per object.
The general design of the object protocol works like this:
To build the JAR file of MessagePack, you need to install Maven (http://maven.apache.org), then type the following command:
$ mvn package
To locally install the project, type
$ mvn install
To generate project files (.project, .classpath) for Eclipse, do
$ mvn eclipse:eclipse
then import the folder from your Eclipse.
Next, open the preference page in Eclipse and add the CLASSPATH variable:
M2_REPO = $HOME/.m2/repository
where $HOME is your home directory. In Windows XP, $HOME is:
C:/Documents and Settings/(user name)/.m2/repository
To relese the project (compile, test, tagging, deploy), please use the commands as follows:
$ mvn release:prepare $ mvn release:perform
| Back | FazBrowse Home | New Git URL |