Live data from Hacker News

Cap'n Proto 0.9

capnproto.org

21–30 of 38 posts

Re: Cap'n Proto 0.9

#21

Aside from the speed benefits, are there any other major advantages of Cap’n Proto? I’ve been using grpc/protobuf with Java and Scala. Overall I like it, but the grpc Java library does feel like it comes with a lot of opinions baked in. As an example, I was looking in to implementing automatic retries on the client side for certain classes of error. Grpc Java has some experimental retry support, but it seemed tightly…

> But I do long for a simpler alternative

If you're happy with protobuf but just not with gRPC, you can check out Twirp [1] and DRPC [2]. Both aim to be simpler alternatives while keeping protobuf for serialization. Their development is Go focused though.

[1] https://github.com/twitchtv/twirp

[2] https://github.com/storj/drpc/

Re: Cap'n Proto 0.9

#25

Aside from the speed benefits, are there any other major advantages of Cap’n Proto? I’ve been using grpc/protobuf with Java and Scala. Overall I like it, but the grpc Java library does feel like it comes with a lot of opinions baked in. As an example, I was looking in to implementing automatic retries on the client side for certain classes of error. Grpc Java has some experimental retry support, but it seemed tightly…

The 'cap' in Cap'n Proto is for https://en.wikipedia.org/wiki/Capability-based_security -- Cap'n Proto isn't actually an RPC system, it's a capabilities framework. You can work with results without actually having the results, e.g. before the results exist.

> The 'cap' in Cap'n Proto is for https://en.wikipedia.org/wiki/Capability-based_security

This seems to go completely unmentioned on the home page, other than the word “capability system” in the very first sentence.

What does capability based security mean for a data interchange format? The notion hardly makes any sense to me.

From the homepage: “Think JSON, except binary.”

What would JSON look like with capability-based security?

> You can work with results without actually having the results, e.g. before the results exist

This sounds exactly like promises, or perhaps a functional effect system. What does this have to do with data serialization?

Re: Cap'n Proto 0.9

#26
post #11

Earlier quoted context omitted.

I also agree that the gRPCs libraries (in all languages) tend to be opinionated, and most annoyingly, opinionated about the wrong things. That said I also haven’t found anything better either and the technology is popular enough that I stick with it and just work around the limitations. For your specific case I highly recommend ignoring the built in GRPC retry nonsense and using the Java failsafe library retry polici…

> annoyingly, opinionated about the wrong things. what's what opinions are - they necessarily must be wrong to some people. Otherwise, it'd just be called facts!

Some try to confuse this aspect by calling opinions "best practices"

Re: Cap'n Proto 0.9

#27

Earlier quoted context omitted.

The 'cap' in Cap'n Proto is for https://en.wikipedia.org/wiki/Capability-based_security -- Cap'n Proto isn't actually an RPC system, it's a capabilities framework. You can work with results without actually having the results, e.g. before the results exist.

> The 'cap' in Cap'n Proto is for https://en.wikipedia.org/wiki/Capability-based_security This seems to go completely unmentioned on the home page, other than the word “capability system” in the very first sentence. What does capability based security mean for a data interchange format? The notion hardly makes any sense to me. From the homepage: “Think JSON, except binary.” What would JSON look like with capability-b…

Cap'n Proto has a remote object system using interface references.

When a reference is constructed, only the creator has the capability of invoking the interface. If the reference is then passed to another server, they and only they have the capability of invoking the interface.

That's what they mean by capability.

Re: Cap'n Proto 0.9

#28

Aside from the speed benefits, are there any other major advantages of Cap’n Proto? I’ve been using grpc/protobuf with Java and Scala. Overall I like it, but the grpc Java library does feel like it comes with a lot of opinions baked in. As an example, I was looking in to implementing automatic retries on the client side for certain classes of error. Grpc Java has some experimental retry support, but it seemed tightly…

If you're looking for a binary serialisation library that generates simpler/more readable code and doesn't do parsing look into flatbuffers. Going through generated protobuff code in . NET last time I used it was vomit inducing. Flatbuffers don't provide RPC AFAIK so not comparable with gRPC

Capnproto tried to do too much with distributed objects and RPC, I was looking into it years ago but it still seems like the C++ impl is the only one that supports those advanced concepts.

Re: Cap'n Proto 0.9

#29

Aside from the speed benefits, are there any other major advantages of Cap’n Proto? I’ve been using grpc/protobuf with Java and Scala. Overall I like it, but the grpc Java library does feel like it comes with a lot of opinions baked in. As an example, I was looking in to implementing automatic retries on the client side for certain classes of error. Grpc Java has some experimental retry support, but it seemed tightly…

If you're looking for a binary serialisation library that generates simpler/more readable code and doesn't do parsing look into flatbuffers. Going through generated protobuff code in . NET last time I used it was vomit inducing. Flatbuffers don't provide RPC AFAIK so not comparable with gRPC Capnproto tried to do too much with distributed objects and RPC, I was looking into it years ago but it still seems like the C+…

Apparently at C# implementation supports promise pipelining: https://github.com/c80k/capnproto-dotnetcore#features

It is missing many nice-to-have features however and is also apparently unmaintained, with the last release 16 months ago...

Re: Cap'n Proto 0.9

#30

Earlier quoted context omitted.

If you're looking for a binary serialisation library that generates simpler/more readable code and doesn't do parsing look into flatbuffers. Going through generated protobuff code in . NET last time I used it was vomit inducing. Flatbuffers don't provide RPC AFAIK so not comparable with gRPC Capnproto tried to do too much with distributed objects and RPC, I was looking into it years ago but it still seems like the C+…

Apparently at C# implementation supports promise pipelining: https://github.com/c80k/capnproto-dotnetcore#features It is missing many nice-to-have features however and is also apparently unmaintained, with the last release 16 months ago...

No activity doesn't necessarily mean unmaintained, it could just mean usable and stable/bug-free.
Post reply on HN