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

Make history backend modular #126

Merged
merged 5 commits into from
Jun 27, 2024
Merged

Make history backend modular #126

merged 5 commits into from
Jun 27, 2024

Conversation

progval
Copy link
Collaborator

@progval progval commented May 4, 2024

The new sable_history crate defines a HistoryService trait, which could be implemented in various ways:

  1. in-memory, by querying the NetworkHistoryLog that every node has
  2. database-based, by querying a local or remote database (sqlite, postgresql, ...)
  3. remote, by querying an hypothetical dedicated node with a RPC mechanism that remains to be defined

For now, only item 1 is implemented, by moving the backend implementation of the CHATHISTORY command handler to sable_history.

The "hypothetical dedicated node" will probably be implemented by sable_history itself, and it will also benefit from the HistoryService, which will allow it to support multiple database backends, so we can more easily prototype and compare them.

progval added 5 commits May 4, 2024 14:37
The new `sable_history` crate defines a `HistoryService` trait,
which could be implemented in various ways:

1. in-memory, by querying the `NetworkHistoryLog` that every node has
2. database-based, by querying a local or remote database (sqlite,
   postgresql, ...)
3. remote, by querying an hypothetical dedicated node with a RPC mechanism
   that remains to be defined

For now, only item 1 is implemented, by moving the backend
implementation of the `CHATHISTORY` command handler to `sable_history`.

The "hypothetical dedicated node" will probably be implemented by
`sable_history` itself, and it will also benefit from the
`HistoryService`, which will allow it to support multiple database
backends, so we can more easily prototype and compare them.
@spb spb merged commit 6fc79e7 into Libera-Chat:master Jun 27, 2024
2 checks passed
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.

2 participants