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

Spritz integration #108

Open
realityforge opened this issue Apr 7, 2020 · 0 comments
Open

Spritz integration #108

realityforge opened this issue Apr 7, 2020 · 0 comments

Comments

@realityforge
Copy link
Member

Use Spritz, a reactive streaming library, to stream changes into ComputableValue instances. The stream would manually trigger ComputableValue.reportPossiblyChanged() when a new value arrives. This would ultimately allow us to add mechanisms to control when reaction tasks occur. Some obvious candidates include:

  • minimumDelay: Must wait a minimum time before re-executing
  • debounceTime: Changes are ignored for a time after executing to avoid frequent changes
  • throttleTime: Track when executed and reschedule when at least throttleTime has passed. This is similar to minimumDelay, except that the initial run of the function happens immediately.

The component model may need built-in support for this. Perhaps a @StreamingValue could be made up of a stream producing method and a value returning method. (Perhaps this support could be merged into #91 somehow).

Another useful addition may be the ability to push changes from ObservableValue instance and ComputableValue instances into streams. These changes could either be pushed inline within the READ_WRITE transaction or could be pushed as a task passed to the scheduler. This would support several alternative approaches when architecting applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant