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

Improve console output #37

Open
PizieDust opened this issue Sep 5, 2024 · 4 comments
Open

Improve console output #37

PizieDust opened this issue Sep 5, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@PizieDust
Copy link
Collaborator

Currently, unikernel console output is gotten by constantly polling the server using javascript loops. While this works, it's not very ideal.
A websocket will be much more intuitive for such a purpose.
A good start for this task will be to properly research the state of websockets as concerns web in OCaml.
Figure out if the currently available websocket packages/libraries can be used/ reliable and if not, investigate if it's worthwhile writing a websocket library.

@hannesm
Copy link
Contributor

hannesm commented Sep 6, 2024

What I find pretty crucial is that at the moment whenever someone looks into the "unikernel info", the JavaScript starts to read the console output peridically (-> lots of HTTP requests), and mollymawk starts an albatross connection to read the console output (and store it in mollymawk).

The albatross connection reading the console output is never terminated, and that is wasteful. In addition, in mollymawk we have then for each unikernel console a Lwt task that reads and pushes into a "ring buffer".

A different approach may be to say "you can read the last 20 lines of the console", but do not do this asynchronously. That may be sufficient for the use cases (you then can reload the page to see more up-to-date information). It would as well work around the websocket question, and reduce the overall complexity.

What do you think?

@hannesm
Copy link
Contributor

hannesm commented Sep 23, 2024

See #50 for a non-polling version, no websockets (yet).

@hannesm hannesm added the enhancement New feature or request label Sep 23, 2024
@hannesm hannesm modified the milestone: Next year Sep 23, 2024
@hannesm
Copy link
Contributor

hannesm commented Oct 19, 2024

With #50, there's less pressure on albatross and on the client side -- but we barely see more than two lines of console output.

We should find a better way on how to achieve this.... maybe it is really digging into websockets...

@PizieDust
Copy link
Collaborator Author

Indeed. I hope to work on websockets at a point when we have cleared most of the issues currently open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants