|
|
||
|---|---|---|
| .. | ||
| README.md | ||
README.md
Dapr use cases
This document briefly describes scenarios that Dapr enables for your microservices. Each use case is accompanied with a link to learn more details.
Pub/Sub
Dapr provides an API that enables event-driven architectures in your system. Each microservice can utilize the same API to leverage one of many supported event buses. Microservices can communicate each other by sending or subscribing to events on specific topics. By leveraging this communication style, your microservices remain flexible and loosely coupled.
Visit the following documents to learn more:
Actors
Dapr provides an API and runtime that allows you to write your business logic as an isolated unit, without worrying about concurrency or other actors. Dapr calls this single isolated unit an "actor". Your running actors can send a message to another actor or can request to create a new actor. In the former case, Dapr manages routing the message to the proper destination. In the latter case, Dapr manages all the state management, synchronization, and concurrency involved with starting the new actor.
The actor model is a battle-tested programming pattern and as such, comes with very specific use cases:
- You have a large system composed of many (thousands or more) small microservices, in which the code to manage these microservices (e.g. distribution across nodes, failover, ...) is very complex
- Your microservice(s) do not need concurrent access to state and can instead can share state by communicating
- Your code does operations that have unpredictable latency, such as I/O operations to external web services
Visit the following documents to learn more:
- More details on actors
- Getting started with actors on the .Net platform
- Getting started with actors with the Java SDK
Mutual TLS
Dapr enables code-free end-to-end encryption in communication between microservices, called mutual TLS (mTLS). In short, mTLS is a commonly-used security mechanism that provides the following features:
- Two way authentication - the client proving its identify to the server, and vice-versa
- An encrypted channel for all in-flight communication, after two-way authentication is established
Mutual TLS is useful in almost all scenarios, but especially so for systems subject to regulations such as HIPAA and PCI.
Visit the following documents to learn more: