There’s also the question of do you need transactions. There is transactions for consistency, and there’s transactions to ensure correctness of the system state (like indexes) Many Nostr use cases actually do not need strict consistency. There is only some level of correctness required. CRDTs and conflict resolution fixes this. A notes app for example can be represented as a set of diffs on top of each other, and two updates to the same note can be merged. This is also why Dynamo and eventually consistent databases exist. You could also have slightly smarter relays that can do slightly smarter queries if you want.

Replies (3)

Nuh's avatar
Nuh 8 months ago
I am too familiar with CRDTs... they don't generalise and more importantly they are very hostile towards deletion and storage reclamation as each deletion has to forever take space, the best you can do is what the Willow project does (deleting entire folders with one tombstone)... Then of course migrating to other hosts or just backup becomes an optimistic operation where you can never know if you are done. Seriously the only downside of authenticated data structures is that you have to block concurrent writes to serialise them, and I think that is such a simple thing to ask I don't understand why resist it. Even Negentropy (Range Base set reconciliation) has now been proven to be trivial to do with any authenticated data structure with normal hash function (by the author of RBSR). So I am constantly struggling to understand why not accept the limitation we accept with LMDB, and we know in our bones that it is worth it.
Nuh's avatar
Nuh 8 months ago
I also want to note, whenever I am arguing about design decisions I don't talk about Nostr usecas, I talk about the general usecase of web 1.0 (excluding Web 2.0 with its aggregation and indexing, because i am skeptical we can fix that). So when someone smart says that the cloud is a shitcoin, my reaction is, hold on why go that far? Servers are cool, people like to know their data is safe? Why give up on these parts of the web usecases? Not everything is a broadcasting app, we need data integrity too.