Dapr Components and Requirements
Work in progress
Dapr allows us to switch the implementation of several parts of the gdcc through configuration. Not all available implementations have the same capabilities though so it's not a complete free-for-all.
Dapr Component Types
We have the following types of dapr components:
- Short Term State Storage : Used to store results for request, and as a fallback for messages that are too large for our queueing component
- Long Term State Storage : Used to store roadnet versions, and binary cache data, such as velocity profiles and circumstances
- Notifications : Used to send messages from one producer to be consumed by many consumers.
- Queue : Used to queue messages for the backend.
Each of these are described in detail in the sub pages of this section
Dapr Overview
We use dapr for the following:
- Messages to the backend:
- Queue - Topic: "
{roadNetId}-queue
". A pub/sub component configured for competing consumers. Requests for the backend is sent with the to the Queue-component shared between all apis and backends - Short Term State Storage - A storage component, where the body of messages that are too large will be stored. These will stay in storage until cleaned up by the implementation. We can't delete them automatically since that would require us to combine the acknowledgement of the message with the deletion in a transaction which is not supported by dapr (or most of the implementations we use)
- Queue - Topic: "
- Cancellations to the backend
- Notifications - Topic:
{roadNetId}-cancellation
. An id of a cancellation request. - Short Term State Storage - A list of requested cancellations. If a backend notices a cancellation it will delete it from the storage component
- Notifications - Topic:
- Results from the backend
- Notifications - Topic:
{roadNetId}-results
. Results from the backend are sent as a unique identifier to where it's - Short Term State Storage - The binary results of a request. The results will stay in storage until cleaned up by the implementation
- Notifications - Topic:
- Roadnet Version Info
- Long Term State Storage - Binary information about individual roadnet versions
- Roadnet Version Updates
- Notifications - Topic: "
roadNet-notifications
". Notifications that a roadnet has been updated
- Notifications - Topic: "
- Binary Cache: Ie. velocity profiles and circumstances