Why Nostr? What is Njump?
2024-12-22 13:10:04
in reply to

fiatjaf on Nostr: These are the indexes: (all the indexes have the created_at timestamp as a suffix). ...

These are the indexes: https://github.com/hoytech/strfry/blob/master/golpe.yaml#L24-L47 (all the indexes have the created_at timestamp as a suffix). Now the query part I don't understand exactly how it works on strfry when you are querying for multiple different things.

I've used a similar scheme for the indexes here: https://github.com/fiatjaf/eventstore/blob/98cbffec7cc64773633c392de351586402418b7b/lmdb/helpers.go#L55-L139. But my query code is so complicated I don't even understand it myself anymore: https://github.com/fiatjaf/eventstore/blob/98cbffec7cc64773633c392de351586402418b7b/lmdb/query.go (it was simpler before, but complained I was using a bunch of goroutines unnecessarily so I did this and the performance has improved a lot).

But since you're starting from scratch and you're not afraid of including C dependencies on your Haskell app, I recommend trying to embed 's https://github.com/damus-io/nostrdb as it's made for this and more optimized for clients rather than relays.
Author Public Key
npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6