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

refactor accounts system so that buntdb is no longer the data plane #1986

Open
slingamn opened this issue Jul 21, 2022 · 2 comments
Open

refactor accounts system so that buntdb is no longer the data plane #1986

slingamn opened this issue Jul 21, 2022 · 2 comments
Milestone

Comments

@slingamn
Copy link
Member

This relates to #1971. In almost every place we use buntdb, it is not the data plane: it is not queried at runtime because the relevant data exists in native Go datastructures. This has the advantage that runtime latencies are not sensitive to the latency of the database layer (so we could use a much slower database layer, without impacting performance other than startup time).

The one exception is accounts:

  • The source of truth about whether an account name is registered is buntdb
  • Account login always retrieves credentials and settings from the database

Accounts should be refactored so they're like other systems (channel registrations, [DK]-lines, etc): the source of truth should be on the Go heap behind a sync.RWMutex, not in the database.

@slingamn slingamn added this to the v2.11 milestone Aug 28, 2022
@slingamn slingamn added the release blocker Blocks release label Aug 29, 2022
@slingamn slingamn removed the release blocker Blocks release label Dec 11, 2022
@slingamn slingamn modified the milestones: v2.11, selected Dec 11, 2022
@slingamn slingamn modified the milestones: selected, v2.12.0 Feb 23, 2023
@KellerFuchs
Copy link

Wouldn't that make #26 (s2s) harder, as the link protocol would need to do (something like) distributed cache coherency, to ensure there's no inconsistency between in-heap data and the DB?

@slingamn
Copy link
Member Author

See #1532 for current work on this.

@slingamn slingamn modified the milestones: v2.12.0, v2.13 Oct 18, 2023
@slingamn slingamn modified the milestones: v2.13, 2.14 Jan 7, 2024
@slingamn slingamn modified the milestones: v2.14, selected Jun 9, 2024
@slingamn slingamn modified the milestones: selected, v2.15 Jul 8, 2024
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

No branches or pull requests

2 participants