RPC over AMQP (and RPC from Rust)


Ochtman, D. (Dirkjan)
 

Hi there,

For the past few months, I've spent time (on and off) on some code to make Corda RPC calls from outside a JVM (that is, not relying on the Corda RPC libraries provided with Corda). My direct goal with this is to be able to allow Corda backends written in Rust to work with Corda nodes, but I also think such a library would enable use of Corda RPC from non-JVM language environments like Python or JavaScript as well as environments where the JVM is not a good fit (such as IoT). Rust is a good fit here because it doesn't depend on any runtime, and it has pretty good support for FFI (so calling into Rust from Python/JavaScript or anything else that can do C FFI).

The good news is that I now have a simple networkMapSnapshot call working with my Rust code. You can find the code on https://github.com/djc/corda-rpc (if you've installed the Rust toolchain, just issue `cargo run --example network-map-snapshot -- -u test -p test localhost:10001`). I'd be happy for any feedback.

The bad news is that to make RPC over AMQP work, I needed to make some small changes to Corda. I've submitted a PR (see https://github.com/corda/corda/pull/6140) and would like to get feedback there, too.

I hope this code will be helpful to other people, I'm happy to take questions on this mailing list, on the Corda Slack or through a GitHub issue in my repo (or my PR).

Kind regards,

Dirkjan
-----------------------------------------------------------------
ATTENTION:
The information in this e-mail is confidential and only meant for the intended recipient. If you are not the intended recipient, don't use or disclose it in any way. Please let the sender know and delete the message immediately.
-----------------------------------------------------------------