Welcome to the GitHub repository for "Dapr Unleashed: Accelerating Microservice Development in .NET." This repository serves as a companion to my lecture at Sinergija23 (https://sinergija.live/en/2023) and is designed to demonstrate the practical benefits of integrating Dapr (Distributed Application Runtime) into a .NET microservices architecture. Here is the link to my lecture: https://sinergija.live/en/2023/lectures/370/rapid-development-with-dapr The slides from my lecture are here: https://www.slideshare.net/MiroslavJaneski/dapr-unleashed-accelerating-microservice-development
To run any of the both solutions you need the following Azure resources:
- Azure Service Bus Instance with Basic pricing tier
- In the Azure Service Bus Instance create two queues: "transform" and "extract".
- Azure CosmosDB Instance (Serverless Capacity mode)
- Create a Database with DatabaseId: "dapr-unleashed-cosmosdb-dev"
- Create a Container with partitionKey: /partitionKey and id: id
- Azure KeyVault Instance with Standard pricing tier
- In the Azure Key Vault add the following secrets:
- dapr-unleashed-sb-dev: Azure Service bus connection string
- dapr-unleashed-cosmosdb-dev: CosmosDB connection key
- In the Azure Key Vault add the following secrets:
- Create application instance and grant list secrect access in the Azure KeyVault instance
The repository is organized into two main branches:
-
develop
: Contains the .NET application without Dapr integration. This branch serves as a baseline to demonstrate typical microservice development scenarios. -
dapr
: Features the same .NET application, but enhanced with Dapr. This branch illustrates the advantages and improvements Dapr brings to microservice development, particularly in terms of reduction of source code, confiv over source code, and ease of development.
To get started with this demo:
-
Clone the repository: git clone https://github.com/janeski/dapr-unleashed.git
-
Navigate to the repository directory:
cd dapr-unleashed
To run the application without Dapr:
- Switch to the
develop
branch:
git checkout develop
- Add environment variable file in the root with the following values
DaprUnleashedKeyVault: https://XYZ.vault.azure.net/
AZURE_TENANT_ID: 00000000-0000-0000-0000-000000000000
AZURE_CLIENT_ID: 00000000-0000-0000-0000-000000000000
AZURE_CLIENT_SECRET: secret
To experience the application with Dapr integration:
-
Switch to the
dapr
branch: -
In the components folder add the following file: azurekeyvault.yaml based on the following link: https://docs.dapr.io/reference/components-reference/supported-secret-stores/azure-keyvault/
Contributions to improve the application or documentation are welcome. Please feel free to submit issues or pull requests.
This project is licensed under the MIT License - see the LICENSE
file for details.
For any questions or further information, please contact:
- Miroslav Janeski
- Email: miroslav.janeski[at]gmail.com
- Project Link: https://github.com/janeski/dapr-unleashed