-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
enhancementNew feature or requestNew feature or request
Description
With pause and resume methods on views, we can support some advanced sparse patterns and lazy calculation.
This could be done with:
core.pause(viewName, feedKey)core.resume(viewName, feedKey)pause: trueoption on views- an initial
feed.metapayload when a feed is received
core.use('cool', {
api: { /* ... */ },
map: function (rows, next) {
// ...
next()
},
pause: true
})
core.on('feed', function (feed) {
if (feed.meta && feed.meta.type === 'cool') {
core.resume('cool', feed.key)
})Manually running views would be nice for compute-heavy workloads which might be cumbersome to run during/immediately after replication. And if you can manually add a log to a view later, you can do authentication checks first.
This feature would also allow us to have multi-log structures where views only apply to certain logs but not all logs for performance reasons. You could also have bulk logs which are referred to by other logs but the data in those bulk logs is not processed by a view directly. But that feature would also depend on kappa-db/multifeed#2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request