vipyrsec / dragonfly-client-rs

Dragonfly client written in Rust
https://docs.vipyrsec.com/dragonfly-client-rs/dragonfly_client_rs/
MIT License
4 stars 2 forks source link

Consider switching threading models with regard to IO #52

Closed Robin5605 closed 1 year ago

Robin5605 commented 1 year ago

Blocked by #50

The way the current system works is that we have one thread that polls the Dragonfly API at a specified interval (60 seconds by default), and spawns tasks into the threadpool executor for each job returned by the API. Once these jobs are finished, they send their results over an mpsc channel. I think this adds an additional layer of complexity and necessitates an extra thread.

Instead, we should move over to a model where tasks will individually send their responses to the API as they finish. To avoid the reauthentication race-conditions we get with this models, this issue is blocked by #50