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 ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.