This repository contains a series of samples that highlight Dapr capabilities. The first sample demonstrates how we run Dapr in standalone mode, while the second highlights how we run the same application in Kubernetes. Each subsequent sample includes instructions for running both in standalone and in Kubernetes.
It is recommended to go through the samples via the Getting Started instructions.
Dapr is currently under community development with preview releases. The master branch includes breaking changes, therefore ensure that you're running the samples with the right version of Dapr runtime.
Dapr Sample Version | Dapr Runtime Version |
---|---|
v0.6.0 | v0.6.0 |
v0.5.0 | v0.5.0 |
v0.4.0 | v0.4.0 |
v0.3.0 | v0.3.0 |
v0.2.0 | v0.2.0 |
v0.1.0 | v0.1.0 |
Sample | Description |
---|---|
1. Hello-world | Demonstrates how to run Dapr locally. Highlights service invocation and state management. |
2. Hello-kubernetes | Demonstrates how to run Dapr in Kubernetes. Highlights service invocation and state management. |
3. Distributed-calculator | Demonstrates a distributed calculator application that uses Dapr services to power a React web app. Highlights polyglot (multi-language) programming, service invocation and state management. |
4. Pub-sub | Demonstrates how we use Dapr to enable pub-sub applications. Uses Redis as a pub-sub component. |
5. Bindings | Demonstrates how we use Dapr to create input and output bindings to other components. Uses bindings to Kafka. |
6. Functions-and-keda | Demonstrates use of Dapr pub/sub from Azure Functions, as well as composition with KEDA. |
7. Middleware | Demonstrates use of Dapr middleware to enable OAuth 2.0 authorization. |
8. Observability | Demonstrates Dapr tracing capabilities. Uses Zipkin as a tracing component. |
Find SDK-specific samples in the links below:
- .NET SDK
- Getting Started with .NET Actors - Tutorial for developing actor applications using the Dapr .NET SDK including actor samples
- Getting Started with ASP.NET Core - Samples for developing ASP.NET applications using the Dapr .NET SDK
- Java SDK
- Example for Java Actors - Example for developing an actor application using the Java SDK.
- Go SDK
- Javascript SDK
- Python SDK
To get started with the samples, clone this repository and follow instructions in each sample:
git clone https://github.com/dapr/samples.git