When building an application which talks to some dependencies over the network it's generally recommended to always specify timeouts 1 . This prevents resources (threads, connections, descriptors) from being occupied for a long time — worst case indefinitely 2 - when a dependency is slow or unavailable, leading to the application becoming unresponsive. Timeouts also allow retrying by contacting a…
This post explores what debouncing is and how it is applied in software engineering in general and event processing in particular. With debouncing, for each sequence of successive events only the last one is processed, discarding the rest. The two reasons to make use of the technique: performance - avoiding unnecessary work, and correctness - eliminating undesired effects of repeated actions.…