Skip to content

Commit

Permalink
Replace ghcr.io/restatedev/restate-dist with docker.io/restatedev/res…
Browse files Browse the repository at this point in the history
…tate
  • Loading branch information
tillrohrmann committed Nov 28, 2023
1 parent 771d3ba commit 181779e
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 35 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Have a look at how to start up the runtime in a Docker container in [this reposi

- For MacOS:
```shell
docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 ghcr.io/restatedev/restate-dist:latest
docker run --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 docker.io/restatedev/restate:latest
```
- For Linux:
```shell
docker run --name restate_dev --rm --network=host ghcr.io/restatedev/restate-dist:latest
docker run --name restate_dev --rm --network=host docker.io/restatedev/restate:latest
```

### Connect runtime and services
Expand Down
3 changes: 0 additions & 3 deletions typescript/ecommerce-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ Restate is a system for easily building resilient applications using **distribut

## Prerequisites

> **Note**
> Make sure you have [signed up for Restate's private beta](https://forms.gle/G8kDuucqhBoTfMwLA) and set up [access to Restate's packages](https://github.com/restatedev/restate-dist).
- Latest stable version of [NodeJS](https://nodejs.org/en/) >= v18.17.1 and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.6.7 installed.
- [Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).
- Optional: Docker Compose
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecommerce-store/deployment/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker push $ECR_REPOSITORY/shopping-cart-demo:1.0.2
docker build -t $ECR_REPOSITORY/shopping-cart-webapp:1.0.2 ./react-shopping-cart
docker push $ECR_REPOSITORY/shopping-cart-webapp:1.0.2
# Restate runtime
docker tag ghcr.io/restatedev/restate-dist:latest $ECR_REPOSITORY/restate-runtime:latest
docker tag docker.io/restatedev/restate:latest $ECR_REPOSITORY/restate-runtime:latest
docker push $ECR_REPOSITORY/restate-runtime:latest
# Jaeger
docker tag jaegertracing/all-in-one:1.37.0 $ECR_REPOSITORY/jaeger-all-in-one:1.37.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- COLLECTOR_OTLP_ENABLED=true

runtime:
image: ghcr.io/restatedev/restate-dist:latest
image: docker.io/restatedev/restate:latest
depends_on:
- services
- jaeger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- COLLECTOR_OTLP_ENABLED=true

runtime:
image: ghcr.io/restatedev/restate-dist:latest
image: docker.io/restatedev/restate:latest
depends_on:
- services
- jaeger
Expand Down
4 changes: 3 additions & 1 deletion typescript/ecommerce-store/deployment/knative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ kn quickstart kind
```

2. Build the Docker images for the web application and backend services:

```shell
docker build -t dev.local/shopping-cart/react-app:0.0.1 ./react-shopping-cart
docker build ./services/ -t dev.local/shopping-cart/services:0.0.1
Expand All @@ -20,7 +21,7 @@ Upload the images to the cluster:
```shell
kind load docker-image --name knative dev.local/shopping-cart/services:0.0.1
kind load docker-image --name knative dev.local/shopping-cart/react-app:0.0.1
kind load docker-image --name knative ghcr.io/restatedev/restate-dist:latest
kind load docker-image --name knative docker.io/restatedev/restate:latest
```

3. Create the `shopping-cart` namespace
Expand Down Expand Up @@ -59,6 +60,7 @@ curl -X POST http://localhost:9070/endpoint/discover -H 'content-type: applicati
```

8. Fill the state of the product service with a list of products:

```shell
cd deployment/local && ./init_state.sh "localhost:8080" && cd -
```
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecommerce-store/deployment/knative/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: restate-runtime
image: ghcr.io/restatedev/restate-dist:latest
image: docker.io/restatedev/restate:latest
imagePullPolicy: Never
ports:
- containerPort: 8080
Expand Down
33 changes: 15 additions & 18 deletions typescript/food-ordering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ The `OrderService` interacts with the restaurants' external point of sale servic

The example illustrates the following aspects:

* How you can use Restate's side effects to make synchronous calls to external services.
* How you can use Awakeables to connect Restate handlers with asynchronous external services.
* How to resolve Awakeables from an external service and thereby resuming Restate invocations.
* How delayed calls can be used to schedule tasks for later moments in time.
- How you can use Restate's side effects to make synchronous calls to external services.
- How you can use Awakeables to connect Restate handlers with asynchronous external services.
- How to resolve Awakeables from an external service and thereby resuming Restate invocations.
- How delayed calls can be used to schedule tasks for later moments in time.

## Detailed description

This application implements the order processing middleware that sits between food delivery providers and restaurants.
Delivery providers forward orders to the Restate application via API requests (CreateOrder / CancelOrder / PrepareOrder).
This application implements the order processing middleware that sits between food delivery providers and restaurants.
Delivery providers forward orders to the Restate application via API requests (CreateOrder / CancelOrder / PrepareOrder).
The Restate services process the order and forward it to the appropriate point-of-sale (restaurant handling the order).

The app is implemented as a single keyed service that is keyed by `orderId`` and maintains the state machine of that order (i.e. the status of the order) as state in Restate.
The app is implemented as a single keyed service that is keyed by `orderId`` and maintains the state machine of that order (i.e. the status of the order) as state in Restate.

When an order is created a workflow is executed to check if the restaurant is open.
If this is the case then the order is accepted and gets created in the point of sales system of the restaurant.
The workflow becomes just another gRPC method that can be called and retried.
When an order is created a workflow is executed to check if the restaurant is open.
If this is the case then the order is accepted and gets created in the point of sales system of the restaurant.
The workflow becomes just another gRPC method that can be called and retried.
It calls the point of sales software of the restaurants as side effects and saves the state of the workflow in Restate.

### Delayed calls

Customers can schedule an order for later on (deliveryDelay).
This is implemented via Restate's delayed calls that schedule the preparation of the order to take place at the desired time.
This delayed call is persisted in Restate.
Customers can schedule an order for later on (deliveryDelay).
This is implemented via Restate's delayed calls that schedule the preparation of the order to take place at the desired time.
This delayed call is persisted in Restate.
Restate ensures that it happens, and takes care of retries to prevent lost orders and unhappy customers.

Have a look at the implementation of the `createOrder` function in the OrderService in `services/src/order_service.ts`.
Expand All @@ -41,16 +41,13 @@ Have a look at the implementation of the `createOrder` function in the OrderServ

When the order needs to be prepared, the `OrderService` creates an awakeable (persistent promise) and sends the awakeable ID together with the preparation request to the point of sales API of the restaurant.
The preparation is an asynchronous operation during which the workflow is paused.
Once the restaurant has finished the preparation, it resolves the awakeable to resume the `OrderService`.
Once the restaurant has finished the preparation, it resolves the awakeable to resume the `OrderService`.
The `OrderService` then notifies the delivery provider that they should send a driver to the restaurant.

Have a look at the implementation of the `prepareOrder` function in the `OrderService`` in `services/src/order_service.ts`.
Have a look at the implementation of the `prepareOrder` function in the ` OrderService`` in `services/src/order_service.ts`.

## Running this example

> **Note**
> Make sure you have [signed up for Restate's private beta](https://forms.gle/G8kDuucqhBoTfMwLA) and set up [access to Restate's packages](https://github.com/restatedev/restate-dist).
- Latest stable version of [NodeJS](https://nodejs.org/en/) >= v18.17.1 and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.6.7 installed.
- [Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).
- Optional: Docker Compose
Expand Down
2 changes: 1 addition & 1 deletion typescript/food-ordering/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
- COLLECTOR_OTLP_ENABLED=true

runtime:
image: ghcr.io/restatedev/restate-dist:latest
image: docker.io/restatedev/restate:latest
depends_on:
- services
- jaeger
Expand Down
3 changes: 0 additions & 3 deletions typescript/payment-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ and failures.

### Prerequisites

> **Note**
> Make sure you have [signed up for Restate's private beta](https://forms.gle/G8kDuucqhBoTfMwLA) and set up [access to Restate's packages](https://github.com/restatedev/restate-dist).
- Latest stable version of [NodeJS](https://nodejs.org/en/) >= v18.17.1 and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.6.7 installed.
- [Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).

Expand Down
3 changes: 0 additions & 3 deletions typescript/ticket-reservation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ Here is an incomplete list of simplifications to the application that are possib

### Prerequisites

> **Note**
> Make sure you have [signed up for Restate's private beta](https://forms.gle/G8kDuucqhBoTfMwLA) and set up [access to Restate's packages](https://github.com/restatedev/restate-dist).
- Latest stable version of [NodeJS](https://nodejs.org/en/) >= v18.17.1 and [npm CLI](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) >= 9.6.7 installed.
- [Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).

Expand Down

0 comments on commit 181779e

Please sign in to comment.