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

Add 'min_events' parameters to /serve endpoint #3666

Merged
merged 2 commits into from Nov 24, 2023
Merged

Conversation

lava
Copy link
Member

@lava lava commented Nov 22, 2023

This adds a new parameter 'min_events' to the /serve endpoint, with the semantics that the endpoint will return a result as soon as min_events events have arrived, regardless of the configured timeout and max_events.

The idea is to allow long polling, by specifying a long timeout and a low value for min_events. The defaults for the endpoint are adjusted accordingly.

@lava lava added the improvement An incremental enhancement of an existing feature label Nov 22, 2023
Copy link
Member

@dominiklohmann dominiklohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic. I've tested it with the app and the behavior is much better now and results arrive quicker with this approach. There's one change to the loading behavior of the app we need to make, but that's orthogonal to this change.

libtenzir/builtins/operators/serve.cpp Outdated Show resolved Hide resolved
libtenzir/builtins/operators/serve.cpp Outdated Show resolved Hide resolved
libtenzir/builtins/operators/serve.cpp Outdated Show resolved Hide resolved
@lava
Copy link
Member Author

lava commented Nov 24, 2023

As with most other recent PRs, I'm ignoring the brew-related errors on the macOS plugin builds, since this PR does not touch any code related to this.

@lava lava merged commit 3a391f5 into main Nov 24, 2023
40 of 43 checks passed
@lava lava deleted the topic/serve-min-events branch November 24, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An incremental enhancement of an existing feature
Projects
None yet
2 participants