Fast is a simple RPC protocol used in Joyent's Triton and Manta systems, particularly in the Moray key-value store. This README contains usage notes. For developers, see CONTRIBUTING.md.
This is a rust implementation of the Fast protocol.
This crate includes:
- client library interface
- server library interface
fastserve
, An example Fast server for demo and testingfastcall
, An example command-line tool for making Fast RPC requests
Start the rust Fast server:
$ cargo run --example fastserve
Use the fastcall
example program to invoke the date
RPC method inside the
client:
cargo run --example fastcall -- --args '[]' --method date
The fastcall
program in the node-fast
repo will also work:
$ fastcall 127.0.0.1 2030 date '[]'
{"timestamp":1457475515355,"iso8601":"2016-03-08T22:18:35.355Z"}
Or try the yes
method, an RPC version of yes(1):
$ fastcall 127.0.0.1 2030 yes '[ { "value": { "hello": "world" }, "count": 3 } ]'
{"hello":"world"}
{"hello":"world"}
{"hello":"world"}
Due to the fact that node-fast
uses a buggy version of a CRC library the CRC
checking is currently disabled. Right now for the server to interact with the node Fast
client you must comment out the CRC checking in the client as well. The code to
be commented out is here.
This was just a quick exploratory effort. As it stands now much of the code
could be more nicely factored and there is currently no logging. There are cases
where a program could crash unnecessarily. If you try the example server and it
crashes run it with RUST_BACKTRACE=1 cargo run --example fastserve
to figure
out where the badness happened. The error handling also is very basic.