@restatedev/restate 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
[](https://docs.restate.dev)
|
|
2
|
+
[](https://github.com/restatedev/examples)
|
|
3
|
+
[](https://discord.gg/skW3AZ6uGd)
|
|
4
|
+
[](https://twitter.com/intent/follow?screen_name=restatedev)
|
|
5
|
+
|
|
6
|
+
# Restate - Building resilient applications made easy!
|
|
7
|
+
|
|
8
|
+
[Restate](https://restate.dev) is a system for easily building resilient applications using distributed durable async/await.
|
|
9
|
+
This repository contains the Restate server and CLI.
|
|
10
|
+
|
|
11
|
+
The basic primitives Restate offers to simplify application development are the following:
|
|
12
|
+
|
|
13
|
+
* **reliable execution**: user code will always run to completion. Intermediate failures result in re-tries that use the durable execution mechanism to recover partial progress and not duplicate already executed steps.
|
|
14
|
+
* **suspending user code**: long-running user code suspends when awaiting on a promise and resume when that promise is resolved.
|
|
15
|
+
* **reliable communication**: user code communicates with exactly-once semantics. Restate reliably delivers messages and anchors both sender and receiver in the durable execution to ensure no losses or duplicates can happen.
|
|
16
|
+
* **durable timers**: user code can sleep (and suspend) or schedule calls for later.
|
|
17
|
+
* **isolation**: user code can be keyed, which makes Restate scheduled them to obey single-writer-per-key semantics.
|
|
18
|
+
* **consistent state**: keyed user code can attach key/value state, which is eagerly pushed into handlers during invocation, and written back upon completion. This is particularly efficient for FaaS deployments (stateful serverless, yay!).
|
|
19
|
+
* **observability & introspection**: Restate automatically generates Open Telemetry traces for the interactions between handlers and gives you a SQL shell to query the distributed state of the application.
|
|
20
|
+
|
|
21
|
+
📖 Check out our [docs](https://docs.restate.dev) to get quickly started!
|
|
22
|
+
|
|
23
|
+
🗣️ Join our [discord channel](https://discord.gg/skW3AZ6uGd) to talk to the community.
|
|
24
|
+
|
|
25
|
+
🏠 Visit our [GitHub org](https://github.com/restatedev) for more details.
|
|
26
|
+
|
|
27
|
+
## SDKs
|
|
28
|
+
|
|
29
|
+
Restate supports the following SDKs:
|
|
30
|
+
|
|
31
|
+
* [Typescript](https://github.com/restatedev/sdk-typescript)
|
|
32
|
+
* [Java and Kotlin](https://github.com/restatedev/sdk-java)
|
|
33
|
+
|
|
34
|
+
## Building Restate
|
|
35
|
+
|
|
36
|
+
In order to build Restate locally [follow the build instructions](https://github.com/restatedev/restate/blob/main/docs/dev/local-development.md#building-restate).
|
|
37
|
+
|
|
38
|
+
## Running Restate
|
|
39
|
+
|
|
40
|
+
You can start the runtime via:
|
|
41
|
+
|
|
42
|
+
```shell
|
|
43
|
+
just run --bin restate-server --release
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
or the latest release via docker:
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
docker run --name restate --rm --network=host docker.io/restatedev/restate
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
In order to change the log level, configure the [`RUST_LOG` env variable](https://rust-lang-nursery.github.io/rust-cookbook/development_tools/debugging/config_log.html#enable-log-levels-per-module) respectively.
|
|
53
|
+
For example, to enable debug mode for Restate crates:
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
RUST_LOG=info,restate=debug just run --bin restate-server --release
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Registering Restate services
|
|
60
|
+
|
|
61
|
+
After the runtime is running on `localhost:9070`, you can register a service running on `localhost:9080` via `curl`:
|
|
62
|
+
|
|
63
|
+
```shell
|
|
64
|
+
curl -X POST localhost:9070/deployments -H 'content-type: application/json' -d '{"uri": "http://localhost:9080"}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
For more information check [how to register services](https://docs.restate.dev/services/registration).
|
|
68
|
+
|
|
69
|
+
### Invoking a Restate service
|
|
70
|
+
|
|
71
|
+
After registering a service you can invoke a service via via HTTP/JSON:
|
|
72
|
+
|
|
73
|
+
```shell
|
|
74
|
+
curl -X POST localhost:8080/counter.Counter/GetAndAdd -H 'content-type: application/json' -d '{"counter_name": "foobar", "value": 10 }'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For more information check [how to invoke services](https://docs.restate.dev/services/invocation).
|
|
78
|
+
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restatedev/restate",
|
|
3
3
|
"description": "The Restate CLI",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"bin": "lib/index.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/restatedev/restate.git"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"@restatedev:registry": "https://registry.npmjs.org"
|