A #nostr thread in neo4j.

A #nostr thread in neo4j.

nostr:nprofile1qqsr7acdvhf6we9fch94qwhpy0nza36e3tgrtkpku25ppuu80f69kfqpz9mhxue69uhkummnw3ezuamfdejj7qghwaehxw309aex2mrp0yhxummnw3ezucnpdejz7qg4waehxw309aex2mrp0yhxgctdw4eju6t09ug4n6q3 you know how you were telling me it's almost impossible to find a note's position in a thread just by its event id?
It's trivial now.
What sorcery is this?
#neo4j, the most powerful and mature FOSS graph database available
This is me taking metadata out of Nostr events and putting them in neo4j in such a way that "e" tags are transformed into relationships between events. Eventually I'll index every type of reference I can and make it into a functioning relay.
So if you have any kind 1 event id, you can query event IDs of the entire thread in one shot. Even if you're 100 replies away from the root, so long as every event in between is known to the relay. And you can then do it across kinds, like from a single react, get every event in it's neighborhood.
"Reverse the nodes in a linked list - I mean conversation"
I've done a tiny but of neo4j so what's the practical application of this now?
Right now, none, because all I'm doing right now is creating the algorithm to map Nostr events out in neo4j.
In the future, it should lead to some interesting stuff.
It would be really cool if that vizualization was available somehow. Like if you type in the note id on a website and it would show you a graph like this
That would be so cool 💯🔥
As of right now, when I do this query, neo4j gives me a tangled ball of yarn that I have to manually arrange like this 😂
This graph reminds me of the database builder in sql, where you have all the tables and you like a field of table A to a field of table B to create a unique link
It's probably similar, but infinitely more performant, because there are no tables in neo4j.
No concept of tables, just “fields” and relations between them?
Yeah, actually you can think of the data model as having exactly the same information as what's in that screenshot, heavily optimized over time since they're on version 5 now.
There are three types of data: Node labels, which are akin to tables; properties, which are like columns; and Relationship types, which are like foreign key references, but bidirectional.
Interesting
Personalized WoT relays + neo4j ==> nostr knowledge graph
Development of personalized nostr knowledge graphs is where we’re headed
Alexandria has that.
God help neo4j if he tries to do this with nostr:nprofile1qy2hwumn8ghj7sn9wehjumn0wd68yvfwvdhk6qg0waehxw309ajjumn0wvhxcmmvqqsvlca5x9keq5e4km8q26aqas3skkr6xdpcr6ptlxsz5xz095rglrgrezsxa 's hellthreads.
I want a desktop client where this is the main UI.
Hopefully what I'm working on will make that possible, but it'll need more fields in the Nostr filter spec to enable graph queries like this.