-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: updated priority to queue * feat: implemented priority config * feat: added priority module * chore: adjusted lint * feat: implemented priority quote * feat: implemented storage query to be used in priority module * test: implemented priority test * chore: removed dbg * chore: added validation when the state is empty * docs: added priority docs * chore: updated config structure * docs: updated docs
- Loading branch information
1 parent
99003bf
commit 67ea5ae
Showing
16 changed files
with
503 additions
and
141 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
.sqlx/query-14b8d5134a71bb1356f39c05e79e7dfb2bfab983cb5eef976d9ea602f0626f0a.json
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
.sqlx/query-2b7b0806f87d806393d7d3c24ffdef07ce8ecb05cbfb32d88536aaad72dac3ec.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Priority Queues | ||
sidebarTitle: Priority Queues | ||
--- | ||
|
||
## Priority Queues | ||
|
||
With the Priority module, Boros allows users to configure queues to prioritise transactions. Each queue has a weight that Boros uses to calculate how many slots of the quota a queue can use. For transactions where there's no queue, a default queue is set. When a queue is removed from the file and Boros still has transactions pending for the queue removed, Boros uses the default queue weight to process unknown queues. | ||
|
||
Follow the [configuration](../configuration) to configure the priority queues. | ||
|
||
### Example | ||
The quota is 10, so the fanout stage has a backpressure of 10, meaning only 10 transactions can be waiting for propagation. The quota is released when transactions are sent, allowing new transactions to wait. Furthermore, two queues are configured: Queue A with a weight of 3 and Queue B with a weight of 2. Queue A has higher priority than Queue B, so Queue A receives 6 slots and Queue B receives 4 slots from the quota. | ||
|
||
### Default | ||
Priority configurations are not required. If not configured, the default queue is used. The default queue has a weight of 1 but can be replaced by setting a configuration with the name default. Transactions with unknown queues are processed using the default weight. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.