Skip to content
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

pause/resume and manual feed/view mapping #6

Open
ghost opened this issue May 15, 2019 · 0 comments
Open

pause/resume and manual feed/view mapping #6

ghost opened this issue May 15, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented May 15, 2019

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

@hackergrrl hackergrrl added the enhancement New feature or request label Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant