Ah, reporting. Every application developer’s bane. It starts with yesterday’s sales. Then top-selling countries. How well each category does. Which items have been popular in the last month. The business needs these reports and they grow, bit by bit, over time. Before you know it, you’re in a hole. Running expensive reports on the production systems is a performance killer. It gets hard to extract meaningful reporting data out of your ODBMS. Schema updates in your relational database break everything. If you have a data warehouse (and eventually, you’ll need one) the ETL process is painful and slow.
There’s another way. A better way. A simple pattern that is fast, scalable and robust, saving blood, sweat, and tears. It’s a pattern you will want in your application from day one, but works even if you have a legacy application with reporting problems. You’re in deep, but fear not, for the First Law of Holes will save the day.