syncrypt / trio-inspector

A browser-based monitor for Trio
Other
8 stars 2 forks source link

Another browser-based monitor #1

Open Tronic opened 5 years ago

Tronic commented 5 years ago

Hi,

I just found your project, after spending a day hacking together my own Trio monitor, and would like to collaborate. Yours is probably more mature and would make better basis for further development. My implementation is not formally released but you may have a look at https://paste.zi.fi/p/trio-monitor.py/view

Are you aware of any other projects with the same goal?

lordi commented 5 years ago

Yea, it seems like your project has similar goals. I wasn't aware of any other web-based trio monitor. That's why I created this. I'd be happy to collaborate, but my time on this project is limited.

Two questions:

1) What kind of features would you like to see/willing to work on? 2) Are you familiar with Elm? Because this repo uses Elm as the Web UI library.

Tronic commented 5 years ago

I sent a similar inquiry to trio-monitor developer, who also now wishes to revive that project. I believe that by working together we could produce something useful -- with stable enough support so that it won't simply be forgotten at some point.

Here are the other project links for reference:

https://github.com/Tronic/trio-web-monitor https://github.com/python-trio/trio-monitor

Additionally, another proof-of-concept of mine for nicer tracebacks that should be useful in this too: https://colab.research.google.com/drive/1Gx16MfcgkqMCuFn8fAgm7YWGytypmtwE

I'd prefer to have Python-based HTML generation (albeit libraries in that regard tend to be somewhat lacking) and avoid heavy Javascript frameworks especially if they introduce new languages and compilers; still, I do consider Elm an acceptable option if it offers substantial benefits over other available options. Most certainly we cannot rely on HTML string snippets which I used in my proof of concept work.

Features: inspection of thread execution (human-readable live tracebacks) and Trio task trees. Trio debugging features (cancel a task, pause scheduling, etc). Good interactive visualisation of program state (as opposed to spamming lines of text/tracebacks in a console, with interactivity limited to Ctrl+C). Integrated code editor (or syntax-highlighted viewer) for inspecting source code within each stack frame. None of these take too much time to implement but polishing them to be really good takes more effort.

Most importantly it should be easily added to an existing application and run without interfering with application's normal operation, and should stay operational even when the application gets stuck or crashes.

I suggest that we continue discussion at https://trio.discourse.group/t/browser-based-trio-monitor/195 where you could also introduce trio-inspector.