airbnb / binaryalert

BinaryAlert: Serverless, Real-time & Retroactive Malware Detection.
https://binaryalert.io
Apache License 2.0
1.41k stars 187 forks source link

Multiprocess dispatcher #114

Closed austinbyers closed 6 years ago

austinbyers commented 6 years ago

to: @javuto cc: @ryandeivert cc: @airbnb/binaryalert-maintainers size: small

Background

112 generalized the dispatcher, but did so by alternating between the different queues and polling from each. The AWS documentation for SQS Long Polling recommends instead to have different threads for each queue being polled. This way, the dispatcher is not blocked if one of its queues is empty.

Changes

Testing

The dispatcher logs show that it is interleaving events from both the analyzer and downloader queues

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.06%) to 93.009% when pulling 28e4cdc8491bbfd5cc21609c07f5784ec07faf59 on multiprocess-dispatcher into 733675d13bb6386c135e992a0e2cfbcb1f2421c6 on master.

ryandeivert commented 6 years ago

nice work!! 😄