Cap'n Proto - Insanely Fast Data Serialization Format Copyright 2013-2015 Sandstorm Development Group, Inc. https://capnproto.org Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think of Google's Protocol Buffers (http://protobuf.googlecode.com), except faster. In fact, in benchmarks, Cap'n Proto is INFINITY TIMES faster than Protocol Buffers. Full installation and usage instructions and other documentation are maintained on the Cap'n Proto web site: http://kentonv.github.io/capnproto/install.html WARNING: Cap'n Proto requires a modern compiler. See the above link for detailed requirements. To build and install (from a release package), simply do: ./configure make -j4 check sudo make install The -j4 allows the build to use up to four processor cores instead of one. You can increase this number if you have more cores. Specifying "check" says to run tests in addition to building. This can be omitted to make the build slightly faster, but running tests and reporting failures back to the developers helps us out!
-
Kenton Varda authored
This lets you construct an AsyncInputStream / AsyncOutputStream pair that operates entirely within userspace, rather than pushing through a kernel-level pipe. This is far more efficient, avoiding system calls and reducing copies. The pipe does not buffer at all. Instead, it waits for both a read() and a write() call to be active at the same time, and then it fulfills one with the other. This implementation also optimizes pumps. Imagine the situation: you create a pipe; you call pumpTo() on the write end to pump it to some other; then you write to the write end of the pipe. In this case, the write will *directly* call the target stream to which the pipe is being pumped. Hence, adding daisy-chained pipes on top of a final output stream does not incur additional copies of the data. Similarly, tryPumpFrom() is optimized on the read end.
7117175d