Commit 2f41517a authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Announce 0.6 release on blog, and update site (#472)

* Announce 0.6 release on blog, and update site.

* When pushing capnproto-next site, include future blog posts.

* Deeper headings.

* Linkify people's names to Github profiles, and finish sentence about JSON.

* Link to exact second in JGC video.
parent 500c0d6e
---
layout: post
title: "Cap'n Proto 0.6 Released: Two and a half years of improvements"
author: kentonv
---
<div style="float: right"><a class="block_link" style="color: #fff"
href="{{site.baseurl}}install.html">Get it now &raquo;</a></div>
Today we're releasing Cap'n Proto 0.6, the first major Cap'n Proto release in nearly 2.5 years.
Cap'n Proto has been under active development the entire time, as part of its parent project, [Sandstorm.io](https://sandstorm.io). The lack of releases did not indicate a lack of development, but rather a lack of keeping the code running on every platform it supports -- especially Windows. Without a working Windows build, we couldn't do a release. But as Sandstorm didn't need Windows, it was hard to prioritize -- that is, until contributors stepped up!
Note that this release encompasses the core tools and the C++ reference implementation. Implementations in other languages have their own release schedules, but it's likely that several will be updated soon to integrate new language features.
### Brought to you by Cloudflare
[As announced on the Sandstorm blog](https://sandstorm.io/news/2017-03-13-joining-cloudflare), most of the Sandstorm team (including myself) now work for [Cloudflare](https://cloudflare.com). Cloudflare is one of the largest users of Cap'n Proto, [as described in this talk by John-Graham Cumming](https://youtu.be/LA-gNoxSLCE?t=12m47s), and as such maintaining Cap'n Proto is part of my job at Cloudflare.
<div style="text-align: center"><a class="block_link" style="color: #fff"
href="https://www.meetup.com/Sandstorm-SF-Bay-Area/events/239341254/">Come to our release party May 18 at Cloudflare SF</a></div>
### What's New?
#### Full Windows / Visual Studio Support
With this release, all of Cap'n Proto's functionality now works on Windows with Visual Studio 2015 and 2017. That includes the serialization, dynamic API, schema parser, async I/O framework (using I/O completion ports), RPC, and tools. This is a huge step up from 0.5, in which Cap'n Proto could only be built in "lite mode", which supported only basic serialization.
Most of the work to make this happen was contributed by [**Harris Hancock**](https://github.com/harrishancock) (with some help from [Gordon McShane](https://github.com/gordonmcshane), [Mark Grimes](https://github.com/mark-grimes), myself, and others). It was no small feat: Visual Studio's C++ compiler is still quite buggy, so lots of work-arounds were needed. Meanwhile, the Cap'n Proto developers working on Linux were continuously introducing new issues with their changes. Harris sorted it all out and delivered a beautiful series of patches. He also helped get us set up with [continuous integration on AppVeyor](https://ci.appveyor.com/project/kentonv/capnproto), so that we can stay on top of these issues going forward.
#### Security Hardening
The 0.6 release includes a number of measures designed to harden Cap'n Proto's C++ implementation against possible security bugs. These include:
* The core pointer validation code has been refactored to detect possible integer overflows at compile time using C++ template metaprogramming, as [described in this old blog post](https://capnproto.org/news/2015-03-02-security-advisory-and-integer-overflow-protection.html).
* The core test suite -- which runs when you type `make check` -- now includes a targeted fuzz test of the pointer validation code.
* We additionally tested this release using American Fuzzy Lop, running several different test cases for over three days each.
#### JSON converter
Cap'n Proto messages can now be converted to and from JSON using `libcapnp-json`. This makes it easy to integrate your JSON front-end API with your Cap'n Proto back-end.
See the [`capnp/compat/json.h`](https://github.com/sandstorm-io/capnproto/blob/master/c++/src/capnp/compat/json.h) header for API details.
This library was primarily built by [**Kamal Marhubi**](https://github.com/kamalmarhubi) and [**Branislav Katreniak**](https://github.com/katreniak), using Cap'n Proto's [dynamic API]({{site.baseurl}}cxx.html#dynamic-reflection).
#### HTTP library
KJ (the C++ framework library bundled with Cap'n Proto) now ships with a minimalist HTTP library, `libkj-http`. The library is based on the KJ asynchronous I/O framework and covers both client-side and server-side use cases. Although functional and used in production today, the library should be considered a work in progress -- expect improvements in future releases, such as client connection pooling and TLS support.
See the [`kj/compat/http.h`](https://github.com/sandstorm-io/capnproto/blob/master/c++/src/kj/compat/http) header for API details.
#### Smaller things
With two years of development, there are far too many changes to list, but here are some more things:
* KJ now offers its own unit test framework under `kj/test.h`, as well as a compatibility shim with Google Test under `kj/compat/gtest.h`. The KJ and Cap'n Proto tests no longer depend on Google Test.
* New API `capnp::TextCodec` in `capnp/serialize-text.h` provides direct access to parse text-format Cap'n Proto messages (requires `libcapnpc`, the schema parser library). (Contributed by: [**Philip Quinn**](https://github.com/pqu))
* It is possible to compare Cap'n Proto messages for equality (with correct handling of unknown fields, something Protocol Buffers struggled with) using APIs in `capnp/any.h`. (Contributed by: [**Joshua Warner**](https://github.com/joshuawarner32))
* A function `capnp::canonicalize()` has been added which returns the canonical serialization of a given struct. (Contributed by: [**Matthew Maurer**](https://github.com/maurer))
* `AnyPointer` fields can now be assigned in constant values, by referencing another named constant (which itself is defined with a specific type).
* In addition to `AnyPointer`, the types `AnyStruct`, `AnyList`, and `Capability` can now be used in schemas.
* New class `capnp::CapabilityServerSet` in `capnp/capability.h` allows an RPC server to detect when capabilities to its own local objects are passed back to it and allows it to "unwrap" them to get at the underlying native object.
* A membrane framework library was added (header `capnp/membrane.h`). This makes it easy to set up a MITM layer between RPC actors, e.g. to implement revocability, transformations, and many other useful capability patterns.
* Basic flow control can now be applied to an RPC connection, preventing new messages from being accepted if outstanding calls exceed a certain watermark, which helps prevent excessive buffering / malicious resource exhaustion. See `RpcSystem::setFlowLimit()`.
* KJ's networking API now includes datagram protocols (UDP).
* In `.capnp` syntax, all comma-delimited lists can now have a trailing comma. (Contributed by: [**Drew Fisher**](https://github.com/zarvox))
* Hundreds more small feature additions and bug fixes.
<div style="text-align: center"><a class="block_link" style="color: #fff; width: 45%"
href="{{site.baseurl}}install.html">Download &raquo;</a> <a class="block_link" style="color: #fff; width: 45%"
href="https://www.meetup.com/Sandstorm-SF-Bay-Area/events/239341254/">Release Party &raquo;</a></div>
......@@ -134,16 +134,18 @@ provided by projects implementing Cap'n Proto in other languages.
If you want to use Cap'n Proto in C++ with Visual Studio, do the following:
1. Install [CMake](http://www.cmake.org/) version 3.1 or later.
1. Make sure that you are using Visual Studio 2015 or newer, with all updates installed. Cap'n
Proto uses C++11 language features that did not work in previous versions of Visual Studio,
and the updates include many bug fixes that Cap'n Proto requires.
2. Use CMake to generate Visual Studio project files under `capnproto-c++-0.0.0` in the zip file.
You will need to enable the CMake project option `EXTERNAL_CAPNP`. You can use the CMake UI for
this or run this shell command:
2. Install [CMake](http://www.cmake.org/) version 3.1 or later.
cmake -G "Visual Studio 14 2015" -DEXTERNAL_CAPNP=1
3. Use CMake to generate Visual Studio project files under `capnproto-c++-0.0.0` in the zip file.
You can use the CMake UI for this or run this shell command:
If the `capnp.exe` and `capnpc-c++.exe` tools are not on your `PATH`, then `CAPNP_EXECUTABLE`
and `CAPNPC_CXX_EXECUTABLE` will need to be set to their respective locations.
cmake -G "Visual Studio 14 2015"
(For VS2017, you can use "Visual Studio 15 2017" as the generator name.)
3. Open the "Cap'n Proto" solution in Visual Studio.
......@@ -152,27 +154,18 @@ If you want to use Cap'n Proto in C++ with Visual Studio, do the following:
5. Build the solution (`ALL_BUILD`).
6. Build the `INSTALL` project to copy the compiled libraries and header files into `CMAKE_INSTALL_PREFIX`.
6. Build the `INSTALL` project to copy the compiled libraries, tools, and header files into
`CMAKE_INSTALL_PREFIX`.
Alternatively, find the compiled `.lib` files in the build directory under
`src/{capnp,kj}/{Debug,Release}` and place them somewhere where your project can link against them.
Also add the `src` directory to your search path for `#include`s, or copy all the headers to your
project's include directory.
**From Git**
If you download directly from Git, you'll need to compile the Cap'n Proto tools (the `.exe`s) using
MinGW-w64. This is easiest to do in Cygwin or on Linux. For example, on Debian or Ubuntu, you can
install MinGW like so:
Cap'n Proto can also be built with MinGW or Cygwin, using the Unix/autotools build instructions.
sudo apt-get install mingw-w64
You'll first need to install Cap'n Proto on the host system (using the Unix installation
instructions, above). Then, do:
**From Git**
make distclean
./configure --host=i686-w64-mingw32 --with-external-capnp \
--disable-shared CXXFLAGS='-static-libgcc -static-libstdc++'
make -j6 capnp.exe capnpc-c++.exe capnpc-capnp.exe
The C++ sources are located under `c++` directory in the git repository. The build instructions are
otherwise the same as for the release zip.
Now that you have the `exe`s, you can proceed with the usual Windows compilation instructions.
......@@ -23,6 +23,7 @@ case $(git rev-parse --abbrev-ref HEAD) in
CONFIG=_config_next.yml
PREFIX=/next
LABEL="preview site"
FUTURE=--future
;;
release-* )
......@@ -30,6 +31,7 @@ case $(git rev-parse --abbrev-ref HEAD) in
CONFIG=_config.yml
PREFIX=
LABEL="site"
FUTURE=
;;
* )
......@@ -42,7 +44,7 @@ echo "Regenerating site..."
rm -rf _site _site.tar.gz
jekyll build --safe --config $CONFIG
jekyll build --safe $FUTURE --config $CONFIG
echo -n "Push now? (y/N)"
read -n 1 YESNO
......
......@@ -5,48 +5,8 @@ title: Road Map
# Road Map
Here's what's (hopefully) in store for future versions of Cap'n Proto! Of course, everything here
is subject to change.
## Near-ish future
Provisionally, these are probably the things that will be worked on in the next few releases of Cap'n Proto and its C++ reference implementation.
* **Shared memory RPC:** Zero-copy inter-process communication.
* **Three-way introductions (level 3 RPC):** Allow RPC interactions between more than two parties,
with new connections formed automatically as needed.
* **Fiber-based concurrency:** The C++ runtime's event loop concurrency model will be augmented
with support for fibers, which are like threads except that context switches happen only at
well-defined points (thus avoiding the need for mutex locking). Fibers essentially provide
syntax sugar on top of the event loop model.
* **Dynamic schema transmission:** Allow e.g. Python applications to obtain schemas directly from
the RPC server so that they need not have a local copy. Great for interactive debugging.
* **Improved MSVC support:** Once MSVC improves its support for C++11 language features, we will
support Cap'n Proto's reflection and RPC APIs in MSVC. (Currently, only core serialization is
supported.)
* **Implement encapsulated types:** This will allow you to create a hand-written wrapper around a
type which will be automatically injected into the generated code, so that you can provide a
nicer interface which encapsulates the type's inner state.
* **Implement maps:** Based on encapsulated and parameterized types.
## Before version 1.0
These things absolutely must happen before any 1.0 release. Note that it's not yet decided when
a 1.0 release would happen nor how many 0.x releases might precede it.
* **Expand test coverage:** There are lots of tests now, but some important scenarios, such as
handling invalid of invalid input, need better testing.
* **Performance review:** Performance is already very good compared to competitors, but at some
point we need to break out the profiler and really hone down on the details.
* **Security review:** We need a careful security review to make sure malicious input cannot
crash an application or corrupt memory.
## Wish List
These are features we'd like to implement some day but haven't decided yet how to prioritize.
Some of these features could make their way into Cap'n Proto before version 1.0. Others will
certainly come after. If you have opinions on what you'd like to see next,
[tell us](https://groups.google.com/group/capnproto)!
This is a list of big ideas we'd like to implement in Cap'n Proto. We don't know in what order
these will actually happen; as always, real work is driven by real-world needs.
### Language Features
......@@ -60,16 +20,70 @@ certainly come after. If you have opinions on what you'd like to see next,
* **Doc comments:** Harvest doc comments from schema files and use them to generate doc comments
on generated code. Also make them available in the compiled schema so that a documentation
generator could use them.
* **Encapsulated types:** This will allow you to create a hand-written wrapper around a
type which will be automatically injected into the generated code, so that you can provide a
nicer interface which encapsulates the type's inner state.
* **Maps:** Based on encapsulated and parameterized types.
### C++ API Features
### RPC Protocol Features
* **JSON codec:** API for transcoding to JSON format, useful for interacting with legacy
infrastructure.
* **Snappy integration:** Integrate [Snappy compression](https://code.google.com/p/snappy/) into
the API to further reduce bandwidth needs with minimal CPU overhead.
* **Dynamic schema transmission:** Allow e.g. Python applications to obtain schemas directly from
the RPC server so that they need not have a local copy. Great for interactive debugging.
* **Three-way introductions (level 3 RPC):** Allow RPC interactions between more than two parties,
with new connections formed automatically as needed.
* **Bulk and Realtime**: Add features that make it easier to design Cap'n Proto APIs for bulk
data transfers (with flow control) and realtime communications (where it's better to drop
messages than to deliver them late).
* **UDP transport**: Cap'n Proto RPC could benefit from implementing a UDP transport, in order
to achieve zero-round-trip three-party introductions and to implement "realtime" APIs (see
"bulk and realtime", above).
* **Encrypted transport**: Cap'n Proto RPC should support an encrypted transport which uses
capability-based authorization (not PKI), can accomplish zero-round-trip three-party
introductions (via a pre-shared key from the introducer) and based on modern crypto. TLS is
not designed for this, but we don't want to invent new crypto; we intend to build on
[libsodium](https://github.com/jedisct1/libsodium) and the
[Noise Protocol Framework](http://noiseprotocol.org/) as much as possible.
### C++ Cap'n Proto API Features
* **Plain Old C Structs:** The code generator should also generate a POCS type corresponding
to each struct type. The POCS type would use traditional memory allocation, thus would not
support zero-copy, but would support a more traditional and easy-to-use C++ API, including
the ability to mutate the object over time without convoluted memory management. POCS types
could be extracted from an inserted into messages with a single copy, allowing them to be
used easily in non-performance-critical code.
* **Multi-threading:** It should be made easy to assign different Cap'n Proto RPC objects
to different threads and have them be able to safely call each other. Each thread would still
have an anyschronous event loop serving the objects that belong to it.
* **Shared memory RPC:** Zero-copy inter-process communication.
* **JSON codec customization:** Extend the JSON library to support customizing the JSON
representation using annotations. For example, a field could be given a different name in
JSON than it is in Cap'n Proto. The goal of these features would be to allow any reasonable
pre-existing JSON schema to be representable as a Cap'n Proto type definition, so that
servers implementing JSON APIs can use Cap'n Proto exclusively on the server side.
* **LZ4 integration:** Integrate LZ4 compression into the API to further reduce bandwidth needs
with minimal CPU overhead.
* **Annotations API:** For each annotation definition, generate code which assists in extracting
that annotation from schema objects in a type-safe way.
### C++ KJ API Features
KJ is a framework library that is bundled with Cap'n Proto, but is broadly applicable to C++
applications even if they don't use Cap'n Proto serialization.
* **Fiber-based concurrency:** The C++ runtime's event loop concurrency model will be augmented
with support for fibers, which are like threads except that context switches happen only at
well-defined points (thus avoiding the need for mutex locking). Fibers essentially provide
syntax sugar on top of the event loop model.
* **TLS bindings:** Write bindings for e.g. OpenSSL to make it easy to integrate with the KJ
I/O framework, Cap'n Proto RPC, and the KJ HTTP library.
* **Modern crypto bindings:** A thin wrapper around
[libsodium](https://github.com/jedisct1/libsodium) with a nice C++ API, e.g. representing
keys using fixed-size, trivially-copyable classes.
* **Event loop integrations:** We should provide off-the-shelf integrations with popular event
loop libraries, such as libuv, libev, libevent, boost::asio, and others, so that it's easier
to use Cap'n Proto RPC in applications that already use another event framework.
### Storage
* **ORM interface:** Define a standard interface for capabilities that represent remotely-stored
......@@ -88,6 +102,18 @@ certainly come after. If you have opinions on what you'd like to see next,
* **RPC debugger:** Add a `capnp` command which sends an RPC from the command line and prints
the result. Useful for debugging RPC servers.
## Quality Assurance
These things absolutely must happen before any 1.0 release. Note that it's not yet decided when
a 1.0 release would happen nor how many 0.x releases might precede it.
* **Expand test coverage:** There are lots of tests now, but some important scenarios, such as
handling invalid of invalid input, need better testing.
* **Performance review:** Performance is already very good compared to competitors, but at some
point we need to break out the profiler and really hone down on the details.
* **Security review:** We need a careful security review to make sure malicious input cannot
crash an application or corrupt memory.
### Infrastructure
Note: These are very large projects.
......
......@@ -376,6 +376,20 @@ body.normal #main_content.inner {
border-bottom-right-radius: 2px;
}
.block_link {
display: inline-block;
z-index: 10;
padding: 10px;
margin: 5px;
color: #fff;
background-color: #0090ff;
font-weight: 700;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
#header_wrap {
background: #C42727;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment