So much I want to accomplish here. I've got an API for the data I'm collecting. Once I setup a key system for it any client that wants to bulk load aggregated data such as likes or reply counts is welcome to use it.
Discussion
I think this will make a big difference. Relays could then subscribe to this aggregation service for counts and then embed those counts into the events as they serve them as suggested by tmathews on github, and that way most clients wouldn't have to make additional queries.
That's the goal, at least unless/until Nostr incorporates some form of aggregation for this info. Besides, for things like Likes, querying one relay isn't enough since people write to different relay sets. I'm aggregating data from all the top relays (currently 27 of them) so the reaction counts and follower counts etc should be pretty accurate. Nostrum is running on a high end production web server tied to a high end production database server, so it can handle quite a bit of load.
Hmm. What would a client use those for?
For Likes and Replies, the way the Nostr protocol is designed now you have to pull down every record created for every note being displayed -- there's no aggregates stored. That's untenable once Nostr has millions of active users. Can you imagine the client having to retrieve tens of thousands of records every time it loaded a page of notes just to show the like/reply counts? Even if the protocol does develop a solution, querying a single relay will only give you the counts from that relay. I'm aggregating all the top relay data (27 atm) so the numbers are pretty accurate.
Understood. Thanks 🤙🏻