You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: typescript/ecommerce-store/README.md
-3
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,6 @@ Restate is a system for easily building resilient applications using **distribut
10
10
11
11
## Prerequisites
12
12
13
-
> **Note**
14
-
> 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).
15
-
16
13
- 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.
17
14
-[Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).
Copy file name to clipboardExpand all lines: typescript/food-ordering/README.md
+15-18
Original file line number
Diff line number
Diff line change
@@ -10,29 +10,29 @@ The `OrderService` interacts with the restaurants' external point of sale servic
10
10
11
11
The example illustrates the following aspects:
12
12
13
-
* How you can use Restate's side effects to make synchronous calls to external services.
14
-
* How you can use Awakeables to connect Restate handlers with asynchronous external services.
15
-
* How to resolve Awakeables from an external service and thereby resuming Restate invocations.
16
-
* How delayed calls can be used to schedule tasks for later moments in time.
13
+
- How you can use Restate's side effects to make synchronous calls to external services.
14
+
- How you can use Awakeables to connect Restate handlers with asynchronous external services.
15
+
- How to resolve Awakeables from an external service and thereby resuming Restate invocations.
16
+
- How delayed calls can be used to schedule tasks for later moments in time.
17
17
18
18
## Detailed description
19
19
20
-
This application implements the order processing middleware that sits between food delivery providers and restaurants.
21
-
Delivery providers forward orders to the Restate application via API requests (CreateOrder / CancelOrder / PrepareOrder).
20
+
This application implements the order processing middleware that sits between food delivery providers and restaurants.
21
+
Delivery providers forward orders to the Restate application via API requests (CreateOrder / CancelOrder / PrepareOrder).
22
22
The Restate services process the order and forward it to the appropriate point-of-sale (restaurant handling the order).
23
23
24
-
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.
24
+
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.
25
25
26
-
When an order is created a workflow is executed to check if the restaurant is open.
27
-
If this is the case then the order is accepted and gets created in the point of sales system of the restaurant.
28
-
The workflow becomes just another gRPC method that can be called and retried.
26
+
When an order is created a workflow is executed to check if the restaurant is open.
27
+
If this is the case then the order is accepted and gets created in the point of sales system of the restaurant.
28
+
The workflow becomes just another gRPC method that can be called and retried.
29
29
It calls the point of sales software of the restaurants as side effects and saves the state of the workflow in Restate.
30
30
31
31
### Delayed calls
32
32
33
-
Customers can schedule an order for later on (deliveryDelay).
34
-
This is implemented via Restate's delayed calls that schedule the preparation of the order to take place at the desired time.
35
-
This delayed call is persisted in Restate.
33
+
Customers can schedule an order for later on (deliveryDelay).
34
+
This is implemented via Restate's delayed calls that schedule the preparation of the order to take place at the desired time.
35
+
This delayed call is persisted in Restate.
36
36
Restate ensures that it happens, and takes care of retries to prevent lost orders and unhappy customers.
37
37
38
38
Have a look at the implementation of the `createOrder` function in the OrderService in `services/src/order_service.ts`.
@@ -41,16 +41,13 @@ Have a look at the implementation of the `createOrder` function in the OrderServ
41
41
42
42
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.
43
43
The preparation is an asynchronous operation during which the workflow is paused.
44
-
Once the restaurant has finished the preparation, it resolves the awakeable to resume the `OrderService`.
44
+
Once the restaurant has finished the preparation, it resolves the awakeable to resume the `OrderService`.
45
45
The `OrderService` then notifies the delivery provider that they should send a driver to the restaurant.
46
46
47
-
Have a look at the implementation of the `prepareOrder` function in the `OrderService`` in `services/src/order_service.ts`.
47
+
Have a look at the implementation of the `prepareOrder` function in the `OrderService`` in`services/src/order_service.ts`.
48
48
49
49
## Running this example
50
50
51
-
> **Note**
52
-
> 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).
53
-
54
51
- 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.
55
52
-[Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).
Copy file name to clipboardExpand all lines: typescript/payment-api/README.md
-3
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,6 @@ and failures.
24
24
25
25
### Prerequisites
26
26
27
-
> **Note**
28
-
> 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).
29
-
30
27
- 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.
31
28
-[Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).
Copy file name to clipboardExpand all lines: typescript/ticket-reservation/README.md
-3
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,6 @@ Here is an incomplete list of simplifications to the application that are possib
59
59
60
60
### Prerequisites
61
61
62
-
> **Note**
63
-
> 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).
64
-
65
62
- 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.
66
63
-[Docker Engine](https://docs.docker.com/engine/install/) to launch the Restate runtime (not needed for the app implementation itself).
0 commit comments