1 of 3

Architecture for dashbaord showing aggregated stats

I'm trying to find the best architecture for an application that shows a dashboard with aggregated stats that come from another one (e.g. number of sales in the last 12 months, current sales this month, a fairly complex score, performance of users over last 30 days, etc.)

There is a fair bit of business logic that lives in Application 1 but the aggregated data gets saved in Application 2 (dashboard).

What's the best way to create the aggregate data?

1) Pull data directly from Application 1 database and duplicate business logic for score calculation etc. 2) Push data from Application 1 to Application 2 somehow 3) Aggregate data in Application 1 on the fly and provide and api for Application 2 4) Other (probably)

Please suggest solutions,

Thanks.