-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
epicAn issue which tracks multiple issuesAn issue which tracks multiple issues
Description
Description
Operations performed within the packet processor involve the database, should be separated into a trait.
Such trait can then be implemented multiple times, such that it represents a composable model:
- DB access base implementation
- composable caching implementation as a middleware
e.g.
trait PacketDbOps { ... }
struct PacketDbOpsImpl { ... }
impl PacketDbOps for PacketDbOpsImpl { ... }
struct CachingDbOps<Inner: PacketDbOps> {...}
impl<Inner: PacketDbOps> PacketDbOps for CachingDbOps<Inner> { ... }
Relevant issues
- Make PeerId <-> Address resolution use a cache #6045
- Remove db access in packet processing when reading channel information #6051
- Cache remaining database read operations in packet processing
Definition of DONE
- All DB read operations in packet processing are using a cache
- All DB write operations in packet processing cause cache invalidation
Metadata
Metadata
Assignees
Labels
epicAn issue which tracks multiple issuesAn issue which tracks multiple issues