feat: add the in-process fjall broker #5
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
zoo/eve!5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/sqlite-broker-adapter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
eve_broker_inprocwithInProcBrokerUnitandInProcBrokerProvisorUnit.The transport is an in-process bus (tokio channels): request/response, ephemeral messages and queue groups. Persistence uses a fjall database with three keyspaces:
streams— persistent entity markersevents— append-only log keyed by[stream][seq]consumers— durable offsetsOther details:
postcardrecords; the global sequence and dedup set live in memory and are rebuilt fromeventson bootstrapPersistMode::SyncDataserve/wipemaintain the stream, event and consumer keyspaceseve_db_sqlite)Benchmark (
entity delete by filter, same machine, prior NATS+Mongo run):Tests:
cargo test -p eve_broker_inproc -p eve_db_sqlitecargo test -p eve_e2e --test sqlite --test broker_inproc --test inproccargo clippy -p eve_broker_inproc -p eve_db_sqlite -p eve_e2e --tests --benches -- -D warningsAdded the
entity_sqliteDELETE_BY_FILTER benchmark and the write-path batching it exposed.Local comparison on this machine (criterion, 10 samples, temporary SQLite files vs NATS+MongoDB containers):
The local path is faster for a small batch; at 10k it is close but still slightly slower. The remaining cost is the durable per-message journal row with its indexes, not the in-process bus. Group commit, cached stream checks and batched deletes brought the 10k case down from ~1.5 s to ~0.4 s. A segment log or a dedup index replacement is the next step if local must clearly win at that batch size.
Switched SQLite append deduplication to an in-memory set.
(stream, message_id)index is dropped; the set is rebuilt fromeventon bootstrapserve/wipeupdate or clear the setfeat: add the SQLite broker adapterto feat: add the fjall local brokerfeat: add the fjall local brokerto feat: add the in-process fjall broker