ViewSB icon indicating copy to clipboard operation
ViewSB copied to clipboard

Add way for backends to terminate run

Open tannewt opened this issue 5 years ago • 3 comments

I'm adding a Beagle CSV backend and iteration would be faster if I could terminate the analysis from the backend. That way I could only have it analyze a portion of the file and then return to the command line.

tannewt avatar Dec 18 '19 00:12 tannewt

Hi Scott, interesting to see you are working on a backend to import from beagle CSV. How is this progressing? Is the WIP available to have a look at somewhere?

@ktemkin would it make sense to include this in the project lists to also have visibility of things various people are working on? Thing this may help understanding the overall product direction/backlog; and help understanding how/where certain features would fit (or not).

fvdpol avatar May 19 '20 09:05 fvdpol

@fvdpol My WIP branch is here: https://github.com/tannewt/ViewSB/tree/beagle_backend

I pick it up as I need it.

tannewt avatar May 19 '20 18:05 tannewt

So, it looks like this was partially fixed as part of #57. The analyzer just wasn't periodically checking if the backend was still alive (like it was doing with the frontend). Once I fixed that (dc1a90bed6b04ef1b4c96f80202490ce8d485637) the analyzer was correctly asking the frontend to stop, but the Qt frontend wasn't listening. Once I added a check for that in the Qt frontend's event loop (7e6b96ed2aaffe6703de48efa1f2c6b250a9252f), the Qt frontend started correctly stopping if the backend stopped, as it should.

So what this means is that now this is a matter of the frontends properly listening to the analyzer, and checking if the analyzer has asked it to stop (specifically, checking termination_event.is_set()). This was easy for me to implement in the Qt frontend (and automatic in the CLI frontend). I haven't yet implemented this for the TUI frontend, since I think that'll involve me having to manage the urwid event loop myself, which I haven't yet put the time into figuring out how to do.

Qyriad avatar Sep 29 '20 10:09 Qyriad

Closed in preparation for archiving the repository. We have replaced ViewSB with Packetry.

martinling avatar Aug 01 '24 15:08 martinling