[feature] Range delete on POST
Range delete would be a useful feature for implementing different clientside incremental snapshot strategies. I.e. append single writes and for every N writes, aggregate last N writes into a incremental snapshot and delete range. Repeat. Without range delete only full dataset snapshot can be implemented as far as I can see. Is this something you would consider supporting?
Btw, for this to work we would need to be able to atomically POST and range-delete in same request, so POST endpoint would need support for range-delete.
@wgcpdev PicoMQ currently supports trim, i.e. drop everything below a sequence. With that start offset moves forward and below that is deleted.
For the use-case you mentioned, trim should solve for it?
But range-delete might be useful for mid-stream range delete, which creates holes/gaps in the durable-log and makes the log mutable, not something we'd want to do.
Trim don't allow in-stream incremental snapshots as far as I can see. Say your stream contains KV entries that you reduce over to build a persistent KV store. This stream wil have unbounded size and thus unbounded startup time if you don't snapshot state now an then. With trim we can build and replace history with a snapshot. But doing so will also remove old snapshot, so no way to create incremental version. This will also become a problem once state is big. Then the only solution left is to store this state on disk, loosing the benefits of storing all your data in s3.
Range delete would delete/tag data like trim, technically mutation? but more like GC. We are not changing data.
It will however create gaps, and that can be an issue depending on architecture and/or clients.
Ahh! I totally misunderstood the use case. Framing the stream as a database made it clear now. It's quite feasible to support range deletes, although it has a lot of touch points across the metadata, read path, and write path.
As much as I want the stream to be an immutable, append-only log, I can see use-cases where range-deletes are useful. At this time, it's slightly lower in priority.