Batch nostr subscriptions / profile fetches (subscription grouping) #123
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp#123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the nostr-patterns review — future deeper dig (not urgent).
Observation
NDK groups subscriptions by filter fingerprint with a short delay (~10ms) to merge similar REQs into one (
subscription/grouping.ts); welshman batches loaders and tracks event→relay provenance. OurRelayHubopens one subscription persubscribe()call (no cross-caller merging), andProfileServicefetches one subscription per pubkey (getProfile) rather than batching via its existing bulk path.At our current scale this is fine (a handful of subs: feed, detail, likes, bookmarks;
useEventLikesalready batches coords). But as surfaces grow it's worth:ProfileService.getProfilecalls within a small window into oneauthors:[...]REQ (the bulk path already exists).RelayHub(à la NDK), and event→relay tracking (welshmanTracker) for provenance/failover.Scope
Future optimization / deeper dig — measure first. Not correctness.
Gap #3 of the nostr-patterns review; left as an issue per decision.