david415 / HoneyBadger

Quantum Insert detector/recorder
GNU General Public License v3.0
305 stars 39 forks source link

make flow state processing goroutines be unidirectional #14

Closed david415 closed 9 years ago

david415 commented 9 years ago

The goal is to improve performance. The way to do that is to process state events for a given TCP connection with two goroutines instead of one. Each goroutine would process a "flow" (a unidirectional flow of packets).

We need to think carefully about how these two flow processing goroutine pipelines would read and change the TCP FSM state. Is it possible to avoid locks or channel synchronizations? For HoneyBadger's purpose of passively tracking TCP connections... Yes. Yes it is possible to implement various naive pseudo-emulations of TCP... and use the concurrency model i just outlined to increase performance... and not use any locks.

david415 commented 9 years ago

let's not prematurely optimize... we can revisit this if we need to when the time is right in our development roadmap...