Replying to Avatar jb55

New features coming to #nostrdb soon:

1. Indexable cursor api

This will allow you to perform resumable and paginated queries in realtime. This will enable infinite scroll on arbitrary queries, you will also be able to index/seek into these queries at any point, which will be useful for building performant infinite timeline renderers: “render notes 5..8 in this cursor query”

These cursors will maintain a consistent view of the data within a transaction.

1. Arbitrary query filters

Query the database with an arbitrary filter function that filters results based on any logic you want. When you combine this with the cursor api, you can have infinitely scrollable queries with arbitrary complexity.

In the future, nostrscripts will also be able to be able to run inside of a query filter, enabling custom, scriptable, sharable, infinitely scrollable queries of any kind.

Avatar
jb55 1y ago

nostrdb has an ergonomic rust api if anyone wants to try it out! I still need to improve the docs though 😬

Reply to this note

Please Login to reply.

Discussion

Avatar
jack (n/acc) 1y ago

I'm going to give it a shot soon. I'm building a rust library that uses the actors pattern for connecting to database and relays.

Avatar
jack (n/acc) 1y ago

What's the most idiomatic way of using nostrdb? Call it on every frame render? Surely that would be better than copying the events to a different memory location.

Avatar
jack (n/acc) 1y ago

Repaint.

Thread collapsed
Thread collapsed
Thread collapsed