We need to develop a dashboard application for a giant screen. What it is does is collect all KPIs(Key Performance Indicators) and shows it on the giant screen in realtime in a visual manner so that the management leads know whats going on.
So giant screen will have 20 to 30 independent graphs & pie charts(the number might increase soon) data needs to be refreshed at a configurable amount of time. What it technically means is lot of database calls to pull the data and notify the data changes to the GUI. As there are many individual graphs to update, I do not want to update them synchronously because a time consuming database query of one graph will delay the update of another graph.
So I have two choices here,
- Run the database calls, calculations & notifying the GUI of the changes in data in a separate thread/task for each graph.
- Write all the database calls as asynchronous methods, implement calculations and notifying the GUI in the callbacks
Though either of the method will suffice the purpose, I want to know which solution is better especially considering the fact the hardware has 16 cores. What are the advantages and disadvantages of both of these methods? or Is there any better approach for this problem?
We are planning to use .NET 4.0 & WPF for the UI & C# as development language.