|
6 | 6 |
|
7 | 7 | Browse this repository to see how easy distributed applications development becomes with Restate.
|
8 | 8 |
|
9 |
| -## Typescript examples |
| 9 | +## Starters |
10 | 10 |
|
11 |
| -### Starter examples |
| 11 | + |
12 | 12 |
|
13 |
| -* [Lambda greeter](typescript/lambda-greeter): A simple example of how you can run a Restate service on AWS Lambda. |
14 |
| -* [Payment api](typescript/payment-api/): Example API for payments, inspired by the Stripe API. |
15 |
| -* [Food ordering](typescript/food-ordering): See how to integrate Restate with external services using Awakeables and side effects. |
| 13 | +[Hello world on AWS Lambda](typescript/hello-world-lambda) |
| 14 | +```shell |
| 15 | +# Download the example |
| 16 | +wget https://github.com/restatedev/examples/releases/latest/download/typescript-hello-world-lambda.zip && unzip typescript-hello-world-lambda.zip -d typescript-hello-world-lambda && rm typescript-hello-world-lambda.zip |
| 17 | +``` |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +[Hello World HTTP](java/hello-world-http) |
| 22 | +```shell |
| 23 | +# Download the example |
| 24 | +wget https://github.com/restatedev/examples/releases/latest/download/java-hello-world-http.zip && unzip java-hello-world-http.zip -d java-hello-world-http && rm java-hello-world-http.zip |
| 25 | +``` |
| 26 | + |
| 27 | +[Hello world on AWS Lambda](java/hello-world-lambda) |
| 28 | +```shell |
| 29 | +# Download the example |
| 30 | +wget https://github.com/restatedev/examples/releases/latest/download/java-hello-world-lambda.zip && unzip java-hello-world-lambda.zip -d java-hello-world-lambda && rm java-hello-world-lambda.zip |
| 31 | +``` |
| 32 | + |
| 33 | + |
16 | 34 |
|
17 |
| -### Intermediate examples |
| 35 | +[Hello World HTTP](java/hello-world-kotlin-http) |
| 36 | +```shell |
| 37 | +# Download the example |
| 38 | +wget https://github.com/restatedev/examples/releases/latest/download/kotlin-hello-world-http.zip && unzip kotlin-hello-world-http.zip -d kotlin-hello-world-http && rm kotlin-hello-world-http.zip |
| 39 | +``` |
| 40 | + |
| 41 | +[Hello world on AWS Lambda](java/hello-world-kotlin-lambda) |
| 42 | +```shell |
| 43 | +# Download the example |
| 44 | +wget https://github.com/restatedev/examples/releases/latest/download/kotlin-hello-world-lambda.zip && unzip kotlin-hello-world-lambda.zip -d kotlin-hello-world-lambda && rm kotlin-hello-world-lambda.zip |
| 45 | +``` |
18 | 46 |
|
19 |
| -* [Ticket reservation](typescript/ticket-reservation): An example to illustrate how Restate's keyed-sharding and concurrency guarantees simplify microservice architectures. |
| 47 | +## Patterns |
20 | 48 |
|
21 |
| -### Advanced examples |
| 49 | + |
22 | 50 |
|
23 |
| -- [Ecommerce store](typescript/ecommerce-store): A sophisticated example on how to build an ecommerce store based on Restate using the grpc-based Typescript SDK. |
| 51 | +[Payment api](typescript/payment-api): Example API for payments, inspired by the Stripe API |
| 52 | +```shell |
| 53 | +# Download the example |
| 54 | +wget https://github.com/restatedev/examples/releases/latest/download/typescript-payment-api.zip && unzip typescript-payment-api.zip -d typescript-payment-api && rm typescript-payment-api.zip |
| 55 | +``` |
| 56 | + |
| 57 | +## Applications |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +[Food ordering](typescript/food-ordering): Integrate Restate with external services |
| 62 | +```shell |
| 63 | +# Download the example |
| 64 | +wget https://github.com/restatedev/examples/releases/latest/download/typescript-food-ordering.zip && unzip typescript-food-ordering.zip -d typescript-food-ordering && rm typescript-food-ordering.zip |
| 65 | +``` |
| 66 | + |
| 67 | +[Ticket reservation](typescript/ticket-reservation): Example showing Restate's keyed-sharding and concurrency guarantees |
| 68 | +```shell |
| 69 | +# Download the example |
| 70 | +wget https://github.com/restatedev/examples/releases/latest/download/typescript-ticket-reservation.zip && unzip typescript-ticket-reservation.zip -d typescript-ticket-reservation && rm typescript-ticket-reservation.zip |
| 71 | +``` |
| 72 | + |
| 73 | +[Ecommerce store](typescript/ecommerce-store): An ecommerce store completely built on top of Restate |
| 74 | +```shell |
| 75 | +# Download the example |
| 76 | +wget https://github.com/restatedev/examples/releases/latest/download/typescript-ecommerce-store.zip && unzip typescript-ecommerce-store.zip -d typescript-ecommerce-store && rm typescript-ecommerce-store.zip |
| 77 | +``` |
24 | 78 |
|
25 | 79 | ## Joining the community
|
26 | 80 |
|
@@ -78,29 +132,19 @@ This should give you the following output in case of the ticket reservation exam
|
78 | 132 | }
|
79 | 133 | ```
|
80 | 134 |
|
81 |
| -## Releasing (for Restate developers) |
82 |
| - |
83 |
| -In order to create a new release, push a tag of the form `vX.Y.Z`. |
84 |
| -Then [create a release via GitHub](https://github.com/restatedev/example-lambda-ts-greeter/releases). |
| 135 | +## Adding examples (for Restate developers) |
85 | 136 |
|
86 |
| -### Upgrading the SDK dependency (for Restate developers) |
| 137 | +When adding a new example: |
87 | 138 |
|
88 |
| -In order to upgrade/update the SDK dependency you have to run: |
| 139 | +* Make sure it has a `.gitignore` file and a README |
| 140 | +* Add it to this README |
| 141 | +* Check it's tested both in [`test.yaml`](./.github/workflows/test.yml) and [`pre-release.yaml`](./.github/workflows/pre-release.yml) |
| 142 | +* Add it to the [zips script](./scripts/prepare_release_zip.sh) and [`release.yaml`](./.github/workflows/release.yml) |
89 | 143 |
|
90 |
| -**Major version** change: |
| 144 | +## Releasing (for Restate developers) |
91 | 145 |
|
92 |
| -```shell |
93 |
| -npm --prefix typescript install @restatedev/restate-sdk@^Z.Y.X --workspaces |
94 |
| -``` |
| 146 | +Before releasing, trigger the "pre-release" workflow to update sdk versions. This automatically creates a pull request, which must be manually merged. |
95 | 147 |
|
96 |
| -**Minor/patch version** change: |
| 148 | +Once the repo is ready for the release, push a tag of the form `vX.Y.Z`. |
97 | 149 |
|
98 |
| -```shell |
99 |
| -npm --prefix typescript update @restatedev/restate-sdk --workspaces |
100 |
| -``` |
101 |
| - |
102 |
| -Now check whether the examples are still building: |
103 |
| - |
104 |
| -```shell |
105 |
| -npm --prefix typescript run verify --workspaces |
106 |
| -``` |
| 150 | +This triggers a workflow that [creates a draft release](https://github.com/restatedev/examples/releases) on Github, which you need to approve to finalize it. |
0 commit comments