-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support some degree of live python scripting #454
Comments
Hmm. Is there a real difference though in terms of potential for event dropping? The pipe writes are blocking once the buffer is filled up. And if you make them non-blocking then you'll still drop events, unless they are buffered somewhere else. |
Having multi-threaded loop to avoid blocking on I/O is something that we'll need to tackle eventually but it's probably a relatively big work. This problem exists today as well, of course, whether it's writing to terminal, file or both, it can delay event processing. Embedding the python interpreter in the event processing loop adds a potentially unbound delay with no buffering unless we implement it internally. Using a pipe gives us a buffer and parallel event processing "for free" with minimal changes in retis. I'm not saying we won't embed the python interpreter in the event loop, we've wanted to add custom event formatting for some time, but right now enabling piping is a very cheap way making this "work". Note "some degree of" in the title :-) |
|
After chatting with @igsilya and others at OVS/OVN Conference, some feedback we got is:
1 - It'd be nice to be able to run python scripts at
collect
time2 - It'b be nice to be able to ease the execution of python scripts by just using UNIX pipes
Doing 1 by embedding the python executor in the collect main loop (which runs to completion) can introduce latency that may lead to increased event loss. So we'd need to split "printing/processing" and collection into different threads.
However, 2 actually makes it possible to do 1 easier by making
collect
andpython
two different processes, "just" paying the cost of {,un}marshaling events with minimal changes to the core event loop. Let's imagine we could:The text was updated successfully, but these errors were encountered: