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: true option on views
- an initial
feed.meta payload 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
With
pauseandresumemethods 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 viewsfeed.metapayload when a feed is receivedManually 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