Skip to content

This repo contains Dapr applications to demonstrate the building block APIs and resiliency capabilities of Dapr.

License

Notifications You must be signed in to change notification settings

diagrid-labs/dapr-building-block-apis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dapr Building Block APIs and Resiliency

This repo contains Dapr applications to demonstrate several Dapr building block APIs and the built-in resiliency capabilities.

Running the CodeTours in this repo is recommended since this gives more context about:

  • The Dapr OSS project
  • Service Invocation API
  • State Management API
  • Pub/Sub API
  • Resiliency policies

Table of Contents

Prerequisites

Ensure you have these installed on your machine:

Clone the dapr-resiliency-and-durable-execution repo to your local machine.

Open the cloned repo in VSCode and accept the suggested VSCode extensions.

Running the CodeTours

Dapr Intro CodeTour

Using the CodeTour panel in the VSCode explorer, start the 1 - Dapr Intro CodeTour.

Service Invocation CodeTour

Using the CodeTour panel in the VSCode explorer, start the 2 - Service Invocation CodeTour.

State Management CodeTour

Using the CodeTour panel in the VSCode explorer, start the 3 - State Management CodeTour.

Service Invocation Demo CodeTour

Using the CodeTour panel in the VSCode explorer, start the 4 - Service Invocation Demo CodeTour. The BuildingBlockApisDemo consists of two applications, AppA and AppB, and a state store. Follow the instructions in the CodeTour to run the apps and use the Dapr Service Invocation API.

Service invocation

graph LR
    A{{AppA}}
    B{{AppB}}
    State[(KV Store)]
    A --HTTP--> B
    B --> State
Loading

Running the BuildingBlockApisDemo apps locally

  1. Navigate to the BuildingBlockApisDemo folder in the terminal:

    cd BuildingBlockApisDemo
  2. Run the BuildingBlockApisDemo apps using the Dapr CLI:

    dapr run -f .
  3. Open the local.http file in the VSCode editor and execute the HTTP requests to the BuildingBlockApisDemo apps.

Pub.Sub CodeTour

Using the CodeTour panel in the VSCode explorer, start the 5 - Pub/Sub CodeTour.

Pub.Sub Demo CodeTour

Pub/sub

graph LR
    A{{AppA}}
    B{{AppB}}
    MB[Message Broker]
    State[(KV Store)]
    A .-> MB .-> B
    B --> State
Loading

Using the CodeTour panel in the VSCode explorer, start the 6 - Pub/Sub Demo CodeTour and follow the instructions in the CodeTour to run the apps and use the Dapr Pub/Sub API.

Diagrid Conductor Free

Diagrid Conductor Free is a free tool developers can use to visualize, troubleshoot, and optimize Dapr workloads on Kubernetes. It includes an Advisor that provides recommendations on how to improve the reliability of your Dapr applications.

Conductor Advisor

Reliability details

Conductor Free also comes with two builders to generate Dapr component files and resiliency policies so you don't have to figure out the correct yaml schema yourself.

Conductor Component Builder

Conductor Resiliency Builder

Resources

About

This repo contains Dapr applications to demonstrate the building block APIs and resiliency capabilities of Dapr.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C# 94.1%
  • Shell 5.9%