OK, I admit, this is rather extreme, but I'm still curious if it's possible.
I have the GridVew running with virtualization through VirtualQueryableCollectionView and I have a tailored DomainService that help in putting the correct queries. This works like a charm except for a slight delay after the first query, but that's not the issue for this post.
Assume the following:
Today I have a DomainService that do the job, but waaay to slow. To gather a list of account names from AD takes about 5-10 seconds (Domain Users), but the resulting SQL query include a 300KB+ string of account names and SQL require 200+ seconds to complete the query.
So, the scenario I'm looking for is to have some kind of virtual paging on the server as well as on the client, like:
If this is at all possible, I must probably restrict filtering and sorting on the client and use a strict sorting.
So, is this possible?
And a related question: How can I extend the timeout from the silverlight client to the DomainService? I have been able to adjust the timeout on the server (for the SQL query) so it survives the 200+ second wait for the answer, but I still haven't been able to extend the 1 minute timeout on the client.
The closest I have come (that at least is accepted by the compiler) is the following:
But it has no effect whatsoever...
I have the GridVew running with virtualization through VirtualQueryableCollectionView and I have a tailored DomainService that help in putting the correct queries. This works like a charm except for a slight delay after the first query, but that's not the issue for this post.
Assume the following:
- I have a rather large Active Directory ( some 15.000+ accounts)
- I have a rather large SQL database with additional information on the AD accounts.
- I want to query the database for all records for users that are members of a specific group in AD (one potential group is "Domain users"...)
- I want to present the result as quickly and smoothly as possible and provide a virtual paging mechanism.
Today I have a DomainService that do the job, but waaay to slow. To gather a list of account names from AD takes about 5-10 seconds (Domain Users), but the resulting SQL query include a 300KB+ string of account names and SQL require 200+ seconds to complete the query.
So, the scenario I'm looking for is to have some kind of virtual paging on the server as well as on the client, like:
- The client request the first 50 rows (LoadSize=50)
- The DomainService gather the account list from AD (and cache it...)
- The account list is sorted
- The DomainService initiate a SQL query with a subset of the accounts that will fulfill the request for 50 rows and return the result to the client. (...and I can't use .Take(50) since this will fire the complete 200+ second query)
- When the client request additional rows, the DomainService request additional data if necessary and return it to the client.
- ...and so on...
- AND - the Entity Framework context must be valid and if the client call SubmitChanges() it must still work...
If this is at all possible, I must probably restrict filtering and sorting on the client and use a strict sorting.
So, is this possible?
And a related question: How can I extend the timeout from the silverlight client to the DomainService? I have been able to adjust the timeout on the server (for the SQL query) so it survives the 200+ second wait for the answer, but I still haven't been able to extend the 1 minute timeout on the client.
The closest I have come (that at least is accepted by the compiler) is the following:
((WebDomainClient<PKICertificateDomainContext.IPKICertificateDomainServiceContract>)context.DomainClient).ChannelFactory.Endpoint.Binding.SendTimeout =
new
TimeSpan(0, 30, 0);
((WebDomainClient<PKICertificateDomainContext.IPKICertificateDomainServiceContract>)context.DomainClient).ChannelFactory.Endpoint.Binding.ReceiveTimeout =
new
TimeSpan(0, 30, 0);
But it has no effect whatsoever...