OK i see. So this index is just a running list of available feeds and their locations?

Rather than serving the full list, can't that be pushed to apps adhoc? So if I'm on a pc2 app, I want to look up Ford pinto podcast, i query that term. The app then goes to the relays its connected to and searches for that keyword and returns results adhoc. No need to serve the entire list and no need for a single index as long as the app is connected to the relays. Maybe you just need an index of relay addresses which would cost basically nothing.

Reply to this note

Please Login to reply.

Discussion

Yep, that's all an Index is doing.

And yes, it could search relays instead of the index server. It needs to know which relays to search. It's not highly efficient. I search across 100 relays, I may get 100 results back, and I have to parse through all those results, combine them, and remove any duplicates. It's all doable, but it introduces another set of problems.

Duplicates would be easy to remove as the notes would be digitally signed and can be uniquely identified. Idk how it happens behind the scenes but I'm sure amethyst and damas and all other existing client apps do this

They do, and it's inefficient and wasteful. If you want to see a note, you ask for it from 20 servers. Those 20 servers will send you all the same note. The bandwidth on 19 of them was wasted. Bandwidth adds up to real money. That's just a side effect of how nostr works. Maybe the payoff is worth it, but I think it should at least be understood as one of the tradeoffs, and perhaps there's a solution to it worth exploring.

I wonder if the relays can be tiered? So perhaps... client connects to just 3 main relays. Each of those 3 relays basically sort and filter from 10 each. Yes there is still duplication but less in total from a per-relay point of view.

I've been playing around with building a nostr client so I can understand nostr better, and when I'm searching for a particular note, I do a serial search in which I search the first relay, and if it returns the note, I stop the search, otherwise search the next relay, so there are ways around it to one degree or another. That's the 'fun' part of being an engineer of sorts is seeing problems, thinking of solutions, then seeing the problems those solutions created and seeing which of those you can 'fix'.

I've also thought about that, a smart relay that connects to other relays and dedupes the data before sending it to the client. At that point though, it starts to move away from dumb relays, so may be moving away from one of the core ideas of nostr.

The way it's sort of framed in my head is this....

Back in the brick and mortar days you had individual record stores. Some were general music, others were specialized. I had to jump in my car and visit these stores. I certainly couldn't find the entire library of all music in a single store, but if I visited every record store in the cou try, I probably could get close.

The record stores are the relays hosting feeds. My car is whatever client app I'm using, connecting me to various stores/relays.

It's not the most efficient nor does it provide a whole picture. But as a user, I can only listen to one song at a time. I don't want access to everything all at once. I want to find specific songs or shows upon demand, or else sort and shuffle by genre. I think this enables it without providing more than what's realistically necessary from a end user standpoint.