Message-driven
This is also referred to as asynchronous message passing. So, we saw in the Resiliency section that if you could leave a message for the doctor, it may make the system more resilient.
What if all of the patients would only leave messages? Then each doctor could prioritize them or batch-process those messages. For example, printing all recipes together, instead of switching between different tasks.
In addition to loose coupling and isolation, there's also location transparency. You didn't know tha your doctor sent you this prescription while driving home (they snuck out of the window while you left your message). But you don't care since you got what you wanted.
Using messages also allows an interesting option of backpressure ...
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