Skip to content

Restate is the platform for building resilient applications that tolerate all infrastructure faults w/o the need for a PhD.

License

Notifications You must be signed in to change notification settings

restatedev/restate

Repository files navigation

Restate - Building distributed applications made simple

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.

SDKs

Restate supports the following SDKs:

Running the runtime

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

Registering Restate services

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

Invoking a Restate service

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 }'