Hacker News new | ask | show | jobs
by kixpanganiban 3573 days ago
Kenton, thank you for your work on this! I currently use ZeroRPC (which uses protobuf and msgpack) and I was blown away by Cap'n Proto. Really excited to try it out soon! Some questions:

- Do you guys have an RPC library written in anything other than C++? If not, could you point me to protocol specs so I can start writing my own?

- Since it uses a streaming model to support random access, what encryption method do you think would work best with Cap ' n Proto that would keep it speedy and still retain all functionality?

Thanks!

1 comments

> - Do you guys have an RPC library written in anything other than C++? If not, could you point me to protocol specs so I can start writing my own?

People have written implementations in Rust, Go, and Erlang, and wrappers around the C++ library in Javascript and Python: https://capnproto.org/otherlang.html

Scroll down that page for some info on how to start writing an implementation in another language.

The RPC protocol spec is here:

https://github.com/sandstorm-io/capnproto/blob/master/c++/sr...

> - Since it uses a streaming model to support random access, what encryption method do you think would work best with Cap ' n Proto that would keep it speedy and still retain all functionality?

Hmm, I'm not clear on what you mean by "streaming model" -- I think of "streaming" as the opposite of random access.

Regarding encryption, this is a very big question and there are a lot of different needs and use cases to consider. Mostly I don't think that use of Cap'n Proto affects encryption decisions much, but if you want to make sure you don't lose random access, you should of course use a cipher that supports random access, like chacha20 or AES-CTR.

> Hmm, I'm not clear on what you mean by "streaming model" -- I think of "streaming" as the opposite of random access.

Right, sorry, I re-read my comment and confused myself too. Seems like it's bad for me to go on HN without a fresh cup of coffee (it's 10am now here in the Philippines).

Thanks for your swift response, I'll experiment with AES-CTR (since I'm more familiar with it than chacha20). And thanks for pointing out that there are wrappers for Python/Go already, the programming language I use daily and was thinking of building libs for! Again, great work, and I'll stay posted.

Also as a note, both ciphers suggested are stream ciphers, so you will need some way of authenticating. Depending on your needs, you may consider using something like libsodium that takes care of all of that for you:

https://download.libsodium.org/libsodium/content/secret-key_...