Services for getting data with related entities

Jan 11, 2013 at 7:25 PM

Hi David

Your CRUD web service generator utility is very helpful. What i am trying to achive now is how can i write a service for getting the data from related enitities because in your utility or in any other example we just get data from an entity.

I already tried getting data from different entity and wrote logic in .NET to get what i want and then form a object and expose as WCF service but the calls to different related entities is taking too much time.

So in short what i am asking is either a way to improve the performance if we have to make individual calls to different entities or any other way to get the data as a service from related entities.

Any help will be appreciated as always..

Thanks

Sachin

Coordinator
Jan 11, 2013 at 7:58 PM

For improved performance retrieving entity data (for a single entity or across entites), consider bypassing the MDS web services APIs and reading data either directly from the Subscription Views, or populating an read-only relational model in SQL Server that materializes the canonical attributes of your master data entities.

 

If you design a simple relational schema and load that periodically from your subscription views, you can easily build Web Services with EF and WCF or WCF Data Services that are very fast and scalable.

 

David

Jan 14, 2013 at 3:40 AM
Thanks David for a good suggestion.
I will try this tomorrow and let you know if I have any problems and the performance improvement.

Thanks
Sachin

Sent from my iPhone

On Jan 11, 2013, at 3:58 PM, "dbrowne" <notifications@codeplex.com> wrote:

From: dbrowne

For improved performance retrieving entity data (for a single entity or across entites), consider bypassing the MDS web services APIs and reading data either directly from the Subscription Views, or populating an read-only relational model in SQL Server that materializes the canonical attributes of your master data entities.

If you design a simple relational schema and load that periodically from your subscription views, you can easily build Web Services with EF and WCF or WCF Data Services that are very fast and scalable.

David

Jan 16, 2013 at 3:50 PM

Hi David

Just wanted to thank you agan for giving the idea, i have done a WCF web service to the subsription view, i created and its a drastic improvement. Iwas taking 12 sec through MDS and now its taking 600 millisecs.

Thanks again

Sachin

Coordinator
Jan 16, 2013 at 3:55 PM

Great, glad to hear it.  Just for completeness sake, the subscription views are efficient for the following kinds of lookups:

-Lookup entities by Name

-Lookup entities by Code

-Lookup entities by the value of a Domain Attribute

A lookup of an entity by a non-domain attribute that is not Code or Name generally requires a scan of the entire entity table.  If you have only a few thousand entity members this is probably fine, but if you have millions of entity members this can get expensive. 

David