Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ports #157

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npm run build
npm run app
```

This starts the greeter service on port 8080.
This starts the greeter service on port 9080.

## Step 4: Launch the Restate runtime

Expand All @@ -53,7 +53,7 @@ docker run --name restate_dev --rm -d --network=host ghcr.io/restatedev/restate-

Discover the services:
```shell
curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json' -d '{"uri": "http://localhost:8080"}'
curl -X POST http://localhost:9070/endpoints -H 'content-type: application/json' -d '{"uri": "http://localhost:9080"}'
```


Expand All @@ -63,13 +63,13 @@ curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json'
Run the Restate Docker container:

```shell
docker run --name restate_dev --rm -d -p 8081:8081 -p 9091:9091 -p 9090:9090 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
docker run --name restate_dev --rm -d -p 8080:8080 -p 9070:9070 -p 9071:9071 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
```

Discover the services:

```shell
curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json' -d '{"uri": "http://host.docker.internal:8080"}'
curl -X POST http://localhost:9070/endpoints -H 'content-type: application/json' -d '{"uri": "http://host.docker.internal:9080"}'
```

</TabItem>
Expand All @@ -81,7 +81,7 @@ curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json'
Invoke the function via:

```shell
curl -X POST http://localhost:9090/myservice/hello -H 'content-type: application/json' -d '{"request": "Pete"}'
curl -X POST http://localhost:8080/myservice/hello -H 'content-type: application/json' -d '{"request": "Pete"}'
```

Congratulations, you managed to run your first Restate service.
Expand Down
18 changes: 9 additions & 9 deletions docs/restate/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

| Name | Port | Description | Protocol |
|---------|------|-----------------------------------------------------------------------------|---------------------------------------------------|
| Ingress | 9090 | Acts as an API gateway for all services registered with Restate | gRPC + [Connect Protocol](https://connect.build/) |
| Storage | 9091 | Exposes raw RocksDB read-only storage operations, used by the CLI | gRPC |
| Meta | 8081 | Allows for CRUD operations on service metadata, eg for service registration | REST |
| Ingress | 8080 | Acts as an API gateway for all services registered with Restate | gRPC + [Connect Protocol](https://connect.build/) |
| Storage | 9071 | Exposes raw RocksDB read-only storage operations, used by the CLI | gRPC |

Check warning on line 14 in docs/restate/deployment.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/restate/deployment.md#L14

[write-good.Weasel] 'only' is a weasel word!
Raw output
{"message": "[write-good.Weasel] 'only' is a weasel word!", "location": {"path": "docs/restate/deployment.md", "range": {"start": {"line": 14, "column": 45}}}, "severity": "WARNING"}

Check warning on line 14 in docs/restate/deployment.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/restate/deployment.md#L14

[Google.WordList] Use 'command-line tool' instead of 'CLI'.
Raw output
{"message": "[Google.WordList] Use 'command-line tool' instead of 'CLI'.", "location": {"path": "docs/restate/deployment.md", "range": {"start": {"line": 14, "column": 82}}}, "severity": "WARNING"}
| Meta | 9070 | Allows for CRUD operations on service metadata, eg for service registration | REST |

Check notice on line 15 in docs/restate/deployment.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/restate/deployment.md#L15

[Google.Acronyms] Spell out 'CRUD', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'CRUD', if it's unfamiliar to the audience.", "location": {"path": "docs/restate/deployment.md", "range": {"start": {"line": 15, "column": 31}}}, "severity": "INFO"}

Check failure on line 15 in docs/restate/deployment.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/restate/deployment.md#L15

[Google.Latin] Use 'for example' instead of 'eg'.
Raw output
{"message": "[Google.Latin] Use 'for example' instead of 'eg'.", "location": {"path": "docs/restate/deployment.md", "range": {"start": {"line": 15, "column": 68}}}, "severity": "ERROR"}

Check failure on line 15 in docs/restate/deployment.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/restate/deployment.md#L15

[Vale.Spelling] Did you really mean 'eg'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'eg'?", "location": {"path": "docs/restate/deployment.md", "range": {"start": {"line": 15, "column": 68}}}, "severity": "ERROR"}

Check notice on line 15 in docs/restate/deployment.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/restate/deployment.md#L15

[Google.Acronyms] Spell out 'REST', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'REST', if it's unfamiliar to the audience.", "location": {"path": "docs/restate/deployment.md", "range": {"start": {"line": 15, "column": 98}}}, "severity": "INFO"}

It will store metadata and RocksDB data in the relative directory of /target under the current working directory of the process.

Expand Down Expand Up @@ -55,11 +55,11 @@
- name: RESTATE_TRACING__LOG_FORMAT
value: Json
ports:
- containerPort: 8081
- containerPort: 9070
name: meta
- containerPort: 9090
- containerPort: 8080
name: ingress
- containerPort: 9091
- containerPort: 9071
name: storage
imagePullPolicy: IfNotPresent
resources:
Expand Down Expand Up @@ -90,11 +90,11 @@
selector:
app: restate
ports:
- port: 8081
- port: 9070
name: meta
- port: 9090
- port: 8080
name: ingress
- port: 9091
- port: 9071
name: storage
type: ClusterIP
```
Expand Down
2 changes: 1 addition & 1 deletion docs/restate/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOIN
<TabItem value="mac" label="macOS">

```shell
docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOINT=http://host.docker.internal:4317 -p 8081:8081 -p 9091:9091 -p 9090:9090 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOINT=http://host.docker.internal:4317 -p 8080:8080 -p 9070:9070 -p 9071:9071 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
```

</TabItem>
Expand Down
6 changes: 6 additions & 0 deletions docs/services/deployment/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
containers:
- name: service
image: path.to/yourrepo:yourtag
env:
- name: PORT
value: 8080
ports:
- containerPort: 8080
name: http2
Expand Down Expand Up @@ -81,6 +84,9 @@ spec:
spec:
containers:
- image: path.to/yourrepo:yourtag
env:
- name: PORT
value: 8080
ports:
- name: h2c
containerPort: 8080
Expand Down
12 changes: 6 additions & 6 deletions docs/services/deployment/lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ pointed at the Restate runtime and with the Lambda function endpoint as the URI


```shell
curl -X POST http://<your-restate-runtime-endpoint>:8081/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/<my-service>"}'
curl -X POST http://<your-restate-runtime-endpoint>:9070/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/<my-service>"}'
```

If your Lambda function requires authentication via an API key,
then you can add this API key to the discovery request to the Restate runtime, as follows:

```shell
curl -X POST http://<your-restate-runtime-endpoint>:8081/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/<my-service>","additional_headers": {"x-api-key": "someapikey"} }'
curl -X POST http://<your-restate-runtime-endpoint>:9070/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/<my-service>","additional_headers": {"x-api-key": "someapikey"} }'
```

Here, we added the API key as an additional header to the JSON data of the request.
Expand Down Expand Up @@ -258,7 +258,7 @@ docker run --name restate_dev --rm -d --network=host ghcr.io/restatedev/restate-
```
- On macOS:
```shell
docker run --name restate_dev --rm -d -p 8081:8081 -p 9091:9091 -p 9090:9090 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
docker run --name restate_dev --rm -d -p 8080:8080 -p 9070:9070 -p 9071:9071 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
```

Consult the runtime logs via `docker logs restate_dev`.
Expand All @@ -270,7 +270,7 @@ Stop the runtime (and remove any intermediate state) with `docker stop restate_d
Connect to the Restate (e.g. via an SSH session if it is running on EC2) runtime and execute the discovery curl command:

```shell
curl -X POST http://<your-restate-runtime-endpoint>:8081/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/my-greeter", "additional_headers": {"x-api-key": "your-api-key"} }'
curl -X POST http://<your-restate-runtime-endpoint>:9070/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/my-greeter", "additional_headers": {"x-api-key": "your-api-key"} }'
```

If you are running the runtime locally, replace `<your-restate-runtime-endpoint>` by `localhost`.
Expand All @@ -283,7 +283,7 @@ After the discovery, the runtime uses this API key for all subsequent requests t

If your Lambda function does not require an API key then you can do the discovery without the additional headers:
```shell
curl -X POST http://<your-restate-runtime-endpoint>:8081/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/my-greeter"}'
curl -X POST http://<your-restate-runtime-endpoint>:9070/endpoints -H 'content-type: application/json' -d '{"uri": "https://<lambda-function-endpoint>/default/my-greeter"}'
```

When executing this command, you should see the discovered services printed out!
Expand All @@ -297,7 +297,7 @@ When executing this command, you should see the discovered services printed out!
Now let's invoke the `MultiWord` method of our service! Don't forget to replace `<your-restate-runtime-endpoint>` accordingly.

```shell
curl -X POST http://<your-restate-runtime-endpoint>:9090/org.example.Greeter/MultiWord -H 'content-type: application/json' -d '{"name": "Pete"}'
curl -X POST http://<your-restate-runtime-endpoint>:8080/org.example.Greeter/MultiWord -H 'content-type: application/json' -d '{"name": "Pete"}'
```

You should see the response:
Expand Down
4 changes: 2 additions & 2 deletions docs/services/introspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ To let you do this, Restate exposes two SQL tables that you can query via the [*
Connect with *psql* to Restate:

```shell
psql -h localhost
psql -h localhost -p 9071
```

You can change the default postgres port `5432` by supplying the `-p` argument.
You can change the default port `9071` by supplying the `-p` argument.

The Restate Introspection SQL API has been implemented based on [DataFusion](https://arrow.apache.org/datafusion/) and supports standard SQL syntax.

Expand Down
6 changes: 3 additions & 3 deletions docs/services/invocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ $ curl -X PATCH <RESTATE_META_ENDPOINT>/services/<SERVICE_NAME> -H 'content-type
For example:

```shell
$ curl -X PATCH localhost:8081/services/org.example.ExampleService -H 'content-type: application/json' -d '{"public": false}'
$ curl -X PATCH localhost:9070/services/org.example.ExampleService -H 'content-type: application/json' -d '{"public": false}'
```

You can revert it back to public with `{"public": true}`. Private services can still be reached by other Restate services.
Expand All @@ -126,7 +126,7 @@ You can find this identifier in the runtime logs and OpenTelemetry traces by loo
```log {7}
2023-05-19T15:02:28.656467Z INFO restate_invoker::invocation_task
Executing invocation at service endpoint
http.url: http://localhost:8080/invoke/coordinator.Coordinator/Sleep
http.url: http://localhost:9080/invoke/coordinator.Coordinator/Sleep
in restate_invoker::invocation_task::invoker_invocation_task
rpc.system: "restate"
rpc.service: coordinator.Coordinator
Expand Down Expand Up @@ -172,7 +172,7 @@ $ curl -X DELETE <RESTATE_META_ENDPOINT>/invocations/<INVOCATION_IDENTIFIER>
For example:

```shell
$ curl -X DELETE http://localhost:8081/invocations/T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE
$ curl -X DELETE http://localhost:9070/invocations/T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE
```

For more details on the API, refer to the [admin API docs](/references/admin-api).
2 changes: 1 addition & 1 deletion docs/services/sdk/awakeables.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ curl -X POST http://<restate-runtime-host-port>/dev.restate.Awakeables/Resolve -
For example:

```shell
curl -X POST http://localhost:9090/dev.restate.Awakeables/Resolve -H 'content-type: application/json' -d '{"id": "T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE", "json_result": {"hello": "world"}}'
curl -X POST http://localhost:8080/dev.restate.Awakeables/Resolve -H 'content-type: application/json' -d '{"id": "T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE", "json_result": {"hello": "world"}}'
```

To reject an awakeable:
Expand Down
2 changes: 1 addition & 1 deletion docs/services/sdk/kafka.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const router = restate.keyedRouter({
// Other rpc or event handlers
});

restate.createServer().bindKeyedRouter("myRouter", router).listen(8080);
restate.createServer().bindKeyedRouter("myRouter", router).listen();
```

The Kafka record key must be a valid UTF-8 string, otherwise Restate won't be able to deliver the event to the service.
Expand Down
6 changes: 3 additions & 3 deletions docs/services/sdk/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
.bindKeyedRouter("greeter", restate.keyedRouter({
greet: sayHello, countGreetings: doCountGreetings
}))
.listen(8080);
.listen();
```

The app logic is implemented inside `doGreet` and `doCountGreetings`.
These functions have the `restate.RpcContext` as their first parameter. This context is used to interact with Restate (call other methods, retrieve state, etc.).
Then, the service is registered as a keyed service under the path `greeter`, and the `greet` and `countGreetings` routes are added.
The `greet` function can now be called by sending a request to `<restate-host>:9090/greeter/greet` or `<restate-host>:9090/greeter/countGreetings`.
The `greet` function can now be called by sending a request to `<restate-host>:8080/greeter/greet` or `<restate-host>:8080/greeter/countGreetings`.

Check warning on line 62 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L62

[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 62, "column": 30}}}, "severity": "WARNING"}

Check notice on line 62 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L62

[write-good.E-Prime] Try to avoid using 'be'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'be'.", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 62, "column": 30}}}, "severity": "INFO"}

Check notice on line 62 in docs/services/sdk/overview.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/overview.mdx#L62

[Google.Passive] In general, use active voice instead of passive voice ('be called').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be called').", "location": {"path": "docs/services/sdk/overview.mdx", "range": {"start": {"line": 62, "column": 30}}}, "severity": "INFO"}
For more information on how to set up the routers and the Restate server, have a look at the [serving docs](/services/sdk/serving).

</TabItem>
Expand Down Expand Up @@ -113,7 +113,7 @@
service: "Greeter",
instance: new GreeterService(),
})
.listen(8080);
.listen();
```

The contract of the gRPC service is defined in the Protobuf service contracts, that are shown below.
Expand Down
14 changes: 7 additions & 7 deletions docs/services/sdk/serving.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
```

This example shows a router for an unkeyed service with three functions and their respective API paths (`hello`, `callMe`, and `maybe`).
This means that the `hello` function can be called via `<restate-host>:9090/myServicePath/hello`.
This means that the `hello` function can be called via `<restate-host>:8080/myServicePath/hello`.

Check warning on line 35 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L35

[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 35, "column": 42}}}, "severity": "WARNING"}

Check notice on line 35 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L35

[Google.Passive] In general, use active voice instead of passive voice ('be called').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be called').", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 35, "column": 42}}}, "severity": "INFO"}

Check notice on line 35 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L35

[write-good.E-Prime] Try to avoid using 'be'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'be'.", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 35, "column": 42}}}, "severity": "INFO"}

The functions of an unkeyed router have two optional parameters:

Expand All @@ -53,7 +53,7 @@
```

This example shows a router for a keyed service with four functions and their respective API paths (`hello`, `callMe`, `maybe`, and `withSomething`).
This means that the `hello` function can be called via `<restate-host>:9090/myServicePath/hello`.
This means that the `hello` function can be called via `<restate-host>:8080/myServicePath/hello`.

Check warning on line 56 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L56

[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 56, "column": 42}}}, "severity": "WARNING"}

Check notice on line 56 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L56

[Google.Passive] In general, use active voice instead of passive voice ('be called').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be called').", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 56, "column": 42}}}, "severity": "INFO"}

Check notice on line 56 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L56

[write-good.E-Prime] Try to avoid using 'be'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'be'.", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 56, "column": 42}}}, "severity": "INFO"}

The functions of a keyed router have three optional parameters:

Expand All @@ -77,13 +77,13 @@
path: "myServicePath",
};
```
This means that the `hello` function of this service can be called via `<restate-host>:9090/myServicePath/hello`.
This means that the `hello` function of this service can be called via `<restate-host>:8080/myServicePath/hello`.

Check notice on line 80 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L80

[Google.Passive] In general, use active voice instead of passive voice ('be called').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be called').", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 80, "column": 58}}}, "severity": "INFO"}

Check notice on line 80 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L80

[write-good.E-Prime] Try to avoid using 'be'.
Raw output
{"message": "[write-good.E-Prime] Try to avoid using 'be'.", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 80, "column": 58}}}, "severity": "INFO"}

Check warning on line 80 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L80

[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.
Raw output
{"message": "[write-good.Passive] 'be called' may be passive voice. Use active voice if you can.", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 80, "column": 58}}}, "severity": "WARNING"}

**3. Create the server**

Create the server. Then, bind the services with `bindRouter` for unkeyed services and `bindKeyedRouter` for keyed services.
You need to supply the service path and router.
Finally, let the server listen on a specified port (default is `8080`):
Finally, let the server listen on a specified port (default is `9080`):

Check notice on line 86 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L86

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 86, "column": 1}}}, "severity": "INFO"}

Check warning on line 86 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L86

[write-good.Weasel] 'Finally' is a weasel word!
Raw output
{"message": "[write-good.Weasel] 'Finally' is a weasel word!", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 86, "column": 1}}}, "severity": "WARNING"}

```typescript
restate
Expand All @@ -92,7 +92,7 @@
.bindRouter(myServiceApi.path, serviceRouter)
// bind the unkeyed services to the Restate server
.bindKeyedRouter(myKeyedServiceApi.path, keyedServiceRouter)
.listen(8080);
.listen();
```


Expand All @@ -107,7 +107,7 @@
service: "Greeter",
instance: new GreeterService(),
})
.listen(8080);
.listen();
```

First, call the `createServer()` method to create a new `RestateServer`.
Expand All @@ -123,7 +123,7 @@
```
- For the `instance` field, provide an instance of the service implementation.

Finally, call `listen(port)` to have the RestateServer listen on the specified port for connections and requests.
Finally, call `listen(port?)` to have the RestateServer listen on the specified port for connections and requests.

Check warning on line 126 in docs/services/sdk/serving.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/services/sdk/serving.mdx#L126

[write-good.Weasel] 'Finally' is a weasel word!
Raw output
{"message": "[write-good.Weasel] 'Finally' is a weasel word!", "location": {"path": "docs/services/sdk/serving.mdx", "range": {"start": {"line": 126, "column": 1}}}, "severity": "WARNING"}

</TabItem>
</Tabs>
Expand Down
22 changes: 11 additions & 11 deletions docs/tour.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ docker run --name restate_dev --rm -d --network=host ghcr.io/restatedev/restate-
<TabItem value="mac" label="macOS">

```shell
docker run --name restate_dev --rm -d -p 8081:8081 -p 9091:9091 -p 9090:9090 -p 5432:5432 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
docker run --name restate_dev --rm -d -p 8080:8080 -p 9070:9070 -p 9071:9071 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
```

</TabItem>
Expand All @@ -96,7 +96,7 @@ You do this by sending a request to the endpoint of the runtime at `http://local
and providing it with the endpoint of the service `http://localhost:8080`.

```shell
curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json' -d '{"uri": "http://localhost:8080"}'
curl -X POST http://localhost:9070/endpoints -H 'content-type: application/json' -d '{"uri": "http://localhost:9080"}'
```

Restate then sends a request to the service endpoint to ask which services and methods run behind this endpoint.
Expand All @@ -109,7 +109,7 @@ You do this by sending a request to the endpoint of the runtime at `http://local
and providing it with the endpoint of the service `http://host.docker.internal:8080`.

```shell
curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json' -d '{"uri": "http://host.docker.internal:8080"}'
curl -X POST http://localhost:9070/endpoints -H 'content-type: application/json' -d '{"uri": "http://host.docker.internal:9080"}'
```

Restate then sends a request to the service endpoint to ask which services and methods run behind this endpoint.
Expand Down Expand Up @@ -147,19 +147,19 @@ When you look at the logs of the runtime you see:
2023-08-15T13:24:52.879977Z INFO restate_schema_impl::schemas_impl
Registering endpoint
restate.service_endpoint.id: bG9jYWxob3N0OjgwODAv
restate.service_endpoint.url: http://localhost:8080/
restate.service_endpoint.url: http://localhost:9080/
2023-08-15T13:24:52.880010Z INFO restate_schema_impl::schemas_impl
Registering service
rpc.service: "UserSession"
restate.service_endpoint.url: http://localhost:8080/
restate.service_endpoint.url: http://localhost:9080/
2023-08-15T13:24:52.881233Z INFO restate_schema_impl::schemas_impl
Registering service
rpc.service: "TicketService"
restate.service_endpoint.url: http://localhost:8080/
restate.service_endpoint.url: http://localhost:9080/
2023-08-15T13:24:52.881422Z INFO restate_schema_impl::schemas_impl
Registering service
rpc.service: "Checkout"
restate.service_endpoint.url: http://localhost:8080/
restate.service_endpoint.url: http://localhost:9080/
```

</details>
Expand All @@ -170,7 +170,7 @@ When you look at the logs of the runtime you see:
Mimic adding a ticket to a cart, by calling `UserSession/addTicket` as follows:

```shell
curl -X POST http://localhost:9090/UserSession/addTicket \
curl -X POST http://localhost:8080/UserSession/addTicket \
-H 'content-type: application/json' \
-d '{"key": "123", "request": "456"}'
```
Expand All @@ -180,7 +180,7 @@ If this prints out `true`, then you have a working setup.
You can call the `UserSession/checkout` function to proceed with the purchase, as follows:

```shell
curl -X POST http://localhost:9090/UserSession/checkout \
curl -X POST http://localhost:8080/UserSession/checkout \
-H 'content-type: application/json' \
-d '{"key": "123"}'
```
Expand Down Expand Up @@ -516,7 +516,7 @@ const expireTicket = async (

Call the `expireTicket` function with:
```shell
curl -X POST http://localhost:9090/UserSession/expireTicket \
curl -X POST http://localhost:8080/UserSession/expireTicket \
-H 'content-type: application/json' \
-d '{"key": "123", "request": "456"}'
```
Expand Down Expand Up @@ -1340,7 +1340,7 @@ docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOIN
<TabItem value="mac" label="macOS">

```shell
docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOINT=http://host.docker.internal:4317 -p 8081:8081 -p 9091:9091 -p 9090:9090 -p 5432:5432 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOINT=http://host.docker.internal:4317 -p 8080:8080 -p 9070:9070 -p 9071:9071 ghcr.io/restatedev/restate-dist:VAR::RESTATE_DIST_VERSION
```

</TabItem>
Expand Down