Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port nocapd to Deno and rename [bullmq->pqueue, lmdb -> sqlite] #774

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

dskvr
Copy link
Collaborator

@dskvr dskvr commented Feb 11, 2025

There's a bug on production agents that relate to LMDB silently failing during update once the db reaches a certain size. This results in a diminishing reporting rate, at about 5 relays a day. (for example, in cursory tests I found that the current number of (known) relays online using current logic is approximately 1040, but most monitors are reporting 900 relays, where some monitors are reporting relays online that others aren't. It has been confirmed that this is not due to network conditions, as isolated tests the hosts can indeed connect to the relays they are not reporting.

Fed up with Node, as well as the silent peculiarities of LMDB and BullMQ, I am abandoning everything that brings me dispair.

  • node -> deno
  • bullmq -> pqueue
  • lmdb -> sqlite

There are some increased overhead and performances issues with this change, particularly with sqlite (roughly 1000x slower).

But overall, will be easier to maintain and more reliable, and becomes a stability update, quality of life update (for me) and much needed code refactor that passively kills all technical debt.

Already have it about 90% of the way there, just need to reenter bundler hell because @nostrwatch/nocap relies on ws and Deno and ws has all kinds of unhandled errors in Deno.

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for nostrwatch failed. Why did it fail? →

Name Link
🔨 Latest commit da525c3
🔍 Latest deploy log https://app.netlify.com/sites/nostrwatch/deploys/67aac7edb534e800080a2725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant