diff --git a/README.md b/README.md
index e99d95a2590..c8a4a8ada7b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# Dapr documentation
+[![GitHub License](https://img.shields.io/github/license/dapr/docs?style=flat&label=License&logo=github)](https://github.com/dapr/docs/blob/v1.13/LICENSE) [![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/docs?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/docs/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](http://bit.ly/dapr-discord) [![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev) [![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/daprdev?logo=x&style=flat)](https://twitter.com/daprdev)
+
If you are looking to explore the Dapr documentation, please go to the documentation website:
[**https://docs.dapr.io**](https://docs.dapr.io)
diff --git a/daprdocs/content/en/concepts/building-blocks-concept.md b/daprdocs/content/en/concepts/building-blocks-concept.md
index 1841dd58468..54fe118b473 100644
--- a/daprdocs/content/en/concepts/building-blocks-concept.md
+++ b/daprdocs/content/en/concepts/building-blocks-concept.md
@@ -21,12 +21,12 @@ Dapr provides the following building blocks:
| Building Block | Endpoint | Description |
|----------------|----------|-------------|
| [**Service-to-service invocation**]({{< ref "service-invocation-overview.md" >}}) | `/v1.0/invoke` | Service invocation enables applications to communicate with each other through well-known endpoints in the form of http or gRPC messages. Dapr provides an endpoint that acts as a combination of a reverse proxy with built-in service discovery, while leveraging built-in distributed tracing and error handling.
-| [**State management**]({{< ref "state-management-overview.md" >}}) | `/v1.0/state` | Application state is anything an application wants to preserve beyond a single session. Dapr provides a key/value-based state and query APIs with pluggable state stores for persistence.
| [**Publish and subscribe**]({{< ref "pubsub-overview.md" >}}) | `/v1.0/publish` `/v1.0/subscribe`| Pub/Sub is a loosely coupled messaging pattern where senders (or publishers) publish messages to a topic, to which subscribers subscribe. Dapr supports the pub/sub pattern between applications.
+| [**Workflows**]({{< ref "workflow-overview.md" >}}) | `/v1.0-beta1/workflow` | The Workflow API enables you to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components. The Workflow API can be combined with other Dapr API building blocks. For example, a workflow can call another service with service invocation or retrieve secrets, providing flexibility and portability.
+| [**State management**]({{< ref "state-management-overview.md" >}}) | `/v1.0/state` | Application state is anything an application wants to preserve beyond a single session. Dapr provides a key/value-based state and query APIs with pluggable state stores for persistence.
| [**Bindings**]({{< ref "bindings-overview.md" >}}) | `/v1.0/bindings` | A binding provides a bi-directional connection to an external cloud/on-premise service or system. Dapr allows you to invoke the external service through the Dapr binding API, and it allows your application to be triggered by events sent by the connected service.
| [**Actors**]({{< ref "actors-overview.md" >}}) | `/v1.0/actors` | An actor is an isolated, independent unit of compute and state with single-threaded execution. Dapr provides an actor implementation based on the virtual actor pattern which provides a single-threaded programming model and where actors are garbage collected when not in use.
| [**Secrets**]({{< ref "secrets-overview.md" >}}) | `/v1.0/secrets` | Dapr provides a secrets building block API and integrates with secret stores such as public cloud stores, local stores and Kubernetes to store the secrets. Services can call the secrets API to retrieve secrets, for example to get a connection string to a database.
| [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | `/v1.0/configuration` | The Configuration API enables you to retrieve and subscribe to application configuration items for supported configuration stores. This enables an application to retrieve specific configuration information, for example, at start up or when configuration changes are made in the store.
| [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | `/v1.0-alpha1/lock` | The distributed lock API enables you to take a lock on a resource so that multiple instances of an application can access the resource without conflicts and provide consistency guarantees.
-| [**Workflows**]({{< ref "workflow-overview.md" >}}) | `/v1.0-beta1/workflow` | The Workflow API enables you to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components. The Workflow API can be combined with other Dapr API building blocks. For example, a workflow can call another service with service invocation or retrieve secrets, providing flexibility and portability.
| [**Cryptography**]({{< ref "cryptography-overview.md" >}}) | `/v1.0-alpha1/crypto` | The Cryptography API enables you to perform cryptographic operations, such as encrypting and decrypting messages, without exposing keys to your application.
\ No newline at end of file
diff --git a/daprdocs/content/en/concepts/components-concept.md b/daprdocs/content/en/concepts/components-concept.md
index cb2f9e7ec51..d7a4f92ab5b 100644
--- a/daprdocs/content/en/concepts/components-concept.md
+++ b/daprdocs/content/en/concepts/components-concept.md
@@ -64,13 +64,6 @@ The component is unavailable for a short period of time during reload and reinit
The following are the component types provided by Dapr:
-### State stores
-
-State store components are data stores (databases, files, memory) that store key-value pairs as part of the [state management]({{< ref "state-management-overview.md" >}}) building block.
-
-- [List of state stores]({{< ref supported-state-stores >}})
-- [State store implementations](https://github.com/dapr/components-contrib/tree/master/state)
-
### Name resolution
Name resolution components are used with the [service invocation]({{< ref "service-invocation-overview.md" >}}) building block to integrate with the hosting environment and provide service-to-service discovery. For example, the Kubernetes name resolution component integrates with the Kubernetes DNS service, self-hosted uses mDNS and clusters of VMs can use the Consul name resolution component.
@@ -85,6 +78,20 @@ Pub/sub broker components are message brokers that can pass messages to/from ser
- [List of pub/sub brokers]({{< ref supported-pubsub >}})
- [Pub/sub broker implementations](https://github.com/dapr/components-contrib/tree/master/pubsub)
+### Workflows
+
+A [workflow]({{< ref workflow-overview.md >}}) is custom application logic that defines a reliable business process or data flow. Workflow components are workflow runtimes (or engines) that run the business logic written for that workflow and store their state into a state store.
+
+
+
+### State stores
+
+State store components are data stores (databases, files, memory) that store key-value pairs as part of the [state management]({{< ref "state-management-overview.md" >}}) building block.
+
+- [List of state stores]({{< ref supported-state-stores >}})
+- [State store implementations](https://github.com/dapr/components-contrib/tree/master/state)
+
### Bindings
External resources can connect to Dapr in order to trigger a method on an application or be called from an application as part of the [bindings]({{< ref bindings-overview.md >}}) building block.
@@ -113,13 +120,6 @@ Lock components are used as a distributed lock to provide mutually exclusive acc
- [List of supported locks]({{< ref supported-locks >}})
- [Lock implementations](https://github.com/dapr/components-contrib/tree/master/lock)
-### Workflows
-
-A [workflow]({{< ref workflow-overview.md >}}) is custom application logic that defines a reliable business process or data flow. Workflow components are workflow runtimes (or engines) that run the business logic written for that workflow and store their state into a state store.
-
-
-
### Cryptography
[Cryptography]({{< ref cryptography-overview.md >}}) components are used to perform crypographic operations, including encrypting and decrypting messages, without exposing keys to your application.
diff --git a/daprdocs/content/en/concepts/dapr-services/placement.md b/daprdocs/content/en/concepts/dapr-services/placement.md
index 7db47a37491..d94f9a8435d 100644
--- a/daprdocs/content/en/concepts/dapr-services/placement.md
+++ b/daprdocs/content/en/concepts/dapr-services/placement.md
@@ -2,25 +2,29 @@
type: docs
title: "Dapr Placement control plane service overview"
linkTitle: "Placement"
-description: "Overview of the Dapr placement service"
+description: "Overview of the Dapr Placement service"
---
-The Dapr Placement service is used to calculate and distribute distributed hash tables for the location of [Dapr actors]({{< ref actors >}}) running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}). This hash table maps actor IDs to pods or processes so a Dapr application can communicate with the actor.Anytime a Dapr application activates a Dapr actor, the placement updates the hash tables with the latest actor locations.
+The Dapr Placement service is used to calculate and distribute distributed hash tables for the location of [Dapr actors]({{< ref actors >}}) running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}). Grouped by namespace, the hash tables map actor types to pods or processes so a Dapr application can communicate with the actor. Anytime a Dapr application activates a Dapr actor, the Placement service updates the hash tables with the latest actor location.
## Self-hosted mode
-The placement service Docker container is started automatically as part of [`dapr init`]({{< ref self-hosted-with-docker.md >}}). It can also be run manually as a process if you are running in [slim-init mode]({{< ref self-hosted-no-docker.md >}}).
+The Placement service Docker container is started automatically as part of [`dapr init`]({{< ref self-hosted-with-docker.md >}}). It can also be run manually as a process if you are running in [slim-init mode]({{< ref self-hosted-no-docker.md >}}).
## Kubernetes mode
-The placement service is deployed as part of `dapr init -k`, or via the Dapr Helm charts. For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{< ref kubernetes >}}).
+The Placement service is deployed as part of `dapr init -k`, or via the Dapr Helm charts. For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{< ref kubernetes >}}).
## Placement tables
-There is an [HTTP API `/placement/state` for placement service]({{< ref placement_api.md >}}) that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. You need to set `DAPR_PLACEMENT_METADATA_ENABLED` environment or `metadata-enabled` command line args to true to enable it. If you are using helm you just need to set `dapr_placement.metadataEnabled` to true.
+There is an [HTTP API `/placement/state` for Placement service]({{< ref placement_api.md >}}) that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. You need to set `DAPR_PLACEMENT_METADATA_ENABLED` environment or `metadata-enabled` command line args to true to enable it. If you are using helm you just need to set `dapr_placement.metadataEnabled` to true.
+
+{{% alert title="Important" color="warning" %}}
+When deploying actors into different namespaces ({{< ref namespaced-actors.md >}}), it is recommended to disable the `metadata-enabled` if you want to prevent retrieving actors from all namespaces. The metadata endpoint is scoped to all namespaces.
+{{% /alert %}}
### Usecase:
-The placement table API can be used for retrieving the current placement table, which contains all the actors registered. This can be helpful for debugging and allows tools to extract and present information about actors.
+The placement table API can be used to retrieve the current placement table, which contains all the actors registered across all namespaces. This is helpful for debugging and allowing tools to extract and present information about actors.
### HTTP Request
@@ -61,26 +65,29 @@ updatedAt | timestamp | Timestamp of the actor registered/updated.
```json
{
- "hostList": [{
- "name": "198.18.0.1:49347",
- "appId": "actor1",
- "actorTypes": ["testActorType1", "testActorType3"],
- "updatedAt": 1690274322325260000
- },
- {
- "name": "198.18.0.2:49347",
- "appId": "actor2",
- "actorTypes": ["testActorType2"],
- "updatedAt": 1690274322325260000
- },
- {
- "name": "198.18.0.3:49347",
- "appId": "actor2",
- "actorTypes": ["testActorType2"],
- "updatedAt": 1690274322325260000
- }
- ],
- "tableVersion": 1
+ "hostList": [{
+ "name": "198.18.0.1:49347",
+ "namespace": "ns1",
+ "appId": "actor1",
+ "actorTypes": ["testActorType1", "testActorType3"],
+ "updatedAt": 1690274322325260000
+ },
+ {
+ "name": "198.18.0.2:49347",
+ "namespace": "ns2",
+ "appId": "actor2",
+ "actorTypes": ["testActorType2"],
+ "updatedAt": 1690274322325260000
+ },
+ {
+ "name": "198.18.0.3:49347",
+ "namespace": "ns2",
+ "appId": "actor2",
+ "actorTypes": ["testActorType2"],
+ "updatedAt": 1690274322325260000
+ }
+ ],
+ "tableVersion": 1
}
```
diff --git a/daprdocs/content/en/concepts/faq/_index.md b/daprdocs/content/en/concepts/faq/_index.md
new file mode 100644
index 00000000000..430eebd426d
--- /dev/null
+++ b/daprdocs/content/en/concepts/faq/_index.md
@@ -0,0 +1,7 @@
+---
+type: docs
+title: "Frequently asked questions and answers"
+linkTitle: "FAQs"
+weight: 1100
+description: "Learn more about Dapr concepts through frequently asked questions"
+---
diff --git a/daprdocs/content/en/concepts/faq.md b/daprdocs/content/en/concepts/faq/faq.md
similarity index 97%
rename from daprdocs/content/en/concepts/faq.md
rename to daprdocs/content/en/concepts/faq/faq.md
index 5e4bdf7361d..34d37823f40 100644
--- a/daprdocs/content/en/concepts/faq.md
+++ b/daprdocs/content/en/concepts/faq/faq.md
@@ -1,8 +1,8 @@
---
type: docs
-title: "Frequently asked questions and answers"
-linkTitle: "FAQs"
-weight: 1000
+title: "General Dapr questions and answers"
+linkTitle: "General questions"
+weight: 100
description: "Common questions asked about Dapr"
---
diff --git a/daprdocs/content/en/concepts/service-mesh.md b/daprdocs/content/en/concepts/faq/service-mesh.md
similarity index 99%
rename from daprdocs/content/en/concepts/service-mesh.md
rename to daprdocs/content/en/concepts/faq/service-mesh.md
index 0e3c4cf9ef3..272d16b811b 100644
--- a/daprdocs/content/en/concepts/service-mesh.md
+++ b/daprdocs/content/en/concepts/faq/service-mesh.md
@@ -2,7 +2,7 @@
type: docs
title: "Dapr and service meshes"
linkTitle: "Service meshes"
-weight: 900
+weight: 200
description: >
How Dapr compares to and works with service meshes
---
diff --git a/daprdocs/content/en/concepts/isolation-concept.md b/daprdocs/content/en/concepts/isolation-concept.md
new file mode 100644
index 00000000000..38c26084cdb
--- /dev/null
+++ b/daprdocs/content/en/concepts/isolation-concept.md
@@ -0,0 +1,45 @@
+---
+type: docs
+title: "Isolation"
+linkTitle: "Isolation"
+weight: 700
+description: How Dapr provides namespacing and isolation
+---
+
+Dapr namespacing provides isolation and multi-tenancy across many capabilities, giving greater security. Typically applications and components are deployed to namespaces to provide isolation in a given environment, such as Kubernetes.
+
+Dapr supports namespacing in service invocation calls between applications, when accessing components, sending pub/sub messages in consumer groups, and with actors type deployments as examples. Namespacing isolation is supported in both self-hosted and Kubernetes modes.
+
+To get started, create and configure your namespace.
+
+{{< tabs "Self-Hosted" "Kubernetes">}}
+
+{{% codetab %}}
+
+In self-hosted mode, specify the namespace for a Dapr instance by setting the `NAMESPACE` environment variable.
+
+{{% /codetab %}}
+
+{{% codetab %}}
+
+On Kubernetes, create and configure the namespace:
+
+```bash
+kubectl create namespace namespaceA
+kubectl config set-context --current --namespace=namespaceA
+```
+
+Then deploy your applications into this namespace.
+
+{{% /codetab %}}
+
+{{< /tabs >}}
+
+Learn how to use namespacing throughout Dapr:
+
+- [Service Invocation namespaces]({{< ref service-invocation-namespaces.md >}})
+- [How to: Set up pub/sub namespace consumer groups]({{< ref howto-namespace.md >}})
+- Components:
+ - [How to: Configure pub/sub components with multiple namespaces]({{< ref pubsub-namespaces.md >}})
+ - [Scope components to one or more applications]({{< ref component-scopes.md >}})
+- [Namespaced actors]({{< ref namespaced-actors.md >}})
\ No newline at end of file
diff --git a/daprdocs/content/en/concepts/overview.md b/daprdocs/content/en/concepts/overview.md
index 56624053722..bd5e01aa6a9 100644
--- a/daprdocs/content/en/concepts/overview.md
+++ b/daprdocs/content/en/concepts/overview.md
@@ -45,14 +45,14 @@ Each of these building block APIs is independent, meaning that you can use any n
| Building Block | Description |
|----------------|-------------|
| [**Service-to-service invocation**]({{< ref "service-invocation-overview.md" >}}) | Resilient service-to-service invocation enables method calls, including retries, on remote services, wherever they are located in the supported hosting environment.
-| [**State management**]({{< ref "state-management-overview.md" >}}) | With state management for storing and querying key/value pairs, long-running, highly available, stateful services can be easily written alongside stateless services in your application. The state store is pluggable and examples include AWS DynamoDB, Azure Cosmos DB, Azure SQL Server, GCP Firebase, PostgreSQL or Redis, among others.
| [**Publish and subscribe**]({{< ref "pubsub-overview.md" >}}) | Publishing events and subscribing to topics between services enables event-driven architectures to simplify horizontal scalability and make them resilient to failure. Dapr provides at-least-once message delivery guarantee, message TTL, consumer groups and other advance features.
+| [**Workflows**]({{< ref "workflow-overview.md" >}}) | The workflow API can be combined with other Dapr building blocks to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components.
+| [**State management**]({{< ref "state-management-overview.md" >}}) | With state management for storing and querying key/value pairs, long-running, highly available, stateful services can be easily written alongside stateless services in your application. The state store is pluggable and examples include AWS DynamoDB, Azure Cosmos DB, Azure SQL Server, GCP Firebase, PostgreSQL or Redis, among others.
| [**Resource bindings**]({{< ref "bindings-overview.md" >}}) | Resource bindings with triggers builds further on event-driven architectures for scale and resiliency by receiving and sending events to and from any external source such as databases, queues, file systems, etc.
| [**Actors**]({{< ref "actors-overview.md" >}}) | A pattern for stateful and stateless objects that makes concurrency simple, with method and state encapsulation. Dapr provides many capabilities in its actor runtime, including concurrency, state, and life-cycle management for actor activation/deactivation, and timers and reminders to wake up actors.
| [**Secrets**]({{< ref "secrets-overview.md" >}}) | The secrets management API integrates with public cloud and local secret stores to retrieve the secrets for use in application code.
| [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | The configuration API enables you to retrieve and subscribe to application configuration items from configuration stores.
| [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | The distributed lock API enables your application to acquire a lock for any resource that gives it exclusive access until either the lock is released by the application, or a lease timeout occurs.
-| [**Workflows**]({{< ref "workflow-overview.md" >}}) | The workflow API can be combined with other Dapr building blocks to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components.
| [**Cryptography**]({{< ref "cryptography-overview.md" >}}) | The cryptography API provides an abstraction layer on top of security infrastructure such as key vaults. It contains APIs that allow you to perform cryptographic operations, such as encrypting and decrypting messages, without exposing keys to your applications.
### Cross-cutting APIs
diff --git a/daprdocs/content/en/concepts/terminology.md b/daprdocs/content/en/concepts/terminology.md
index 80d5c89d7a2..c75af587b0c 100644
--- a/daprdocs/content/en/concepts/terminology.md
+++ b/daprdocs/content/en/concepts/terminology.md
@@ -2,7 +2,7 @@
type: docs
title: "Dapr terminology and definitions"
linkTitle: "Terminology"
-weight: 900
+weight: 1000
description: Definitions for common terms and acronyms in the Dapr documentation
---
@@ -17,6 +17,8 @@ This page details all of the common terms you may come across in the Dapr docs.
| Dapr | Distributed Application Runtime. | [Dapr overview]({{< ref overview.md >}})
| Dapr control plane | A collection of services that are part of a Dapr installation on a hosting platform such as a Kubernetes cluster. This allows Dapr-enabled applications to run on the platform and handles Dapr capabilities such as actor placement, Dapr sidecar injection, or certificate issuance/rollover. | [Self-hosted overview]({{< ref self-hosted-overview >}}) [Kubernetes overview]({{< ref kubernetes-overview >}})
| HTTPEndpoint | HTTPEndpoint is a Dapr resource use to identify non-Dapr endpoints to invoke via the service invocation API. | [Service invocation API]({{< ref service_invocation_api.md >}})
+| Namespacing | Namespacing in Dapr provides isolation, and thus provides multi-tenancy. | Learn more about namespacing [components]({{< ref component-scopes.md >}}), [service invocation]({{< ref service-invocation-namespaces.md >}}), [pub/sub]({{< ref pubsub-namespaces.md >}}), and [actors]({{< ref namespaced-actors.md >}})
| Self-hosted | Windows/macOS/Linux machine(s) where you can run your applications with Dapr. Dapr provides the capability to run on machines in "self-hosted" mode. | [Self-hosted mode]({{< ref self-hosted-overview.md >}})
| Service | A running application or binary. This can refer to your application or to a Dapr application.
| Sidecar | A program that runs alongside your application as a separate process or container. | [Sidecar pattern](https://docs.microsoft.com/azure/architecture/patterns/sidecar)
+
diff --git a/daprdocs/content/en/contributing/daprbot.md b/daprdocs/content/en/contributing/daprbot.md
index 14fb29373f0..2e35fd4914b 100644
--- a/daprdocs/content/en/contributing/daprbot.md
+++ b/daprdocs/content/en/contributing/daprbot.md
@@ -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`, `docs`, `quickstarts`, `cli`, `components-contrib`, `go-sdk`, `js-sdk`, `java-sdk`, `python-sdk`, `dotnet-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`, `rust-sdk` |
| `/ok-to-test` | Pull request | `dapr`: trigger end to end tests `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` |
diff --git a/daprdocs/content/en/contributing/presentations.md b/daprdocs/content/en/contributing/presentations.md
index f675510f20b..034cdc4a00b 100644
--- a/daprdocs/content/en/contributing/presentations.md
+++ b/daprdocs/content/en/contributing/presentations.md
@@ -13,7 +13,7 @@ We welcome community members giving presentations on Dapr and spreading the word
{{% alert color="primary" %}}
If you're using the PowerPoint template with MacOS, please install the Space Grotesk font to ensure the text is rendered properly:
```sh
-brew install --cask homebrew/cask-fonts/font-space-grotesk
+brew install --cask font-space-grotesk
```
{{% /alert %}}
diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md b/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md
index 8a56cf4847c..b831ab6ad2a 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md
@@ -2,7 +2,7 @@
type: docs
title: "Actors"
linkTitle: "Actors"
-weight: 50
+weight: 60
description: Encapsulate code and data in reusable actor objects as a common microservices design pattern
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md b/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md
index 4351b19cfbe..6153860e7da 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md
@@ -2,7 +2,7 @@
type: docs
title: "How-to: Enable and use actor reentrancy in Dapr"
linkTitle: "How-To: Actor reentrancy"
-weight: 70
+weight: 80
description: Learn more about actor reentrancy
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md
index 695d27033aa..bb96b9b2326 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md
@@ -52,8 +52,20 @@ You would use Dapr Workflow when you need to define and orchestrate complex work
[Learn more about Dapr Workflow and how to use workflows in your application.]({{< ref workflow-overview.md >}})
+## Actor types and actor IDs
+
+Actors are uniquely defined as an instance of an actor type, similar to how an object is an instance of a class. For example, you might have an actor type that implements the functionality of a calculator. There could be many actors of that type distributed across various nodes in a cluster.
+
+Each actor is uniquely identified by an actor ID. An actor ID can be _any_ string value you choose. If you do not provide an actor ID, Dapr generates a random string for you as an ID.
+
## Features
+### Namespaced actors
+
+Dapr supports namespaced actors. An actor type can be deployed into different namespaces. You can call instances of these actors in the same namespace.
+
+[Learn more about namespaced actors and how they work.]({{< ref namespaced-actors.md >}})
+
### Actor lifetime
Since Dapr actors are virtual, they do not need to be explicitly created or destroyed. The Dapr actor runtime:
diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md
index f6131475e96..7a4cd1ec74c 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md
@@ -2,7 +2,7 @@
type: docs
title: "Actors timers and reminders"
linkTitle: "Timers and reminders"
-weight: 40
+weight: 50
description: "Setting timers and reminders and performing error handling for your actors"
aliases:
- "/developing-applications/building-blocks/actors/actors-background"
diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md
index 0d4017096e9..79c7303aba1 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md
@@ -2,7 +2,7 @@
type: docs
title: "How to: Enable partitioning of actor reminders"
linkTitle: "How to: Partition reminders"
-weight: 50
+weight: 60
description: "Enable actor reminders partitioning for your application"
aliases:
- "/developing-applications/building-blocks/actors/actors-background"
diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md
index 16c7bbf4383..e0902e12c1b 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md
@@ -2,7 +2,7 @@
type: docs
title: "How-to: Interact with virtual actors using scripting"
linkTitle: "How-To: Interact with virtual actors"
-weight: 60
+weight: 70
description: Invoke the actor method for state management
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/namespaced-actors.md b/daprdocs/content/en/developing-applications/building-blocks/actors/namespaced-actors.md
new file mode 100644
index 00000000000..5954b61a1bf
--- /dev/null
+++ b/daprdocs/content/en/developing-applications/building-blocks/actors/namespaced-actors.md
@@ -0,0 +1,124 @@
+---
+type: docs
+title: "Namespaced actors"
+linkTitle: "Namespaced actors"
+weight: 40
+description: "Learn about namespaced actors"
+---
+
+
+Namespacing in Dapr provides isolation, and thus multi-tenancy. With actor namespacing, the same actor type can be deployed into different namespaces. You can call instances of these actors in the same namespace.
+
+{{% alert title="Note" color="primary" %}}
+Each namespaced actor deployment must use its own separate state store, especially if the same actor type is used across namespaces. In other words, no namespace information is written as part of the actor record, and hence separate state stores are required for each namespace. See [Configuring actor state stores for namespacing]({{< ref "#configuring-actor-state-stores-for-namespacing" >}}) section for examples.
+{{% /alert %}}
+
+## Creating and configuring namespaces
+
+You can use namespaces either in self-hosted mode or on Kubernetes.
+
+{{< tabs "Self-Hosted" "Kubernetes">}}
+
+{{% codetab %}}
+In self-hosted mode, you can specify the namespace for a Dapr instance by setting [the `NAMESPACE` environment variable]({{< ref environment.md >}}).
+
+{{% /codetab %}}
+
+{{% codetab %}}
+On Kubernetes, you can create and configure namepaces when deploying actor applications. For example, start with the following `kubectl` commands:
+
+```bash
+kubectl create namespace namespace-actorA
+kubectl config set-context --current --namespace=namespace-actorA
+```
+
+Then, deploy your actor applications into this namespace (in the example, `namespace-actorA`).
+
+{{% /codetab %}}
+
+{{< /tabs >}}
+
+## Configuring actor state stores for namespacing
+
+Each namespaced actor deployment **must** use its own separate state store. While you could use different physical databases for each actor namespace, some state store components provide a way to logically separate data by table, prefix, collection, and more. This allows you to use the same physical database for multiple namespaces, as long as you provide the logical separation in the Dapr component definition.
+
+Some examples are provided below.
+
+### Example 1: By a prefix in etcd
+
+```yaml
+apiVersion: dapr.io/v1alpha1
+kind: Component
+metadata:
+ name: statestore
+spec:
+ type: state.etcd
+ version: v2
+ metadata:
+ - name: endpoints
+ value: localhost:2379
+ - name: keyPrefixPath
+ value: namespace-actorA
+ - name: actorStateStore
+ value: "true"
+```
+
+### Example 2: By table name in SQLite
+
+```yaml
+apiVersion: dapr.io/v1alpha1
+kind: Component
+metadata:
+ name: statestore
+spec:
+ type: state.sqlite
+ version: v1
+ metadata:
+ - name: connectionString
+ value: "data.db"
+ - name: tableName
+ value: "namespace-actorA"
+ - name: actorStateStore
+ value: "true"
+```
+
+### Example 3: By logical database number in Redis
+
+```yaml
+apiVersion: dapr.io/v1alpha1
+kind: Component
+metadata:
+ name: statestore
+spec:
+ type: state.redis
+ version: v1
+ metadata:
+ - name: redisHost
+ value: localhost:6379
+ - name: redisPassword
+ value: ""
+ - name: actorStateStore
+ value: "true"
+ - name: redisDB
+ value: "1"
+ - name: redisPassword
+ secretKeyRef:
+ name: redis-secret
+ key: redis-password
+ - name: actorStateStore
+ value: "true"
+ - name: redisDB
+ value: "1"
+auth:
+ secretStore:
+```
+
+Check your [state store component specs]({{< ref supported-state-stores.md >}}) to see what it provides.
+
+{{% alert title="Note" color="primary" %}}
+Namespaced actors use the multi-tenant Placement service. With this control plane service where each application deployment has its own namespace, sidecars belonging to an application in namespace "ActorA" won't receive placement information for an application in namespace "ActorB".
+{{% /alert %}}
+
+## Next steps
+- [Learn more about the Dapr Placement service]({{< ref placement.md >}})
+- [Placement API reference guide]({{< ref placement_api.md >}})
\ No newline at end of file
diff --git a/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md b/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md
index d15682d7bd4..7281020f2a5 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md
@@ -2,7 +2,7 @@
type: docs
title: "Bindings"
linkTitle: "Bindings"
-weight: 40
+weight: 50
description: Interface with or be triggered from external systems
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md b/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md
index 664e94b6aee..c5bd4cac1fb 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md
@@ -2,7 +2,7 @@
type: docs
title: "Cryptography"
linkTitle: "Cryptography"
-weight: 110
+weight: 100
description: "Perform cryptographic operations without exposing keys to your application"
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md
index df3fb8b7a08..e3af831aa8b 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md
@@ -2,7 +2,7 @@
type: docs
title: "Publish & subscribe messaging"
linkTitle: "Publish & subscribe"
-weight: 30
+weight: 20
description: Secure, scalable messaging between services
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md
index 0db19095e99..d97c51b5eb7 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md
@@ -40,7 +40,7 @@ scopes:
In the programmatic approach, the `routes` structure is returned instead of `route`. The JSON structure matches the declarative YAML:
-{{< tabs Python Node "C#" Go PHP>}}
+{{< tabs Python JavaScript ".NET" Go PHP>}}
{{% codetab %}}
```python
diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md
index 30072424738..8c718a37090 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md
@@ -69,17 +69,17 @@ The table below shows which applications are allowed to publish into the topics:
| | topic1 | topic2 | topic3 |
|------|--------|--------|--------|
-| app1 | X | | |
-| app2 | | X | X |
+| app1 | ✅ | | |
+| app2 | | ✅ | ✅ |
| app3 | | | |
The table below shows which applications are allowed to subscribe to the topics:
| | topic1 | topic2 | topic3 |
|------|--------|--------|--------|
-| app1 | X | X | X |
+| app1 | ✅ | ✅ | ✅ |
| app2 | | | |
-| app3 | X | | |
+| app3 | ✅ | | |
> Note: If an application is not listed (e.g. app1 in subscriptionScopes) it is allowed to subscribe to all topics. Because `allowedTopics` is not used and app1 does not have any subscription scopes, it can also use additional topics not listed above.
@@ -143,17 +143,17 @@ The table below shows which application is allowed to publish into the topics:
| | A | B | C |
|------|---|---|---|
-| app1 | X | | |
-| app2 | X | X | |
-| app3 | X | X | |
+| app1 | ✅ | | |
+| app2 | ✅ | ✅ | |
+| app3 | ✅ | ✅ | |
The table below shows which application is allowed to subscribe to the topics:
| | A | B | C |
|------|---|---|---|
| app1 | | | |
-| app2 | X | | |
-| app3 | X | X | |
+| app2 | ✅ | | |
+| app3 | ✅ | ✅ | |
## Example 4: Mark topics as protected
@@ -187,17 +187,17 @@ The table below shows which application is allowed to publish into the topics:
| | A | B | C |
|------|---|---|---|
-| app1 | X | X | |
-| app2 | | X | |
-| app3 | | | X |
+| app1 | ✅ | ✅ | |
+| app2 | | ✅ | |
+| app3 | | | ✅ |
The table below shows which application is allowed to subscribe to the topics:
| | A | B | C |
|------|---|---|---|
-| app1 | X | X | |
-| app2 | | X | |
-| app3 | | | X |
+| app1 | ✅ | ✅ | |
+| app2 | | ✅ | |
+| app3 | | | ✅ |
## Demo
diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md
index ec48330e35c..28c3cb8f1ec 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md
@@ -70,7 +70,7 @@ There are two ways to invoke a non-Dapr endpoint when communicating either to Da
```
### Using appId when calling Dapr enabled applications
-AppIDs are always used to call Dapr applications with the `appID` and `my-method``. Read the [How-To: Invoke services using HTTP]({{< ref howto-invoke-discover-services.md >}}) guide for more information. For example:
+AppIDs are always used to call Dapr applications with the `appID` and `my-method`. Read the [How-To: Invoke services using HTTP]({{< ref howto-invoke-discover-services.md >}}) guide for more information. For example:
```sh
localhost:3500/v1.0/invoke//method/
diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md
index 5b4a0ecb98a..7966f4c3295 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md
@@ -2,7 +2,7 @@
type: docs
title: "State management"
linkTitle: "State management"
-weight: 20
+weight: 40
description: Create long running stateful services
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md
index fad6afbfdac..fd492d188b6 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md
@@ -537,7 +537,7 @@ Try getting state again. Note that no value is returned.
Below are code examples that leverage Dapr SDKs for saving and retrieving multiple states.
-{{< tabs Dotnet Java Python Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
+{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
{{% codetab %}}
@@ -656,6 +656,56 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g
{{% codetab %}}
+```go
+// dependencies
+import (
+ "context"
+ "log"
+ "math/rand"
+ "strconv"
+ "time"
+
+ dapr "github.com/dapr/go-sdk/client"
+)
+
+// code
+func main() {
+ const STATE_STORE_NAME = "statestore"
+ rand.Seed(time.Now().UnixMicro())
+ for i := 0; i < 10; i++ {
+ orderId := rand.Intn(1000-1) + 1
+ client, err := dapr.NewClient()
+ if err != nil {
+ panic(err)
+ }
+ defer client.Close()
+ ctx := context.Background()
+ err = client.SaveState(ctx, STATE_STORE_NAME, "order_1", []byte(strconv.Itoa(orderId)), nil)
+ if err != nil {
+ panic(err)
+ }
+ keys := []string{"key1", "key2", "key3"}
+ items, err := client.GetBulkState(ctx, STATE_STORE_NAME, keys, nil, 100)
+ if err != nil {
+ panic(err)
+ }
+ for _, item := range items {
+ log.Println("Item from GetBulkState:", string(item.Value))
+ }
+ }
+}
+```
+
+To launch a Dapr sidecar for the above example application, run a command similar to the following:
+
+```bash
+dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 go run OrderProcessingService.go
+```
+
+{{% /codetab %}}
+
+{{% codetab %}}
+
```javascript
//dependencies
import { DaprClient, HttpMethod, CommunicationProtocolEnum } from '@dapr/dapr';
@@ -738,7 +788,7 @@ State transactions require a state store that supports multi-item transactions.
Below are code examples that leverage Dapr SDKs for performing state transactions.
-{{< tabs Dotnet Java Python Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
+{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}}
{{% codetab %}}
@@ -893,6 +943,79 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g
{{% codetab %}}
+```go
+// dependencies
+package main
+
+import (
+ "context"
+ "log"
+ "math/rand"
+ "strconv"
+ "time"
+
+ dapr "github.com/dapr/go-sdk/client"
+)
+
+// code
+func main() {
+ const STATE_STORE_NAME = "statestore"
+ rand.Seed(time.Now().UnixMicro())
+ for i := 0; i < 10; i++ {
+ orderId := rand.Intn(1000-1) + 1
+ client, err := dapr.NewClient()
+ if err != nil {
+ panic(err)
+ }
+ defer client.Close()
+ ctx := context.Background()
+ err = client.SaveState(ctx, STATE_STORE_NAME, "order_1", []byte(strconv.Itoa(orderId)), nil)
+ if err != nil {
+ panic(err)
+ }
+ result, err := client.GetState(ctx, STATE_STORE_NAME, "order_1", nil)
+ if err != nil {
+ panic(err)
+ }
+
+ ops := make([]*dapr.StateOperation, 0)
+ data1 := "data1"
+ data2 := "data2"
+
+ op1 := &dapr.StateOperation{
+ Type: dapr.StateOperationTypeUpsert,
+ Item: &dapr.SetStateItem{
+ Key: "key1",
+ Value: []byte(data1),
+ },
+ }
+ op2 := &dapr.StateOperation{
+ Type: dapr.StateOperationTypeDelete,
+ Item: &dapr.SetStateItem{
+ Key: "key2",
+ Value: []byte(data2),
+ },
+ }
+ ops = append(ops, op1, op2)
+ meta := map[string]string{}
+ err = client.ExecuteStateTransaction(ctx, STATE_STORE_NAME, meta, ops)
+
+ log.Println("Result after get:", string(result.Value))
+ time.Sleep(2 * time.Second)
+ }
+}
+```
+
+To launch a Dapr sidecar for the above example application, run a command similar to the following:
+
+```bash
+dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 go run OrderProcessingService.go
+```
+
+{{% /codetab %}}
+
+{{% codetab %}}
+
```javascript
//dependencies
import { DaprClient, HttpMethod, CommunicationProtocolEnum } from '@dapr/dapr';
diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md
index 2831802729a..59dcf3c3711 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md
@@ -28,8 +28,10 @@ The diagram below is an overview of how the outbox feature works:
The outbox feature can be used with using any [transactional state store]({{< ref supported-state-stores >}}) supported by Dapr. All [pub/sub brokers]({{< ref supported-pubsub >}}) are supported with the outbox feature.
+[Learn more about the transactional methods you can use.]({{< ref "howto-get-save-state.md#perform-state-transactions" >}})
+
{{% alert title="Note" color="primary" %}}
-Message brokers that work with the competing consumer pattern (for example, [Apache Kafka]({{< ref setup-apache-kafka>}}) are encouraged to reduce the chances of duplicate events.
+Message brokers that work with the competing consumer pattern (for example, [Apache Kafka]({{< ref setup-apache-kafka>}})) are encouraged to reduce the chances of duplicate events.
{{% /alert %}}
## Usage
diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md
index a1b87a20ac3..dbd73ca7900 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md
@@ -2,7 +2,7 @@
type: docs
title: "Workflow"
linkTitle: "Workflow"
-weight: 100
+weight: 30
description: "Orchestrate logic across various microservices"
---
diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md
index f7865f55e9c..fe6f69b63c2 100644
--- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md
+++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md
@@ -586,7 +586,45 @@ The key takeaways from this example are:
- The number of parallel tasks can be static or dynamic
- The workflow itself is capable of aggregating the results of parallel executions
-While not shown in the example, it's possible to go further and limit the degree of concurrency using simple, language-specific constructs. Furthermore, the execution of the workflow is durable. If a workflow starts 100 parallel task executions and only 40 complete before the process crashes, the workflow restarts itself automatically and only schedules the remaining 60 tasks.
+Furthermore, the execution of the workflow is durable. If a workflow starts 100 parallel task executions and only 40 complete before the process crashes, the workflow restarts itself automatically and only schedules the remaining 60 tasks.
+
+It's possible to go further and limit the degree of concurrency using simple, language-specific constructs. The sample code below illustrates how to restrict the degree of fan-out to just 5 concurrent activity executions:
+
+{{< tabs ".NET" >}}
+
+{{% codetab %}}
+
+```csharp
+
+//Revisiting the earlier example...
+// Get a list of N work items to process in parallel.
+object[] workBatch = await context.CallActivityAsync