jb55's avatar
jb55
_@jb55.com
npub1xtsc...kk5s
I made damus, npubs, and zaps ⚡️ Independent bitcoin core and lightning dev. Owner of the oldest still running lightning node. 💍nostr:npub1l0gxx3qq9ex5lpurnfmqhfdrx27xfgj24sx6kqmk3r8a5cne63zspx78fx
jb55's avatar
jb55 2 years ago
I like when the reality of the protocol forces us to think about better ways to represent things like follow counts. Trying to copy centralized concepts is not going to work on a decentralized network. Luckily realizations like this will push us in a much better direction: measuring meaningful connections between individuals and displaying that instead. View quoted note →
jb55's avatar
jb55 2 years ago
the future of damus is a marketplace of turing complete, sandboxed edge algorithms powered by nostrdb. edge algorithms means no relay overhead. efficient, private, scalable, where new algorithms can be created, shared and sold without limits. I just figured out a solid plan on how to make this happen. I’ve started building it today. This may be bigger than zaps 💥
jb55's avatar
jb55 2 years ago
For example: once I add WoT scoring to nostrdb, nostrscript query filters will be able to do queries such as: {give me all the notes of kind 1 with wot > 5} the nostrscript is a simple wasm function: {wot_score(note.pubkey) > 5} Paired with a query: {“kinds”: [1]} which can be jit compiled and run alongside the nostr query. Possibilities are endless really. Maybe you could represent this as: {“kinds”: [1], “reducer”: “nscriptabcdef…”} View quoted note →
jb55's avatar
jb55 2 years ago
Pairing a nostr query with a nostrscript(wasm) filter makes a lot of sense: the nostrscript can be jit-compiled and cached, and the query plan is determined from the base nostr query so that the results can start returning instantly and efficiently. I think I just came up with a new kind of database powered by nostr 🤔 Arbitrary but fast sandboxed code execution to query a database sounds really cool, and it can be really fast, fast as strfry. What if instead of just filtering, we pass a reducer, so you could effectively do map-reduce over nostr data 🤔 this can be used for counting and grouping nostr notes in arbitrary ways, directly from a query, efficiently. Holy shit.
jb55's avatar
jb55 2 years ago
Imagine if I enabled these features on a relay. Pass nostrscripts to perform arbitrary queries on the database. nostr has created a monster: an insane database engineer with dangerous wasm knowledge View quoted note →
jb55's avatar
jb55 2 years ago
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.
↑