Paging - Performance - Scalability
-
I have questions about paging Because paging may play important role in distributed application And according to ".NET Data Access Architecture Guide" at MSDN there are three options to Implement paging 1-Use the Fill method of the SqlDataAdapter to fill a DataSet with a range of results from a query. 2-Use ADO through COM interoperability and use a server-side cursor. 3-Implement data paging manually by using stored procedures the article discuss this options Each method have its advantage and disadvantage in performance and scalability and other things the question is What option you use in your Distributed Application and Why ? If you have another method what is this method at what is it's advantage over those methods thanks in advance
-
I have questions about paging Because paging may play important role in distributed application And according to ".NET Data Access Architecture Guide" at MSDN there are three options to Implement paging 1-Use the Fill method of the SqlDataAdapter to fill a DataSet with a range of results from a query. 2-Use ADO through COM interoperability and use a server-side cursor. 3-Implement data paging manually by using stored procedures the article discuss this options Each method have its advantage and disadvantage in performance and scalability and other things the question is What option you use in your Distributed Application and Why ? If you have another method what is this method at what is it's advantage over those methods thanks in advance
It greatly depends. Over what medium is it distributed? Does each client share in the processing of specific chunks of data? If this application is deployed over the Internet using a
DataSet
is good because it is both serializable (which is good for both XML Web Services and .NET Remoting) and disconnected (better throughput). If each client processes parts of this data, you'll need something to delegate to the clients which rows they should be working on, or fill aDataSet
with only the data they should process. If your clients are on a LAN with the server as opposed to a WAN, the second method might be good because the server cursor will make sure that each client is accessing sequential data in a distributed manner. For an Internet application - as I mentioned above - the rate of data exchange will potentially be high which will result in congestion. You'll also have to take lengths to ensure that any data you in any object you send is serializable to transport via XML Web Services or .NET Remoting. If you use raw sockets, serialization isn't a problem but you might have problems using sockets (for instance, securing them if they need to be secured and bi-di communications can be combersome. As far as stored procedures go, you'll still need something to track which block of records to delegate to the next client. A Singleton object exposed through .NET Remoting could help and it won't even have to worry about serializing data if you just pull it using aSqlDataReader
or something. If this is a WAN- or Internet-deployed application, aSqlDataReader
won't work, and even if it did it would create a high rate or smaller chunks of data which could lead to congestion and timing issues. Depending on your answers to the first two questions, I hope the following paragraphs are of some help to you.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
I have questions about paging Because paging may play important role in distributed application And according to ".NET Data Access Architecture Guide" at MSDN there are three options to Implement paging 1-Use the Fill method of the SqlDataAdapter to fill a DataSet with a range of results from a query. 2-Use ADO through COM interoperability and use a server-side cursor. 3-Implement data paging manually by using stored procedures the article discuss this options Each method have its advantage and disadvantage in performance and scalability and other things the question is What option you use in your Distributed Application and Why ? If you have another method what is this method at what is it's advantage over those methods thanks in advance
I completely agree with Heath. All depends on how you are planning to deploy your application. I'm just finishing a distributed application, and the enviroment I'm using is a LAN, so the customer wanted online notifications of data update. What I did was build a service that listen to all modifications done by the clients, and fire events when the update is complete, so all the clients listen to those events and react depending on the data they are showing at the moment. I used disconected data (DataSet and DataTable). A simple Client / Server architecture, but it works perfect and fast in a LAN enviroment. :) Free your mind...
-
It greatly depends. Over what medium is it distributed? Does each client share in the processing of specific chunks of data? If this application is deployed over the Internet using a
DataSet
is good because it is both serializable (which is good for both XML Web Services and .NET Remoting) and disconnected (better throughput). If each client processes parts of this data, you'll need something to delegate to the clients which rows they should be working on, or fill aDataSet
with only the data they should process. If your clients are on a LAN with the server as opposed to a WAN, the second method might be good because the server cursor will make sure that each client is accessing sequential data in a distributed manner. For an Internet application - as I mentioned above - the rate of data exchange will potentially be high which will result in congestion. You'll also have to take lengths to ensure that any data you in any object you send is serializable to transport via XML Web Services or .NET Remoting. If you use raw sockets, serialization isn't a problem but you might have problems using sockets (for instance, securing them if they need to be secured and bi-di communications can be combersome. As far as stored procedures go, you'll still need something to track which block of records to delegate to the next client. A Singleton object exposed through .NET Remoting could help and it won't even have to worry about serializing data if you just pull it using aSqlDataReader
or something. If this is a WAN- or Internet-deployed application, aSqlDataReader
won't work, and even if it did it would create a high rate or smaller chunks of data which could lead to congestion and timing issues. Depending on your answers to the first two questions, I hope the following paragraphs are of some help to you.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
Thanks Heath , Guillermo i agree with you but i have a comment about using Ado server side cursor as heath mentioned some of its advantage i see that keeping long time open connection with the database server and the number of the round trips between the client and server may be unaccepted and may be this solution violate the philosophy of ado.net what i want to say make this last solution. what is your opinions ? TO Heath : i posted another quetsion about paging decision at sql,ado.net forum may you take a look?