Skip to content

Commit c9e55a1

Browse files
Merge branch 'v1.12' into template-k8s
2 parents d84a2ab + 9f9deb7 commit c9e55a1

File tree

4 files changed

+18
-29
lines changed

4 files changed

+18
-29
lines changed

daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,21 @@ The diagram below shows an example of how this works. If you have 1 instance of
9494

9595
Dapr can run on a variety of [hosting platforms]({{< ref hosting >}}). To enable service discovery and service invocation, Dapr uses pluggable [name resolution components]({{< ref supported-name-resolution >}}). For example, the Kubernetes name resolution component uses the Kubernetes DNS service to resolve the location of other applications running in the cluster. Self-hosted machines can use the mDNS name resolution component. The Consul name resolution component can be used in any hosting environment, including Kubernetes or self-hosted.
9696

97+
### Streaming for HTTP service invocation
98+
99+
You can handle data as a stream in HTTP service invocation. This can offer improvements in performance and memory utilization when using Dapr to invoke another service using HTTP with large request or response bodies.
100+
101+
The diagram below demonstrates the six steps of data flow.
102+
103+
<img src="/images/service-invocation-simple.webp" width=600 alt="Diagram showing the steps of service invocation described in the table below" />
104+
105+
1. Request: "App A" to "Dapr sidecar A"
106+
1. Request: "Dapr sidecar A" to "Dapr sidecar B"
107+
1. Request: "Dapr sidecar B" to "App B"
108+
1. Response: "App B" to "Dapr sidecar B"
109+
1. Response: "Dapr sidecar B" to "Dapr sidecar A"
110+
1. Response: "Dapr sidecar A" to "App A"
111+
97112
## Example Architecture
98113

99114
Following the above call sequence, suppose you have the applications as described in the [Hello World tutorial](https://github.com/dapr/quickstarts/blob/master/tutorials/hello-world/README.md), where a python app invokes a node.js app. In such a scenario, the python app would be "Service A" , and a Node.js app would be "Service B".

daprdocs/content/en/developing-applications/building-blocks/workflow/howto-author-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ builder.Services.AddDaprWorkflow(options =>
399399
WebApplication app = builder.Build();
400400

401401
// POST starts new order workflow instance
402-
app.MapPost("/orders", async (WorkflowEngineClient client, [FromBody] OrderPayload orderInfo) =>
402+
app.MapPost("/orders", async (DaprWorkflowClient client, [FromBody] OrderPayload orderInfo) =>
403403
{
404404
if (orderInfo?.Name == null)
405405
{
@@ -414,7 +414,7 @@ app.MapPost("/orders", async (WorkflowEngineClient client, [FromBody] OrderPaylo
414414
});
415415

416416
// GET fetches state for order workflow to report status
417-
app.MapGet("/orders/{orderId}", async (string orderId, WorkflowEngineClient client) =>
417+
app.MapGet("/orders/{orderId}", async (string orderId, DaprWorkflowClient client) =>
418418
{
419419
WorkflowState state = await client.GetWorkflowStateAsync(orderId, true);
420420
if (!state.Exists)

daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: Get started with the Dapr Workflow building block
1010
Dapr Workflow is currently in beta. [See known limitations for {{% dapr-latest-version cli="true" %}}]({{< ref "workflow-overview.md#limitations" >}}).
1111
{{% /alert %}}
1212

13-
Let's take a look at the Dapr [Workflow building block]({{< ref workflow >}}). In this Quickstart, you'll create a simple console application to demonstrate Dapr's workflow programming model and the workflow management APIs.
13+
Let's take a look at the Dapr [Workflow building block]({{< ref workflow-overview.md >}}). In this Quickstart, you'll create a simple console application to demonstrate Dapr's workflow programming model and the workflow management APIs.
1414

1515
In this guide, you'll:
1616

daprdocs/content/en/operations/support/support-preview-features.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ For CLI there is no explicit opt-in, just the version that this was first made a
1515

1616
| Feature | Description | Setting | Documentation | Version introduced |
1717
| --- | --- | --- | --- | --- |
18-
| **Streaming for HTTP service invocation** | Enables (partial) support for using streams in HTTP service invocation; see below for more details. | `ServiceInvocationStreaming` | [Details]({{< ref "support-preview-features.md#streaming-for-http-service-invocation" >}}) | v1.10 |
1918
| **Pluggable components** | Allows creating self-hosted gRPC-based components written in any language that supports gRPC. The following component APIs are supported: State stores, Pub/sub, Bindings | N/A | [Pluggable components concept]({{<ref "components-concept#pluggable-components" >}})| v1.9 |
2019
| **Multi-App Run for Kubernetes** | Configure multiple Dapr applications from a single configuration file and run from a single command on Kubernetes | `dapr run -k -f` | [Multi-App Run]({{< ref multi-app-dapr-run.md >}}) | v1.10 |
2120
| **Workflows** | Author workflows as code to automate and orchestrate tasks within your application, like messaging, state management, and failure handling | N/A | [Workflows concept]({{< ref "components-concept#workflows" >}})| v1.10 |
@@ -24,28 +23,3 @@ For CLI there is no explicit opt-in, just the version that this was first made a
2423
| **Actor State TTL** | Allow actors to save records to state stores with Time To Live (TTL) set to automatically clean up old data. In its current implementation, actor state with TTL may not be reflected correctly by clients, read [Actor State Transactions]({{< ref actors_api.md >}}) for more information. | `ActorStateTTL` | [Actor State Transactions]({{< ref actors_api.md >}}) | v1.11 |
2524
| **Transactional Outbox** | Allows state operations for inserts and updates to be published to a configured pub/sub topic using a single transaction across the state store and the pub/sub | N/A | [Transactional Outbox Feature]({{< ref howto-outbox.md >}}) | v1.12 |
2625

27-
### Streaming for HTTP service invocation
28-
29-
Running Dapr with the `ServiceInvocationStreaming` feature flag enables partial support for handling data as a stream in HTTP service invocation. This can offer improvements in performance and memory utilization when using Dapr to invoke another service using HTTP with large request or response bodies.
30-
31-
The table below summarizes the current state of support for streaming in HTTP service invocation in Dapr, including the impact of enabling `ServiceInvocationStreaming`, in the example where "app A" is invoking "app B" using Dapr. There are six steps in the data flow, with various levels of support for handling data as a stream:
32-
33-
<img src="/images/service-invocation-simple.webp" width=600 alt="Diagram showing the steps of service invocation described in the table below" />
34-
35-
| Step | Handles data as a stream | Dapr 1.11 | Dapr 1.11 with<br/>`ServiceInvocationStreaming` |
36-
|:---:|---|:---:|:---:|
37-
| 1 | Request: "App A" to "Dapr sidecar A | <span role="img" aria-label="No">❌</span> | <span role="img" aria-label="No">❌</span> |
38-
| 2 | Request: "Dapr sidecar A" to "Dapr sidecar B | <span role="img" aria-label="No">❌</span> | <span role="img" aria-label="Yes">✅</span> |
39-
| 3 | Request: "Dapr sidecar B" to "App B" | <span role="img" aria-label="Yes">✅</span> | <span role="img" aria-label="Yes">✅</span> |
40-
| 4 | Response: "App B" to "Dapr sidecar B" | <span role="img" aria-label="Yes">✅</span> | <span role="img" aria-label="Yes">✅</span> |
41-
| 5 | Response: "Dapr sidecar B" to "Dapr sidecar A | <span role="img" aria-label="No">❌</span> | <span role="img" aria-label="Yes">✅</span> |
42-
| 6 | Response: "Dapr sidecar A" to "App A | <span role="img" aria-label="No">❌</span> | <span role="img" aria-label="No">❌</span> |
43-
44-
Important notes:
45-
46-
- `ServiceInvocationStreaming` needs to be applied on caller sidecars only.
47-
In the example above, streams are used for HTTP service invocation if `ServiceInvocationStreaming` is applied to the configuration of "app A" and its Dapr sidecar, regardless of whether the feature flag is enabled for "app B" and its sidecar.
48-
- When `ServiceInvocationStreaming` is enabled, you should make sure that all services your app invokes using Dapr ("app B") are updated to Dapr 1.10 or higher, even if `ServiceInvocationStreaming` is not enabled for those sidecars.
49-
Invoking an app using Dapr 1.9 or older is still possible, but those calls may fail unless you have applied a Dapr Resiliency policy with retries enabled.
50-
51-
> Full support for streaming for HTTP service invocation will be completed in a future Dapr version.

0 commit comments

Comments
 (0)