Tech and Media Labs
This site uses cookies to improve the user experience.




IAP Tools for Java

Jakob Jenkov
Last update: 2017-01-14

NOTE:
We are merging all IAP / ION features into our Grid Ops for Java project. Development of IAP Tools will be discontinued. The tutorials about IAP Tools are only left online here for historic reasons (but will be removed in the future!).

IAP Tools for Java is a toolkit that makes it easier to work with the IAP network protocol and its data format ION. IAP is an open protocol, ION is an open data format, and IAP Tools is open source under the Apache 2 License.

GitHub Repository

You can find IAP Tools for Java on GitHub here:

https://github.com/jjenkov/iap-tools-java

IAP Specification

You can find the IAP and ION specifications here, including comparisons to other data formats and benchmarks for reading and writing ION compared to other data formats / toolkits:

http://tutorials.jenkov.com/iap/index.html

IAP Tools - Main Areas

IAP Tools for Java consists of two main areas:

  • ION Tools
  • IAP Tools

ION

IAP uses a binary data format which is called ION. However, ION can also be used separately from IAP. You can use ION over HTTP, or in data files or log files.

ION is similar to MessagePack and CBOR, but with a few differences. First of all MessagePack and CBOR were designed to be "like JSON" but with the ability to carry binary data (both raw bytes and numbers). ION was designed to be a general purpose data format, so it should be able all of:

  • Raw bytes
  • Binary representation of numbers (int, float, boolean etc.).
  • UTF-8 text.
  • UTC dates.
  • Streams of fields (unbounded).
  • Arrays of fields (bounded).
  • Maps (with key,value pairs).
  • Objects (similar to maps, but with more freedom).
  • Object graphs with circular references.
  • Tables.

All of these data structures are commonly used both in data files and to transport data across a network. Especially the table field saves a lot of bytes compared to JSON and even MessagePack and CBOR. Tables are more similar to CSV files than JSON. In fact, ION is capable of mimicking both raw files, JSON, XML and CSV files.

IAP Tools is pretty fast at reading and writing ION. In our current benchmarks it always beats Jackson / CBOR and Jackson / MessagePack. The difference is biggest with small objects or arrays of objects (because of ION's special table mode).

IAP

IAP is a network protocol (Internet Application Protocol) which is intended to replace HTTP, including HTTP 2 and Web Sockets. Granted, browsers cannot make IAP connections to servers (unless you use a trusted Applet), but you can still use ION in mobile-to-server communication, and internally between back office services.

IAP Tools contains a set of components that makes it easier to create IAP messages (ION messages) and send them over the internet.

Jakob Jenkov




Copyright  Jenkov Aps
Close TOC