You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately sled hasn't been maintained for 2 years which I reasoned was OK for payjoin-cli since it's a bit of a demo tool, but probably not ok for the aspirationally production-hardened payjoin-directory.
Redb is an alternative I hear come up a lot for sled, but no modern version of it complies with our MSRV. Now, I'd be ok bumping MSRV just for payjoin-directory but NOT for the payjoin crate. Not sure how much trouble multiple crates with different MSRV would be for our repo.
Noting this isn't really so much tech debt as it is maintenance. When the dependency was taken on it was state of the art, and the state of the art changed.
Not really tech debt to pay back, but regular maintenance
On this topic, Does it then make sense to use sqlite's in-memory :memory: database to keep our dependency tree simpler if we're going to use it for payjoin-cli #867#873? That seems easier than writing and maintaining an in-memory database of our own, and devs can have an easier time working across the repo with some cross-over in understanding of persistence that depends on the same system between crates.
an in memory database is just a hashmap... the tricky part is having listeners etc which sqlite can't really help with
i've started working this last week, still kind of in refactoring hell:
DirectoryService struct with an ohttp::Server and a generic Db trait, which is based on the DbPool public API with some changes
feature gating of redis in directory
a waitmap like structure with future::shared similar to how ohttp-relay works (but a bit simpler in some respects)
not yet done:
abstracting the in memory waitmap to have a generic KV store which is just HashMap<ShortId, Payload> (where struct Payload([u8; 7168])) for the in memory DB. this can be made persistent using files on disk, rocksdb with expiry, sqlite, redis, ... see #775 for more bikeshedding of rhis part
Activity
DanGould commentedon Nov 28, 2024
valkey is the obvious candidate that comes to mind.
arminsabouri commentedon Jan 13, 2025
I would put my vote in for sled. Its simple to work with and fast.
DanGould commentedon Jan 13, 2025
Unfortunately
sledhasn't been maintained for 2 years which I reasoned was OK forpayjoin-clisince it's a bit of a demo tool, but probably not ok for the aspirationally production-hardenedpayjoin-directory.Redb is an alternative I hear come up a lot for sled, but no modern version of it complies with our MSRV. Now, I'd be ok bumping MSRV just for
payjoin-directorybut NOT for thepayjoincrate. Not sure how much trouble multiple crates with different MSRV would be for our repo.DanGould commentedon Feb 12, 2025
Noting this isn't really so much tech debt as it is maintenance. When the dependency was taken on it was state of the art, and the state of the art changed.
Not really tech debt to pay back, but regular maintenance
DanGould commentedon Jul 27, 2025
On this topic, Does it then make sense to use sqlite's in-memory :memory: database to keep our dependency tree simpler if we're going to use it for payjoin-cli #867 #873? That seems easier than writing and maintaining an in-memory database of our own, and devs can have an easier time working across the repo with some cross-over in understanding of persistence that depends on the same system between crates.
nothingmuch commentedon Jul 28, 2025
an in memory database is just a hashmap... the tricky part is having listeners etc which sqlite can't really help with
i've started working this last week, still kind of in refactoring hell:
DirectoryServicestruct with anohttp::Serverand a genericDbtrait, which is based on the DbPool public API with some changesnot yet done:
abstracting the in memory waitmap to have a generic KV store which is just
HashMap<ShortId, Payload>(wherestruct Payload([u8; 7168])) for the in memory DB. this can be made persistent using files on disk, rocksdb with expiry, sqlite, redis, ... see #775 for more bikeshedding of rhis part