25.4 Putting It All Together
Loose coupling behavior requires a slightly different mindset from the regular approach.
Developers sometimes refer to loose coupling in terms of asynchronous events. This terminology can be misleading, as it implies that signal handlers will be called independently of the HTTP request/response loop. This is not the case. If your signal handler function takes time, it will slow down the entire response time of your webpage.
A better way to think of signals and loosely coupled behavior is according to the basics of actor model theory. The idea is that software is split into independent actors that send messages to each other, where none of the actors can guarantee any behavior of another actor. (The origins of object-oriented ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access