Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show biggest followers on profile page #47

Open
gsovereignty opened this issue Jul 19, 2023 · 3 comments
Open

show biggest followers on profile page #47

gsovereignty opened this issue Jul 19, 2023 · 3 comments
Labels
new feature New feature

Comments

@gsovereignty
Copy link

REALLY love your work on this!

Just an idea:

When viewing someone's profile, it currently displays some of the accounts the person is following.

It would be really cool to also do the opposite - display some of the accounts that are following this profile. I guess the most interesting would just to show the top x accounts by number of followers.

@GBKS
Copy link
Owner

GBKS commented Jul 19, 2023

Thank you, and thanks for sharing the idea. I have an existing issue around showing followers in #15, but I've not worked on it yet, since I don't really know how to do this efficiently on the client. Showing who someone follows is easy, that is just a single event with a list of public keys. But for followers, you basically have to check everyone's follow lists to see if the user is in there. Not sure this can be done without introducing a back-end caching system (like the one Primal built), unless there are some options I am not aware of. I assume that Nosta will at some point really benefit from such a back-end. An interim option could be what Damus does, and only load this data on demand. The user has to click a button to request it.

@GBKS GBKS added the new feature New feature label Jul 19, 2023
@gsovereignty
Copy link
Author

gsovereignty commented Jul 20, 2023

I think I have a better idea than a backend (what kind of sick and twisted masochist wants to maintain a backend)

You could run an indexer and publish the results as replaceable events. Since you were going to trust a backend you may as well trust a pubkey instead. This is the approach I've been taking with Nostrocket because it means you don't need a publicly accessible IP and don't even really care that much about uptime because at least there's something approximately up-to-date always available.

What do you think? If you like the idea I can knock something up in Rust or Go over the weekend.

@GBKS
Copy link
Owner

GBKS commented Jul 20, 2023

I certainly do not want to maintain a back-end, so I appreciate ideas to avoid that. Also seems like it's worth seeing how far Nostr can be pushed to be fully client-side.

Can you talk me through this setup a bit? Would this indexer run all the time and continuously check relays, gather those lists and publish them on a dedicated relay? Or would the Nosta site send a DM to request indexing a profile, then the indexer kicks in, gathers the data and publishes it? The former approach would result in a huge amount (millions) of mostly unused events, and the latter would result in a delay because indexing would mostly be done on-the-fly (unless it's previously been requested). Or something else?

@GBKS GBKS mentioned this issue Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants