diff --git a/quickstarts/dapr/README.md b/quickstarts/dapr/README.md index 22ca7940..3a9ecceb 100644 --- a/quickstarts/dapr/README.md +++ b/quickstarts/dapr/README.md @@ -2,4 +2,59 @@ This quickstart teaches how to add a Dapr sidecar to your application and use Dapr building blocks. -Visit https://radapp.dev to try it out. +Visit [radapp.dev](https://docs.radapp.dev/getting-started/quickstarts/quickstart-dapr/) for instructions on deploying this quickstart app to try it out. + +## Overview + +You will deploy an online store where you can order items: + +A diagram of the Dapr application + +## Containers + +This Radius application will have two [containers](https://docs.radapp.dev/concepts/appmodel-concept/): + +- A frontend UI for users to place orders. Written with .NET Blazor. +- A backend order processing microservice. Written in Node.JS. + +### `frontend` container + +The user-facing UI app (`frontend`) offers a portal for users to place orders. Upon creating an order, `frontend` uses [Dapr service invocation](https://docs.dapr.io/developing-applications/building-blocks/service-invocation/service-invocation-overview/) to send requests to `nodeapp`. + +The `frontend` container is configured with a [Dapr sidecar extension](https://docs.radapp.dev/reference/resource-schema/link-schema/dapr-schema/extension/) to add the sidecar container. + +A diagram of the complete application + +### `backend` container + +The order processing microservice (`backend`) accepts HTTP requests to create or display orders. It accepts HTTP requests on two endpoints: `GET /order` and `POST /neworder`. + +The `backend` container is configured with a [Dapr sidecar extension](https://docs.radapp.dev/reference/resource-schema/link-schema/dapr-schema/extension/) to add the sidecar container, along with a [Dapr Route](#routes) to model Dapr communication. + +A diagram of the backend order processing service + +## Routes + +Radius offers communication between services via [Routes](https://docs.radapp.dev/concepts/appmodel-concept/#routes). + +### Dapr service invocation + +In this quickstart we will be using a [Dapr HTTP invoke route](https://docs.radapp.dev/reference/resource-schema/link-schema/dapr-schema/http/) resource to model communication from `frontend` to `backend`. This allows `frontend` to use Dapr service invocation to interact with `backend`. + +A diagram of the Dapr service invocation + +## Link + +A [Dapr statestore link](https://docs.radapp.dev/reference/resource-schema/link-schema/dapr-schema/dapr-secretstore/) is used to model and deploy the Dapr statestore component. + +### `statestore` Dapr state store + +The [Dapr state store](https://docs.radapp.dev/reference/resource-schema/link-schema/dapr-schema/dapr-statestore/) resource (`statestore`) stores information about orders. It could be any compatible [Dapr state store](https://docs.dapr.io/developing-applications/building-blocks/state-management/state-management-overview/). + +The Dapr component configuration is automatically generated for the statestore based on the resource or values provided in the link definition. + +#### Swappable infrastructure + +In this quickstart you will be able to swap between different Dapr components, such as Azure Table Storage and a Redis container. While the backing infrastructure will change, the container definitions and connections will remain the same. This allows you to easily swap between different backing infrastructure without rewriting your service code or definition. + +A diagram of the Dapr state store \ No newline at end of file diff --git a/quickstarts/dapr/images/backend.png b/quickstarts/dapr/images/backend.png new file mode 100644 index 00000000..7f84e420 Binary files /dev/null and b/quickstarts/dapr/images/backend.png differ diff --git a/quickstarts/dapr/images/frontend.png b/quickstarts/dapr/images/frontend.png new file mode 100644 index 00000000..e73abf21 Binary files /dev/null and b/quickstarts/dapr/images/frontend.png differ diff --git a/quickstarts/dapr/images/generator.png b/quickstarts/dapr/images/generator.png new file mode 100644 index 00000000..98a27357 Binary files /dev/null and b/quickstarts/dapr/images/generator.png differ diff --git a/quickstarts/dapr/images/invoke.png b/quickstarts/dapr/images/invoke.png new file mode 100644 index 00000000..77f2dc72 Binary files /dev/null and b/quickstarts/dapr/images/invoke.png differ diff --git a/quickstarts/dapr/images/overview.png b/quickstarts/dapr/images/overview.png new file mode 100644 index 00000000..50658d46 Binary files /dev/null and b/quickstarts/dapr/images/overview.png differ diff --git a/quickstarts/dapr/images/radius-overview.png b/quickstarts/dapr/images/radius-overview.png new file mode 100644 index 00000000..78f1a3d9 Binary files /dev/null and b/quickstarts/dapr/images/radius-overview.png differ diff --git a/quickstarts/dapr/images/statestore.png b/quickstarts/dapr/images/statestore.png new file mode 100644 index 00000000..f819e908 Binary files /dev/null and b/quickstarts/dapr/images/statestore.png differ diff --git a/quickstarts/dapr/images/store.png b/quickstarts/dapr/images/store.png new file mode 100644 index 00000000..a03887f2 Binary files /dev/null and b/quickstarts/dapr/images/store.png differ