-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom log ids #8
Comments
I am not sure I understand what you are trying to do exactly, maybe I can clearify a few points from my side and we can figure something out together. First of all append could be part of a library on top of konserve, for me konserve just abstracts the bare minimum of durable IO that is necessary. Everything else should be implementable on top and it should be doable as a library against the konserve protocols. This keeps konserve extremely portable, but it has tradeoffs in regard of access to richer storage semantics provided by the underlying store. I wrote I am currently porting the hitchhiker tree to konserve. For me it solves most problems I have in this space. It even covers the append-log reasonably well, I suppose. You just use larger op-buffers and a smaller b-tree component. But even with default settings it has less IO than the current append operation. It allows you to insert elements with a key, so you could provide your id just by insertion into it and it gives you efficient range queries. It is still a bit of work to do, but I am confident that it will work in cljs soon and that I can keep the performance of the clj version. We will see... If you like to help, feel free to chime in :) |
My use case is to store a WAL (among other things). I'd need to know whether a log has already been processed. I could build an index (more I/Os and more code) or simply use a custom function Hitchhiker tree would be overpowered in my case. |
Ah, I think I might get what you are trying to do. Their id's behave like Datomic's squuid. I have built the same in the replikativ streaming API recently, where you have a channel which sends you ack messages after values have been applied to the stream. https://github.com/replikativ/replikativ/blob/master/src/replikativ/crdt/cdvcs/realize.cljc#L172 You want to keep the log fixed and provide the ids incrementally? Feel free to copy the code of append and provide a demo :) |
@lsenta Have you managed to use append for your purpose? |
konserve is pretty straightforward to use and to extend, thanks for sharing & maintaining it.
I use the
append
API a lot and it'd be more efficient for me to have ordering on the log ids.From what I understand, it should be easy to pass a channel as a source of ids.
Because we
go-locked
on the current key,append
operations can't be interleaved. append would preserve the order from the ids-source channel.Do you see any problem with this approach?
I'd be happy to provide a patch with this feature.
The text was updated successfully, but these errors were encountered: