Throwing away assumptions
An important detail in the preceding diagram is that it indicates the average response time for each of the data sources. As expected, going to the database is the fastest, with the cache being a close second. Retrieving information from an external system is the slowest of them.
These types of statistics will become a headache for many of you in the future. That is, if you allow them to become assumptions of how the world works. A lot of people, when faced with the previous example and having to write a concurrent solution, will write the application around the premise that the information coming from the DB will always be ready by the time the cache responds, and that both of them will be ready when the external ...
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