Data Processing Modes
- 4 minutes to read
The Web Dashboard Control has two data processing modes for operations that involve data aggregation and filtering.
- Server mode. Data-related operations are performed on the server side. When an end user applies a filter to a dashboard item or groups data, the ASPxDashboard control composes a SELECT statement with the specific WHERE or GROUP BY clauses and send it to the server.
- Client mode. Data-related operations are performed on web server side. The ASPxDashboard control loads a compressed snapshot of aggregated data into a web server memory. Data compression, proper data grouping and multi-threading algorithms reduce memory consumption and improve the data shaping operation performance.
If a data source uses the Server data processing mode, ASPxDashboard requests the data automatically by sending a proper SQL SELECT query.
If the data source operates in Client data processing mode, ASPxDashboard creates a server-side in-memory cache that stores data from the data source. The cache accelerates client-side actions that require data updates (master filtering and others).
Set the Data Processing Mode
Whether you can change the data processing mode, depends on the data source type.
SQL Data Source - the server mode is the default mode for all Dashboard SQL data sources. To change the data processing mode for the specified data source in code, use the DashboardSqlDataSource.DataProcessingMode property.
The Entity Framework data source prevent you to switch between data processing modes. The Web Dashboard determines and applies the mode automatically based on the DBContext information about available properties as follows:
- The Server mode is set if the DBContext properties return objects with the IQueryable interface. In this situation the dashboard requests data with complex LINQ queries and the Entity Framework executes LINQ queries on the server side.
- The Client mode is set if the IQuerable interface is not supported. It happens when data is retrieved from a stored procedure.
Use the DashboardEFDataSource.GetDataProcessingMode property to determine the data processing mode for the specified data member contained in the data source.
Excel Data Source, Object Data Source and Extract Data Source works in client mode and do not support server mode. An attempt to set the DataProcessingMode property results in the NotSupportedException.
OLAP Data Source works in server mode specified for the Analysis Services instance. Refer to the Determine the Server Mode of an Analysis Services Instance article for more information.
The IsServerModeSupported property for all data source types allows you to determine whether the current data source supports server-side data processing. Different data source types allow you to manage the current data processing mode in different ways.
- For SQL data sources, use the DashboardSqlDataSource.DataProcessingMode property to switch between data processing modes.
- Th Entity Framework’s DashboardEFDataSource does not allow you to switch between data processing modes manually, but enables server mode automatically for properties returning objects implementing the IQueryable interface. Use the DashboardEFDataSource.GetDataProcessingMode property to determine the data processing mode for the specified data member contained in the data source.
- DashboardExcelDataSource, DashboardObjectDataSource and DashboardExtractDataSource data sources support client mode only.
For all data source types, you can use the IDashboardDataSource.IsServerModeSupported property to determine whether the current data source supports server-side data processing.
Server Mode Limitations
SQL Data Sources
In server mode, the Dashboard does not have simultaneous access to bound data in its entirety. This results in the following limitations:
- Stored procedures are not supported in server mode.
- Stored procedures executed using custom SQL are not supported in server mode.
- Some calculated fields cannot be evaluated in server mode.
The Count Distinct summary function is not supported for the following database engines:
- Microsoft Access
- Microsoft SQL Server CE
- The Median summary function is supported for the Oracle data provider only.
- The Mode summary function is supported for the Oracle and PostgreSQL data providers only.
- Microsoft SQL Server
Entity Framework Data Sources
Refer to the Entity Framework 4.0+ Server Mode Specifics topic for information on Entity Framework Server Mode limitations.