Skip to content

Commit

Permalink
Merge branch 'v1.12' into crypto-docs-dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
hhunter-ms authored Feb 14, 2024
2 parents 92bdb55 + d326c1b commit 444b18e
Show file tree
Hide file tree
Showing 26 changed files with 336 additions and 64 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing to Dapr docs

Please see [this docs section](https://docs.dapr.io/contributing/) for general guidance on contributions to the Dapr project as well as specific guidelines on contributions to the docs repo.
Please see [this docs section](https://docs.dapr.io/contributing/) for general guidance on contributions to the Dapr project as well as specific guidelines on contributions to the docs repo. Learn more about [Dapr bot commands and labels](https://docs.dapr.io/contributing/daprbot/) to improve your docs contributing experience.
12 changes: 0 additions & 12 deletions daprdocs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,6 @@ url_latest_version = "https://docs.dapr.io"
[[params.versions]]
version = "v1.7"
url = "https://v1-7.docs.dapr.io"
[[params.versions]]
version = "v1.6"
url = "https://v1-6.docs.dapr.io"
[[params.versions]]
version = "v1.5"
url = "https://v1-5.docs.dapr.io"
[[params.versions]]
version = "v1.4"
url = "https://v1-4.docs.dapr.io"
[[params.versions]]
version = "v1.3"
url = "https://v1-3.docs.dapr.io"

# UI Customization
[params.ui]
Expand Down
2 changes: 1 addition & 1 deletion daprdocs/content/en/contributing/daprbot.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Dapr bot is triggered by a list of commands that helps with common tasks in the

| Command | Target | Description | Who can use | Repository |
| ---------------- | --------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------- |
| `/assign` | Issue | Assigns an issue to a user or group of users | Anyone | `dapr`, `components-contrib`, `go-sdk` |
| `/assign` | Issue | Assigns an issue to a user or group of users | Anyone | `dapr`, `docs`, `quickstarts`, `cli`, `components-contrib`, `go-sdk`, `js-sdk`, `java-sdk`, `python-sdk`, `dotnet-sdk` |
| `/ok-to-test` | Pull request | `dapr`: trigger end to end tests <br/> `components-contrib`: trigger conformance and certification tests | Users listed in the [bot](https://github.com/dapr/dapr/blob/master/.github/scripts/dapr_bot.js) | `dapr`, `components-contrib` |
| `/ok-to-perf` | Pull request | Trigger performance tests. | Users listed in the [bot](https://github.com/dapr/dapr/blob/master/.github/scripts/dapr_bot.js) | `dapr` |
| `/make-me-laugh` | Issue or pull request | Posts a random joke | Users listed in the [bot](https://github.com/dapr/dapr/blob/master/.github/scripts/dapr_bot.js) | `dapr`, `components-contrib` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Now that you've learned about the [actor building block]({{< ref "actors-overvie

Dapr actors are virtual, meaning that their lifetime is not tied to their in-memory representation. As a result, they do not need to be explicitly created or destroyed. The Dapr actor runtime automatically activates an actor the first time it receives a request for that actor ID. If an actor is not used for a period of time, the Dapr actor runtime garbage-collects the in-memory object. It will also maintain knowledge of the actor's existence should it need to be reactivated later.

Invocation of actor methods and reminders reset the idle time, e.g. reminder firing will keep the actor active. Actor reminders fire whether an actor is active or inactive, if fired for inactive actor, it will activate the actor first. Actor timers do not reset the idle time, so timer firing will not keep the actor active. Timers only fire while the actor is active.
Invocation of actor methods, timers, and reminders reset the actor idle time. For example, a reminder firing keeps the actor active.
- Actor reminders fire whether an actor is active or inactive. If fired for an inactive actor, it activates the actor first.
- Actor timers firing reset the idle time; however, timers only fire while the actor is active.

The idle timeout and scan interval Dapr runtime uses to see if an actor can be garbage-collected is configurable. This information can be passed when Dapr runtime calls into the actor service to get supported actor types.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ Different state store implementations may implicitly put restrictions on the typ

Similarly, if a state store imposes restrictions on the size of a batch transaction, that may limit the number of parallel actions that can be scheduled by a workflow.

Workflow state can be purged from a state store, including all its history. Each Dapr SDK exposes APIs for purging all metadata related to specific workflow instances.

## Workflow scalability

Because Dapr Workflows are internally implemented using actors, Dapr Workflows have the same scalability characteristics as actors. The placement service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ You can use the following two techniques to write workflows that may need to sch

1. **Use the _continue-as-new_ API**:
Each workflow SDK exposes a _continue-as-new_ API that workflows can invoke to restart themselves with a new input and history. The _continue-as-new_ API is especially ideal for implementing "eternal workflows", like monitoring agents, which would otherwise be implemented using a `while (true)`-like construct. Using _continue-as-new_ is a great way to keep the workflow history size small.

> The _continue-as-new_ API truncates the existing history, replacing it with a new history.
1. **Use child workflows**:
Each workflow SDK exposes an API for creating child workflows. A child workflow behaves like any other workflow, except that it's scheduled by a parent workflow. Child workflows have:
Expand Down Expand Up @@ -149,6 +151,12 @@ Workflows can also wait for multiple external event signals of the same name, in

Learn more about [external system interaction.]({{< ref "workflow-patterns.md#external-system-interaction" >}})

## Purging

Workflow state can be purged from a state store, purging all its history and removing all metadata related to a specific workflow instance. The purge capability is used for workflows that have run to a `COMPLETED`, `FAILED`, or `TERMINATED` state.

Learn more in [the workflow API reference guide]({{< ref workflow_api.md >}}).

## Limitations

### Workflow determinism and code restraints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,8 @@ public class MonitorWorkflow extends Workflow {
}

// Put the workflow to sleep until the determined time
// Note: ctx.createTimer() method is not supported in the Java SDK yet
try {
TimeUnit.SECONDS.sleep(nextSleepInterval.getSeconds());
ctx.createTimer(nextSleepInterval);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -745,4 +744,4 @@ External events don't have to be directly triggered by humans. They can also be
- Try out the following examples:
- [Python](https://github.com/dapr/python-sdk/tree/master/examples/demo_workflow)
- [.NET](https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow)
- [Java](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows)
- [Java](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows)
40 changes: 36 additions & 4 deletions daprdocs/content/en/getting-started/install-dapr-selfhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ Dapr initialization includes:
1. Creating a **default components folder** with component definitions for the above.
1. Running a **Dapr placement service container instance** for local actor support.

{{% alert title="Kubernetes Development Environment" color="primary" %}}
To initialize Dapr in your local or remote **Kubernetes** cluster for development (including the Redis and Zipkin containers listed above), see [how to initialize Dapr for development on Kubernetes]({{<ref "kubernetes-deploy.md#install-dapr-from-the-official-dapr-helm-chart-with-development-flag">}})
{{% /alert %}}

{{% alert title="Docker" color="primary" %}}
The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{<ref self-hosted-no-docker.md>}})), the next steps in this guide assume the recommended Docker development environment.
The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{< ref self-hosted-no-docker.md >}})), the next steps in this guide assume the recommended Docker development environment.

You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{<ref dapr-init.md>}}).
You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{< ref dapr-init.md >}}).
{{% /alert %}}

### Step 1: Open an elevated terminal
Expand Down Expand Up @@ -54,12 +58,35 @@ Run Windows Terminal or command prompt as administrator.

### Step 2: Run the init CLI command

{{< tabs "Linux/MacOS" "Windows">}}

{{% codetab %}}

Install the latest Dapr runtime binaries:

```bash
dapr init
```

**If you are installing on Mac OS Silicon with Docker,** you may need to perform the following workaround to enable `dapr init` to talk to Docker without using Kubernetes.
1. Navigate to **Docker Desktop** > **Settings** > **Advanced**.
1. Select the **Enable default Docker socket** checkbox.

{{% /codetab %}}

{{% codetab %}}

Install the latest Dapr runtime binaries:

```bash
dapr init
```

{{% /codetab %}}

{{< /tabs >}}


### Step 3: Verify Dapr version

```bash
Expand Down Expand Up @@ -112,9 +139,14 @@ ls $HOME/.dapr
{{% /codetab %}}

{{% codetab %}}

You can verify using either PowerShell or command line. If using PowerShell, run:
```powershell
explorer "%USERPROFILE%\.dapr\"
explorer "$env:USERPROFILE\.dapr"
```

If using command line, run:
```cmd
explorer "%USERPROFILE%\.dapr"
```

**Result:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/python/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./checkout
pip3 install -r requirements.txt
cd ..
cd ./order-processor
pip3 install -r requirements.txt
cd ..
cd ./order-processor-fastapi
pip3 install -r requirements.txt
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -215,6 +229,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/javascript/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
npm install
cd ..
cd ./checkout
npm install
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -352,6 +377,18 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/csharp/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
dotnet restore
dotnet build
cd ../checkout
dotnet restore
dotnet build
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -497,6 +534,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/java/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
mvn clean install
cd ..
cd ./checkout
mvn clean install
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -647,6 +695,16 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/go/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
go build .
cd ../checkout
go build .
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -878,7 +936,7 @@ with DaprClient() as client:

### Step 5: View the Pub/sub outputs

Notice, as specified in the code above, the publisher pushes a random number to the Dapr sidecar while the subscriber receives it.
The publisher sends orders to the Dapr sidecar while the subscriber receives them.

Publisher output:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/python/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
pip3 install -r requirements.txt
cd ../checkout
pip3 install -r requirements.txt
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -184,6 +194,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/javascript/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
npm install
cd ../checkout
npm install
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -314,6 +334,18 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/csharp/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
dotnet restore
dotnet build
cd ../checkout
dotnet restore
dotnet build
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -448,6 +480,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/java/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
mvn clean install
cd ../checkout
mvn clean install
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -577,6 +619,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/go/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
go build .
cd ../checkout
go build .
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down
Loading

0 comments on commit 444b18e

Please sign in to comment.