Hi Emma,

Cap'n Proto RPC's model and HTTP/2's model are not a great fit for each
other. gRPC uses a client-server model with "streaming" requests/responses
-- a very close match for HTTP/2. Cap'n Proto RPC, in contrast, is
symmetric (allowing calls in both directions) and message-based (not
streaming). Additionally, while gRPC endpoints are global singletons --
which translate nicely to a URL hierarchy -- Cap'n Proto endpoints are
opaque object references which may be transient and may be created and
destroyed over the course of a connection. So, Cap'n Proto doesn't map well
to URLs, either.

So, although it would be possible to layer on top of HTTP/2, Cap'n Proto
would not leverage much benefit from HTTP/2, so this would be a lot of
bloat for relatively little benefit.

If the goal is to be able to handle Cap'n Proto RPC on the same port as
HTTP, that would arguably best be accomplished using WebSocket. The
WebSocket protocol is symmetric, message-based, and lightweight, making it
a pretty great fit for Cap'n Proto. This is something we plan to spec out
eventually.

I would also like to design a "pure" UDP-based Cap'n Proto transport at
some point, with the ability to do zero-round-trip introductions (probably
not possible if layering on other transports). But that's another story...

-Kenton

On Sun, Jun 12, 2016 at 11:41 AM, <[email protected]> wrote:

> gRPC does this for protobufs. And it gives the interesting feature (if you
> have a JSON->gPRC proxy) of allowing a single port to listen for both
> HTTP/2 and HTTP 1.1 and process HTTP 1.1 requests with the JSON proxy and
> HTTP2 requests with gRPC directly.
>
> Thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Cap'n Proto" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at https://groups.google.com/group/capnproto.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to