[−][src]Crate ssb_db
ssb-db
The most basic db that you need to do (legacy) replication on ssb.
Legacy Replication
"Legacy Replication" is how ssb used to do replication before ebt
It's simpler than ebt, but uses more bandwidth.
To do legacy replication a client calls createHistoryStream for each feed it wants to replicate, passing the largest sequence number it knows about.
SsbDb
ssb-db
defines a trait [SsbDb] that provides all the functionality you should need
to make and handle legacy replication requests.
Architecture
[SqliteSsbDb] implements the [SsbDb] trait.
The underlying architecture is based on flume-db.
ssb-db
stores data in an append only log. It maintains indexes for querying the log in sqlite.
The append only log is the source of truth and the indexes are derived from the log. If the
indexes break or need to be migrated, the sqlite db can be deleted and rebuilt from the log.
Validation
ssb-db
does not validate any messages before appending them. The caller must validate them first.
See ssb-validate and ssb-verify-signatures.
Re-exports
pub use error::Error; |
pub use sqlite_ssb_db::SqliteSsbDb; |
Modules
error | |
sqlite_ssb_db |
Traits
SsbDb |
Type Definitions
FlumeSequence |