Skip to content

Commit

Permalink
Merge branch 'v1.12' into submodules_1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
hhunter-ms authored Oct 11, 2023
2 parents 420aa96 + 5010459 commit bff5b7d
Show file tree
Hide file tree
Showing 25 changed files with 547 additions and 272 deletions.
26 changes: 13 additions & 13 deletions daprdocs/content/en/contributing/daprbot.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ weight: 15
description: "List of Dapr bot capabilities."
---

Dapr bot is a GitHub script that helps with common tasks in the Dapr organization. It is set up individually for each repository ([example](https://github.com/dapr/dapr/blob/master/.github/workflows/dapr-bot.yml)) and can be configured to run on specific events. This reference covers the Dapr bot capabilities from the `dapr` and `components-contrib` repositories only.
Dapr bot is triggered by a list of commands that helps with common tasks in the Dapr organization. It is set up individually for each repository ([example](https://github.com/dapr/dapr/blob/master/.github/workflows/dapr-bot.yml)) and can be configured to run on specific events. Below is a list of commands and the list of repositories they are implemented on.

## Command reference

| Command | Target | Description | Who can use | Repository |
|---------|--------|-------------|-------------|------------|
| `/assign` | Issue | Assigns an issue to a user or group of users | Anyone | `dapr`, `components-contrib` |
| `/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` |
| 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` |
| `/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` |

## Label reference

You can query issues created by the Dapr bot by using the `created-by/dapr-bot` label ([query](https://github.com/search?q=org%3Adapr%20is%3Aissue%20label%3Acreated-by%2Fdapr-bot%20&type=issues)).

| Label | Target | What does it do? | Repository |
|-------|--------|------------------|------------|
| `docs-needed` | Issue | Creates a new issue in `dapr/docs` to track doc work | `dapr` |
| `sdk-needed` | Issue | Creates new issues across the SDK repos to track SDK work | `dapr` |
| `documentation required` | Issue or pull request | Creates a new issue in `dapr/docs` to track doc work | `components-contrib` |
| `new component` | Issue or pull request | Creates a new issue in `dapr/dapr` to register the new component | `components-contrib` |
| Label | Target | What does it do? | Repository |
| ------------------------ | --------------------- | ---------------------------------------------------------------- | -------------------- |
| `docs-needed` | Issue | Creates a new issue in `dapr/docs` to track doc work | `dapr` |
| `sdk-needed` | Issue | Creates new issues across the SDK repos to track SDK work | `dapr` |
| `documentation required` | Issue or pull request | Creates a new issue in `dapr/docs` to track doc work | `components-contrib` |
| `new component` | Issue or pull request | Creates a new issue in `dapr/dapr` to register the new component | `components-contrib` |
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ namespace CheckoutService.controller
Navigate to the directory containing the above code, then run the following command to launch both a Dapr sidecar and the subscriber application:

```bash
dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 --app-ssl dotnet run
dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 --app-protocol https dotnet run
```

{{% /codetab %}}
Expand Down Expand Up @@ -465,7 +465,7 @@ namespace EventService
Navigate to the directory containing the above code, then run the following command to launch both a Dapr sidecar and the publisher application:

```bash
dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --app-ssl dotnet run
dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --app-protocol https dotnet run
```

{{% /codetab %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ In the example above, `bulkSubscribe` is _optional_. If you use `bulkSubscribe`,
- `enabled` is mandatory and enables or disables bulk subscriptions on this topic
- You can optionally configure the max number of messages (`maxMessagesCount`) delivered in a bulk message.
Default value of `maxMessagesCount` for components not supporting bulk subscribe is 100 i.e. for default bulk events between App and Dapr. Please refer [How components handle publishing and subscribing to bulk messages]({{< ref pubsub-bulk >}}).
If a component supports bulk subscribe, then default value for this parameter can be found in that component doc. Please refer [Supported components]({{< ref pubsub-bulk >}}).
If a component supports bulk subscribe, then default value for this parameter can be found in that component doc.
- You can optionally provide the max duration to wait (`maxAwaitDurationMs`) before a bulk message is sent to the app.
Default value of `maxAwaitDurationMs` for components not supporting bulk subscribe is 1000 i.e. for default bulk events between App and Dapr. Please refer [How components handle publishing and subscribing to bulk messages]({{< ref pubsub-bulk >}}).
If a component supports bulk subscribe, then default value for this parameter can be found in that component doc. Please refer [Supported components]({{< ref pubsub-bulk >}}).
If a component supports bulk subscribe, then default value for this parameter can be found in that component doc.

The application receives an `EntryId` associated with each entry (individual message) in the bulk message. This `EntryId` must be used by the app to communicate the status of that particular entry. If the app fails to notify on an `EntryId` status, it's considered a `RETRY`.

Expand Down Expand Up @@ -473,9 +473,41 @@ public class BulkMessageController : ControllerBase
{{< /tabs >}}
## How components handle publishing and subscribing to bulk messages

Some pub/sub brokers support sending and receiving multiple messages in a single request. When a component supports bulk publish or subscribe operations, Dapr runtime uses them to further optimize the communication between the Dapr sidecar and the underlying pub/sub broker.

For components that do not have bulk publish or subscribe support, Dapr runtime uses the regular publish and subscribe APIs to send and receive messages one by one. This is still more efficient than directly using the regular publish or subscribe APIs, because applications can still send/receive multiple messages in a single request to/from Dapr.
For event publish/subscribe, two kinds of network transfers are involved.
1. From/To *App* To/From *Dapr*.
1. From/To *Dapr* To/From *Pubsub Broker*.

These are the opportunities where optimization is possible. When optimized, a Bulk requests are, which reduce number of overall calls and thus increase throughput and provide better latency.

On enabling Bulk Publish and/or Bulk Subscribe, the communication between the App and Dapr sidecar (Point 1 above) is optimized for **all components**.

Optimization from Dapr sidecar to the pub/sub broker would depend on a number of factors, for example:
- If the broker inherently supports Bulk pub/sub
- If the Dapr component is updated to support the use of bulk APIs provided by the broker.

Currently, the following components are updated to support this level of optimization:
<table width="100%">
<tr>
<th>Component</th>
<th>Bulk Publish</th>
<th>Bulk Subscribe</th>
</tr>
<tr>
<td>Kafka</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Azure Servicebus</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Azure Eventhubs</td>
<td>Yes</td>
<td>Yes</td>
</tr>
</table>

## Demos

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ In order to implement a pluggable component, you need to implement a gRPC servic

### Find the proto definition file

Proto definitions are provided for each supported service interface (state store, pub/sub, bindings).
Proto definitions are provided for each supported service interface (state store, pub/sub, bindings, secret stores).

Currently, the following component APIs are supported:

- State stores
- Pub/sub
- Bindings
- Secret stores

| Component | Type | gRPC definition | Built-in Reference Implementation | Docs |
| :---------: | :--------: | :--------------: | :----------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| State Store | `state` | [state.proto] | [Redis](https://github.com/dapr/components-contrib/tree/master/state/redis) | [concept]({{< ref "state-management-overview" >}}), [howto]({{< ref "howto-get-save-state" >}}), [api spec]({{< ref "state_api" >}}) |
| Pub/sub | `pubsub` | [pubsub.proto] | [Redis](https://github.com/dapr/components-contrib/tree/master/pubsub/redis) | [concept]({{< ref "pubsub-overview" >}}), [howto]({{< ref "howto-publish-subscribe" >}}), [api spec]({{< ref "pubsub_api" >}}) |
| Bindings | `bindings` | [bindings.proto] | [Kafka](https://github.com/dapr/components-contrib/tree/master/bindings/kafka) | [concept]({{< ref "bindings-overview" >}}), [input howto]({{< ref "howto-triggers" >}}), [output howto]({{< ref "howto-bindings" >}}), [api spec]({{< ref "bindings_api" >}}) |
| State Store | `state` | [state.proto](https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/state.proto) | [Redis](https://github.com/dapr/components-contrib/tree/master/state/redis) | [concept]({{< ref "state-management-overview" >}}), [howto]({{< ref "howto-get-save-state" >}}), [api spec]({{< ref "state_api" >}}) |
| Pub/sub | `pubsub` | [pubsub.proto](https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/pubsub.proto) | [Redis](https://github.com/dapr/components-contrib/tree/master/pubsub/redis) | [concept]({{< ref "pubsub-overview" >}}), [howto]({{< ref "howto-publish-subscribe" >}}), [api spec]({{< ref "pubsub_api" >}}) |
| Bindings | `bindings` | [bindings.proto](https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/bindings.proto) | [Kafka](https://github.com/dapr/components-contrib/tree/master/bindings/kafka) | [concept]({{< ref "bindings-overview" >}}), [input howto]({{< ref "howto-triggers" >}}), [output howto]({{< ref "howto-bindings" >}}), [api spec]({{< ref "bindings_api" >}}) |
| Secret Store | `secretstores` | [secretstore.proto](https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/secretstore.proto) | [Hashicorp/Vault](https://github.com/dapr/components-contrib/blob/master/secretstores/hashicorp/vault/vault.go) | [concept]({{< ref "secrets-overview" >}}), [howto-secrets]({{< ref "howto-secrets" >}}), [api spec]({{< ref "secrets_api" >}}) |

Below is a snippet of the gRPC service definition for pluggable component state stores ([state.proto]):

Expand Down Expand Up @@ -95,11 +97,15 @@ Provide a concrete implementation of the desired service. Each component has a g

- **Pub/sub**

Pluggable pub/sub components only have a single core service interface defined ([pubsub.proto]). They have no optional service interfaces.
Pluggable pub/sub components only have a single core service interface defined [pubsub.proto](https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/pubsub.proto). They have no optional service interfaces.

- **Bindings**

Pluggable input and output bindings have a single core service definition on [bindings.proto]. They have no optional service interfaces.
Pluggable input and output bindings have a single core service definition on [bindings.proto](https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/bindings.proto). They have no optional service interfaces.

- **Secret Store**

Pluggable Secret store have a single core service definition on [secretstore.proto](https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/secretstore.proto). They have no optional service interfaces.

After generating the above state store example's service scaffolding code using gRPC and protocol buffers tools, you can define concrete implementations for the 9 methods defined under `service StateStore`, along with code to initialize and communicate with your dependencies.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,3 @@ In contrast, pluggable components require additional steps before they can commu

- [Implement a pluggable component]({{< ref develop-pluggable.md >}})
- [Pluggable component registration]({{< ref "pluggable-components-registration" >}})

[state.proto]: https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/state.proto
[pubsub.proto]: https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/pubsub.proto
[bindings.proto]: https://github.com/dapr/dapr/blob/master/dapr/proto/components/v1/bindings.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ weight: 3000
---

{{% alert title="Note" color="primary" %}}
The Dapr Functions extension is currently in preview.
The Dapr extension for Azure Functions is currently in preview.
{{% /alert %}}

Dapr integrates with the [Azure Functions runtime](https://learn.microsoft.com/azure/azure-functions/functions-overview) via an extension that lets a function seamlessly interact with Dapr.
- **Azure Functions** provides an event-driven programming model.
- **Dapr** provides cloud-native building blocks.

Dapr integrates with the [Azure Functions runtime](https://learn.microsoft.com/azure/azure-functions/functions-overview) via an extension that lets a function seamlessly interact with Dapr. Azure Functions provides an event-driven programming model and Dapr provides cloud-native building blocks. The extension combines the two for serverless and event-driven apps.
The extension combines the two for serverless and event-driven apps.

Try out the [Dapr Functions extension](https://github.com/dapr/azure-functions-extension) samples.

{{< button text="Learn more about the Dapr Function extension in preview" link="https://cloudblogs.microsoft.com/opensource/2020/07/01/announcing-azure-functions-extension-for-dapr/" >}}
{{< button text="Try out the Dapr extension for Azure Functions" link="https://learn.microsoft.com/azure/azure-functions/functions-bindings-dapr" >}}
Loading

0 comments on commit bff5b7d

Please sign in to comment.