Skip to content

Model for frequent configuration dynamic updates #2566

Answered by Tratcher
vitorpmoreira asked this question in Q&A
Discussion options

You must be logged in to vote

Your understanding is sound. InMemoryProvider is a good place to start. You can fork and extend that with Add and Remove methods that update the internal state and signal to YARP that a change is available. Yes this state needs to be managed in a thread safe way, and it needs to provide YARP with a read-only copy each time. Note that you don't have to wait for the YARP update to finish, if another change comes through before the current one is finished it will still be picked up on the next pass. You can cut down on the churn by making those adds and removes batch operations (AddList, RemoveList).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MihaZupan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants