The Restate runtime together with its SDKs simplifies the development of distributed applications by:
- providing reliable messaging
- supporting durable method execution
- storing state consistently
- handling timers
and much more.
Restate supports the following SDKs:
You can start the runtime via:
just run --release
In order to change the log level, configure the RUST_LOG
env variable respectively.
For example, to enable debug mode for Restate crates:
RUST_LOG=info,restate=debug just run --release
After the runtime is running, you can register a service running on localhost:8080
via curl
:
curl -X POST localhost:8081/endpoints -H 'content-type: application/json' -d '{"uri": "http://localhost:8080"}'
This assumes that the runtime is running on localhost:8081
.
To check the OpenAPI documentation of the available operational APIs:
curl localhost:8081/openapi
After registering a service you can invoke a service via grpcurl:
grpcurl -plaintext -d '{"counter_name": "foobar", "value": 10}' localhost:9090 counter.Counter/GetAndAdd
or using grpcui:
grpcui -plaintext localhost:9090
or via HTTP/JSON that gets transcoded to gRPC:
curl -X POST localhost:9090/counter.Counter/GetAndAdd -H 'content-type: application/json' -d '{"counter_name": "foobar", "value": 10 }'