BT

Cap’n Proto Interchange Format Adds Windows Support and Many New Features

| by Sergio De Simone Follow 14 Followers on May 09, 2017. Estimated reading time: 1 minute |

After nearly 2.5 years since its previous release, data interchange format and RPC system Cap'n Proto reached version 0.6, adding Windows support, security hardening, and more.

According to Cap'n Proto author Kenton Varda, the apparent release delay was not related to a lack of development, which on the contrary went on all the time, but to the low priority that a stable port to Windows had for its parent project, Sandstorm.io. With Microsoft compilers catching up on modern C++ support, it has become easier to do the port, which includes serialization, dynamic API, schema parser, async I/O framework (using I/O completion ports), RPC, and tools. Additionally, the Cap'n Proto team has set up continuous integration, which should also help the Windows port remain healthy.

Besides full support on Windows, the last Cap' Proto version includes a few implementation changes to make it more secure against possible vulnerabilities. Those include improved pointer validation to detect integer overflow at compile time and more exhaustive tests.

Two useful new additions to Cap'n Proto ecosystem that version 0.6 brings are:

  • libcapnp-json, a bidirectional converter between JSON and Cap'n Proto that aims to make it easier to integrate a JSON-based front-end with a Cap'n Proto-based back-end.
  • libkj-http, a minimalist HTTP library based on async I/O and that is still very much a work in progress.

Cap'n Proto is a data interchange format that aims to outperform popular formats such as JSON or Protocol Buffers by removing the need for encoding and decoding messages in memory. This is achieved by storing the data in binary form, just like a compiler would do, but in a platform-independent way. Cap'n Proto creator Kenton Varda was the author of Protocol Buffers during his time at Google:

Cap’n Proto is the result of years of experience working on Protobufs, listening to user feedback, and thinking about how things could be done better.

Cap'n Proto also includes provisions to help ensure that backwards-compatibility is guaranteed when new fields are added to the format. Other key features of Cap'n Proto includea the ability to incrementally process a message, since outer objects appear entirely before inner objects; random access to any field even before the message has been received in its entirety; and the small size of both generated code and the runtime library.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT