-
Notifications
You must be signed in to change notification settings - Fork 23
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
streams & change notifications #24
Comments
Hi @dch , CubDB.select(db, pipe: [
map: fn {key, value} -> value end,
filter: fn x -> Integer.is_even(x) end
map: fn x -> x * 2 end,
take: 3
]) The transformations above would be executed as a lazy stream (and, in particular, only maximum 3 entries will be read from disk and processed, because of the final It would be nice to have an interface such as: # Note: this is NOT the way CubDB actually works, just illustrating a point
CubDB.select() |> Stream.map(fn x -> ... end) |> Stream.filter(...) |> ... But, unfortunately, it would be tricky and error prone. The issue is the following: remember that CubDB allows you to perform concurrent reads and writes, so you can be executing a long running The way the In conclusion, performance-wise Regarding allowing processes to subscribe to changes, I am curious, what would be your idea? It sounds like an interesting option, maybe better implemented as a library on top of CubDB. |
Closing this for now as there is no response. Feel free to comment on it and I will reopen if necessary. |
Have you any thoughts on adding a lazy stream interface, or a way to allow processes to subscribe to changed entries?
The text was updated successfully, but these errors were encountered: