jb55 on Nostr: Hey guys, I've been quiet lately... I've been working on something big. In the past 2 ...
Hey guys,
I’ve been quiet lately… I’ve been working on something big. In the past 2 weeks there have been 9539 new lines of code added to damus, 2928 removed, 279 files changed. I’ve rewritten much of the codebase in preparation for the nostrdb integration.
nostrdb
What is nostrdb? nostrdb is an integrated relay within damus, with the same design as strfry, but slightly different to support embedding into nostr apps. This will be the heart of Damus apps going forward, including notedeck and other future microapps. Think of it as a kind of development kit but with an embedded database and query capabilities. I didn’t want to have to recreate all of the same querying, caching, and parsing code when building new apps, nostrdb will solve all of the painful and slow parts. nostr seems simple but if you want a fully working app it is pretty complicated, especially if you want it to be fast and sync efficiently.
Goals
- be the best and most efficient at querying, syncing and storing nostr notes
- enable direct mapping of notes into application code without any serialization overhead
- provide advanced syncing capabilities such as negentropy, which allows us to only query stuff we don’t have
- be as portable as possible. nostrdb is a C library that you can embed into basically anything.
- full relay filter support
- full text search
Benefits
- full note verification
- more efficient de-duplication before we begin processing events off the wire
- set-reconciliation based syncing (negentropy) drastically reduces bandwidth usage and latency
- iteration on future nostr apps will be quicker (android, desktop, etc)
- features like ghost mode, account switching, etc will be much more efficient as you will be able to quickly switch between notes that are cached locally
- much smaller memory footprint due to optimized in-memory note format, which in turn improves cpu-cache efficiency
- much better profile and note searching
So that’s what I’ve been working on in the past two weeks. On to what else is new in this release:
Multi reactions!
Suhail did an amazing job at adding multiple reaction support. All you need to do is long-press the Shaka button to show different options. You can customize these in settings as well
New onboarding features
Damus will now suggest people to follow when you first enter the app, this is the first of many onboarding improvements coming soon. Thank Klabo for this one!
That’s all for now! Please test thoroughly and let me know if you run into any issues. You likely will since the entire codebase has been changed, and I probably broke something.
Until next time 🫡
Published at
2023-08-03 21:05:05Event JSON
{
"id": "09f62c7fae6d2c64507b8ab4c6efec00ae175a24ea91527835aaf59d68ae668c",
"pubkey": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
"created_at": 1691096705,
"kind": 30023,
"tags": [
[
"d",
"1691094709016"
],
[
"title",
"Damus 1.6 (8) - Multi reactions, nostrdb, and more!"
],
[
"summary",
"It has been two weeks... what have we been working on!?"
],
[
"published_at",
"1691096705"
],
[
"t",
"damus"
]
],
"content": "Hey guys,\n\nI've been quiet lately... I've been working on something big. In the past 2 weeks there have been 9539 new lines of code added to damus, 2928 removed, 279 files changed. I've rewritten much of the codebase in preparation for the nostrdb integration.\n\n## nostrdb\n\nWhat is nostrdb? nostrdb is an integrated relay within damus, with the same design as strfry, but slightly different to support embedding into nostr apps. This will be the heart of Damus apps going forward, including notedeck and other future microapps. Think of it as a kind of development kit but with an embedded database and query capabilities. I didn't want to have to recreate all of the same querying, caching, and parsing code when building new apps, nostrdb will solve all of the painful and slow parts. nostr seems simple but if you want a fully working app it is pretty complicated, especially if you want it to be fast and sync efficiently.\n\n### Goals\n\n* be the best and most efficient at querying, syncing and storing nostr notes\n* enable direct mapping of notes into application code without any serialization overhead\n* provide advanced syncing capabilities such as negentropy, which allows us to only query stuff we don't have\n* be as portable as possible. nostrdb is a C library that you can embed into basically anything.\n* full relay filter support\n* full text search\n\n### Benefits\n\n* full note verification\n* more efficient de-duplication before we begin processing events off the wire\n* set-reconciliation based syncing (negentropy) drastically reduces bandwidth usage and latency\n* iteration on future nostr apps will be quicker (android, desktop, etc)\n* features like ghost mode, account switching, etc will be much more efficient as you will be able to quickly switch between notes that are cached locally\n* much smaller memory footprint due to optimized in-memory note format, which in turn improves cpu-cache efficiency\n* much better profile and note searching\n\nSo that's what I've been working on in the past two weeks. On to what else is new in this release:\n\n## Multi reactions!\n\nSuhail did an amazing job at adding multiple reaction support. All you need to do is long-press the Shaka button to show different options. You can customize these in settings as well\n\n## New onboarding features\n\nDamus will now suggest people to follow when you first enter the app, this is the first of many onboarding improvements coming soon. Thank Klabo for this one!\n\n\nThat's all for now! Please test thoroughly and let me know if you run into any issues. You likely will since the entire codebase has been changed, and I probably broke something.\n\nUntil next time 🫡",
"sig": "74441ba9c736ca52b0b60d4f25127979eec507ab74d93837b7a60214372d976bb09229e75c6894c33153aeb48d8212d8314a81ef08bdd8c2631146edab7cde90"
}