Browse this repository to see how easy distributed applications development becomes with Restate.
- Lambda greeter: A simple example of how you can run a Restate service on AWS Lambda.
- Payment api: Example API for payments, inspired by the Stripe API.
- Food ordering: See how to integrate Restate with external services using Awakeables and side effects.
- Ticket reservation: An example to illustrate how Restate's keyed-sharding and concurrency guarantees simplify microservice architectures.
- Ecommerce store: A sophisticated example on how to build an ecommerce store based on Restate using the grpc-based Typescript SDK.
If you want to join the Restate community in order to stay up to date, then please join our Discord. The Discord server is also the perfect place for sharing your feedback with us, learning more about Restate and connect with others!
Note Make sure you have signed up for Restate's private beta and set up access to Restate's packages.
Have a look at how to start up the runtime in a Docker container in [this repository]* or run the following commands:
- For MacOS:
docker run --name restate_dev --rm -p 8081:8081 -p 9091:9091 -p 9090:9090 -p 5432:5432 ghcr.io/restatedev/restate-dist:latest- For Linux:
docker run --name restate_dev --rm --network=host ghcr.io/restatedev/restate-dist:latestOnce the runtime is up, let it discover the services of the examples by executing:
- For MacOS:
curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json' -d '{"uri": "http://host.docker.internal:8080"}'- For Linux:
curl -X POST http://localhost:8081/endpoints -H 'content-type: application/json' -d '{"uri": "http://localhost:8080"}'This should give you the following output in case of the ticket reservation example:
{
"id": "bG9jYWxob3N0OjgwODAv",
"services": [
{
"name": "UserSession",
"revision": 1
},
{
"name": "TicketDb",
"revision": 1
},
{
"name": "CheckoutProcess",
"revision": 1
}
]
}In order to create a new release, push a tag of the form vX.Y.Z.
Then create a release via GitHub.
In order to upgrade/update the SDK dependency you have to run:
Major version change:
npm --prefix typescript install @restatedev/restate-sdk@^Z.Y.X --workspacesMinor/patch version change:
npm --prefix typescript update @restatedev/restate-sdk --workspacesNow check whether the examples are still building:
npm --prefix typescript run verify --workspaces