-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Owner: App/Chat Dev
Feature: Rate Limit Manager
FURPS:
-
F1. Rate limit the number of messages passed to the delivery service.
-
F2. The rate limit is set in a form of number of messages per epoch; same format as RLN Relay.
-
F3. Tracks current quota and usage.
-
F4. Messages can be flagged with three priorities level: critical, normal, optional.
-
F5. When remaining message quota is low, critical messages are sent, normal messages are queued and optional messages are dropped.
-
F6. When message quote is exhausted, critical messages are queued on top, normal messages are queued, optional messages are dropped.
-
U1. Developer can mark messages with relevant priority.
-
U2. Developer can pass messages by batch; with an all-or-none sending strategy.
-
U3. Developer can access total quota and remaining quota values.
-
U4. Message status is available to the developer (queued, dropped, passed to delivery service).
-
R1. Errors and status from the underlying delivery service are available to the developer.
-
R2. Queued messages are persisted across restart.
-
R3. Quota status is persisted across restart.
-
S1. Nim library.
-
+1. Nimble package manager is used to build.
Checklist:
- Specs: link to specs
- N/A (using FURPS as specs/docs)
- Code: link to GitHub issues/PRs/Epic
- Dogfood: link to dogfooding session/artefact
- N/A for now up until chat-sdk poc or mvp ready
- Docs: links to README.md or docs.waku.org (TBD)
Tasks
- feat: to use
token_bucketas rate limiter we need to expose the currenct budget and cap logos-messaging-nim#3497 <- copy/pasted a version with this to remove the blocker, tracking the swith in here - feat: rate limit (wip: no storage) nim-chat-sdk#3
- Feat/rate-limit-store-state nim-chat-sdk#5
- Feat/ratelimit store queue nim-chat-sdk#6
- Feat/expose data nim-chat-sdk#9