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

PID Controller #24

Open
RxDave opened this issue Jan 18, 2017 · 0 comments
Open

PID Controller #24

RxDave opened this issue Jan 18, 2017 · 0 comments

Comments

@RxDave
Copy link
Owner

RxDave commented Jan 18, 2017

Create a PID operator that automatically throttles notifications from the server based on the changing performance of the client.

For example, the operator could buffer notifications on the client while they're being processed. The goal is to keep the buffer at zero. As the length of the buffer increases, a closed-over observable pushes notifications to the server indicating the calculated throttle period that will help the client to consume items in its buffer faster than it receives them; e.g., as the buffer length increases, the throttle period is increased, which decreases the number of notifications arriving on the client, thus eventually decreasing the buffer size to zero. As it's decreasing, the throttle period may also be decreasing, as long as the buffer size continues to decrease.

For situations in which dropping notifications is unacceptable, yet batching notifications is at least more efficient than processing notifications individually, then instead of throttling the server can use batching (in this case, the client would push buffer count changes rather than throttle period changes).

And perhaps some combination of both could be used, for extreme cases where some upper limit is reached and the server must transition from batching to throttling.

https://en.wikipedia.org/wiki/PID_controller

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

No branches or pull requests

1 participant