Skip to content

Commit 9e7dda6

Browse files
committed
Update readmes
1 parent c096829 commit 9e7dda6

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ challenges.
1010

1111
* **Basics:** Small examples highlighting the basic building blocks, like
1212
durable execution or virtual objects.
13-
13+
1414
* **Use Cases and Patterns:** Small specific use cases, like webhooks,
1515
workflows, asynchronous task queuing.
1616

@@ -27,7 +27,7 @@ challenges.
2727
* **Tutorials:** A step-by-step guide that builds an application and introduces
2828
the Restate concepts on the way.
2929

30-
## Example catalogs
30+
## Example catalogs
3131

3232
Have a look at the example catalog for your preferred SDK language:
3333

@@ -74,7 +74,7 @@ Or have a look at the general catalog below:
7474

7575
| Example Name | Languages |
7676
|-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
77-
| <a id="aws-lambda">AWS Lambda + CDK</a> | [<img src="https://skillicons.dev/icons?i=ts" width="24" height="24">](typescript/integrations/deployment-lambda-cdk) [<img src="https://skillicons.dev/icons?i=go" width="24" height="24">](go/integrations/go-lambda-cdk) [<img src="https://skillicons.dev/icons?i=kotlin&theme=light" width="24" height="24">](kotlin/integrations/kotlin-gradle-lambda-cdk) |
77+
| <a id="aws-lambda">AWS Lambda + CDK</a> | [<img src="https://skillicons.dev/icons?i=ts" width="24" height="24">](typescript/integrations/deployment-lambda-cdk) [<img src="https://skillicons.dev/icons?i=go" width="24" height="24">](go/integrations/go-lambda-cdk) [<img src="https://skillicons.dev/icons?i=java&theme=light" width="24" height="24">](java/integrations/java-gradle-lambda-cdk) [<img src="https://skillicons.dev/icons?i=kotlin&theme=light" width="24" height="24">](kotlin/integrations/kotlin-gradle-lambda-cdk) |
7878
| <a id="xstate">XState</a> | [<img src="https://skillicons.dev/icons?i=ts" width="24" height="24">](typescript/integrations/xstate) |
7979
| <a id="knative">Knative</a> | [<img src="https://skillicons.dev/icons?i=go" width="24" height="24">](go/integrations/knative-go) |
8080

go/integrations/go-lambda-cdk/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For more information on CDK, please see [Getting started with the AWS CDK](https
1919
- Via git clone:
2020
```shell
2121
git clone [email protected]:restatedev/examples.git
22-
cd examples/templates/go-lambda-cdk
22+
cd examples/go/integrations/go-lambda-cdk
2323
```
2424

2525
- Via `wget`:

java/integrations/java-gradle-lambda-cdk/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ For more information on CDK, please see [Getting started with the AWS CDK](https
77

88
* [CDK app entry point `lambda-jvm-cdk.ts`](bin/lambda-jvm-cdk.ts)
99
* [CDK stack consisting of a Lambda function and providing Restate service registration](cdk/lambda-jvm-cdk-stack.ts)
10-
* [Java Lambda handler](lambda) - based on [`hello-world-java`](../java-gradle)
10+
* [Java Lambda handler](lambda) - based on [`hello-world-java`](../../templates/java-gradle)
1111

1212
## Download the example
1313

@@ -19,7 +19,7 @@ For more information on CDK, please see [Getting started with the AWS CDK](https
1919
- Via git clone:
2020
```shell
2121
git clone [email protected]:restatedev/examples.git
22-
cd examples/templates/java-gradle-lambda-cdk
22+
cd examples/java/integrations/java-gradle-lambda-cdk
2323
```
2424

2525
- Via `wget`:

kotlin/integrations/kotlin-gradle-lambda-cdk/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For more information on CDK, please see [Getting started with the AWS CDK](https
2020
- Via git clone:
2121
```shell
2222
git clone [email protected]:restatedev/examples.git
23-
cd examples/templates/kotlin-gradle-lambda-cdk
23+
cd examples/kotlin/integrations/kotlin-gradle-lambda-cdk
2424
```
2525

2626
- Via `wget`:
@@ -68,4 +68,4 @@ curl -k ${restateIngressUrl}/Greeter/greet \
6868

6969
* `npm run build` compile the Lambda handler and synthesize CDK deployment artifacts
7070
* `npm run deploy` perform a CDK deployment
71-
* `npm run destroy` delete the stack and all its resources
71+
* `npm run destroy` delete the stack and all its resources

python/end-to-end-applications/food-ordering/README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Food ordering app with Restate
22

33
The example application implements an order processing middleware which sits between third-party food ordering providers and restaurants.
4-
Food ordering providers submit orders over HTTP.
4+
Food ordering providers submit orders over HTTP.
55
For each request, Restate triggers the `run` handler of the order workflow.
66
The order workflow interacts with the restaurants' external point of sale service to request the preparation of the orders.
77
It also interacts with the delivery services to get the order delivered to the customer once preparation is done.
@@ -20,7 +20,7 @@ The app logic (order workflow) discussed in the presentation can be found under:
2020
- Via git clone:
2121
```shell
2222
git clone [email protected]:restatedev/examples.git
23-
cd examples/end-to-end-applications/python/food-ordering
23+
cd examples/python/end-to-end-applications/food-ordering
2424
```
2525

2626
- Via `wget`:
@@ -49,11 +49,11 @@ docker compose build --no-cache
4949

5050
Clean up after bringing setup down:
5151
```shell
52-
docker compose rm
52+
docker compose rm
5353
```
5454

5555
### Inspecting state and ongoing invocations
56-
56+
5757
If you buy some products via the webUI, you can see how the order workflow is executed by querying the state of the order status service:
5858
```shell
5959
restate kv get order-workflow
@@ -70,7 +70,7 @@ restate invocations describe <invocation_id>
7070

7171
Restate has a psql interface to query the state of the system, via `restate sql <query>`.
7272
For example, have a look at all the K/V state via `restate sql "SELECT * FROM state;"`.
73-
Have a look at the introspection documentation to learn more.
73+
Have a look at the introspection documentation to learn more.
7474

7575
## Exploring the demo
7676

@@ -83,24 +83,24 @@ The flow of an incoming order is as follows:
8383
2. The order workflow then triggers the payment by calling a third-party payment provider (implemented as a stub in this example). To do this, the order workflow first generates an idempotency token, and then uses this to call the payment provider. The payment provider can deduplicate retries via the idempotency key.
8484
3. The workflow then sets the order status to `SCHEDULED` and sets a timer to continue processing after the delivery delay has passed. For example, if a customer ordered food for later in the day, the order will be scheduled for preparation at the requested time. If any failures occur during the sleep, Restate makes sure that the workflow will still wake up on time.
8585
4. Once the timer fires, the order workflow sends a request to the restaurant point-of-sales system to start the preparation. This is done via an HTTP request from within `ctx.run`. The status of the order is set to `IN_PREPARATION`. The restaurant will use call the `finishedPreparation` handler to signal that the preparation is done. Once this happens, the order workflow will continue and set the order status to `SCHEDULING_DELIVERY`.
86-
5. Then, the order workflow calls the delivery manager (`app/ordering/delivery_manager.py`) to schedule the delivery of the order (see description below). It then waits on the delivery manager to signal the different phases of delivery it goes through: `WAITING_FOR_DRIVER`, `IN_DELIVERY`, and `DELIVERED`.
86+
5. Then, the order workflow calls the delivery manager (`app/ordering/delivery_manager.py`) to schedule the delivery of the order (see description below). It then waits on the delivery manager to signal the different phases of delivery it goes through: `WAITING_FOR_DRIVER`, `IN_DELIVERY`, and `DELIVERED`.
8787

8888
### The delivery workflow
89-
To get the order delivered a set of services work together. The delivery manager (`start` method in `delivery_manager.py`) implements the delivery workflow.
90-
It tracks the delivery status, by storing it in Restate's state store, and then requests a driver to do the delivery.
91-
To do that, it requests a driver from the driver-delivery matcher.
89+
To get the order delivered a set of services work together. The delivery manager (`start` method in `delivery_manager.py`) implements the delivery workflow.
90+
It tracks the delivery status, by storing it in Restate's state store, and then requests a driver to do the delivery.
91+
To do that, it requests a driver from the driver-delivery matcher.
9292
The driver-delivery matcher tracks available drivers and pending deliveries for each region, and matches drivers to deliveries.
93-
Once a driver has been found, the delivery manager assigns the delivery to the driver and signals the order workflow that it selected the driver.
93+
Once a driver has been found, the delivery manager assigns the delivery to the driver and signals the order workflow that it selected the driver.
9494
The delivery has started now. The delivery manager relies for the rest of the delivery updates on the driver digital twin.
9595

96-
The driver's digital twin (`driver_digital_twin.py`) is the digital representation of a driver in the field.
96+
The driver's digital twin (`driver_digital_twin.py`) is the digital representation of a driver in the field.
9797
Each driver has a mobile app on his phone (here simulated by `external/driver_mobile_app_sim.py`) which continuously sends updates to the digital twin of the driver:
9898
1. The driver can notify when they start working: have a look at `driver-mobile-app/start_driver` which calls `driver-digital-twin/set_driver_available`.
9999
2. The mobile app also polls the digital twin to check if a new delivery was assigned to the driver. Have a look at `driver-mobile-app/poll_for_work` which regularly calls `driver-digital-twin/get_assigned_delivery`.
100100
3. During delivery, the mobile app sends regular location updates over Kafka to the digital twin of the driver. Have a look at the method `driver-digital-twin/handle_driver_location_update_event`. In the Docker compose file (`docker-compose.yaml`), the `runtimesetup` container executes a curl request to let Restate subscribe to the topic.
101-
4. Once the driver has arrived at the restaurant, the driver's mobile app notifies its digital twin (by calling `driver-digital-twin/notify_delivery_pickup`).
101+
4. Once the driver has arrived at the restaurant, the driver's mobile app notifies its digital twin (by calling `driver-digital-twin/notify_delivery_pickup`).
102102
The digital twin then notifies the delivery manager that the driver has picked up the delivery (by calling `delivery-manager/notify_delivery_pickup`).
103-
5. Finally, the driver arrives at the customer and the driver's mobile app notifies its digital twin (by calling `driver-digital-twin/notify_delivery_delivered`).
103+
5. Finally, the driver arrives at the customer and the driver's mobile app notifies its digital twin (by calling `driver-digital-twin/notify_delivery_delivered`).
104104
The digital twin then notifies the delivery manager that the driver has picked up the delivery (by calling `delivery-manager/notify_delivery_delivered`).
105105
6. The delivery manager then notifies the order workflow that the order got delivered, so that it completes.
106106

typescript/integrations/deployment-lambda-cdk/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For more information on CDK, please see [Getting started with the AWS CDK](https
2020
- Via git clone:
2121
```shell
2222
git clone [email protected]:restatedev/examples.git
23-
cd examples/templates/typescript-lambda-cdk
23+
cd examples/typescript/integrations/deployment-lambda-cdk
2424
```
2525

2626
- Via `wget`:
@@ -44,7 +44,7 @@ npm install
4444
```
4545

4646
To deploy the stack, export the Restate Cloud environment id and API key, and run `cdk deploy`:
47-
47+
4848
```shell
4949
export RESTATE_ENV_ID=env_... RESTATE_API_KEY=key_...
5050
npx cdk deploy

0 commit comments

Comments
 (0)