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

Flush when optional limit is reached #1

Open
alechill opened this issue Aug 9, 2017 · 0 comments
Open

Flush when optional limit is reached #1

alechill opened this issue Aug 9, 2017 · 0 comments

Comments

@alechill
Copy link
Owner

alechill commented Aug 9, 2017

Optionally limit the amount of actions that can be collated in each heartbeat

Use case:
Collecting actions for sending to analytics, analytics endpoint has a limit of say 50 events in a batch call. Instead of having to maintain a queue wherever the heatbeat is being listened, just beat every interval if less than 50 actions occur, OR when a configured 50 action limit is hit

AC:

  • limit?: number option
  • If limit reached within heartbeat interval, flush to a premature heartbeat (a murmer???!!), begin interval again (no need to attempt to do this extra heartbeat while retaining overall overall heartbeat cadence)
  • If limit not reached withing the normal interval, just behave as usual flushing to a beat beating every x

Not covered

  • Not intended to be an alternative to interval, will continue flushing on interval AS WELL rather than acting as a buffer that always waits until limit reached before flushing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant