Which general rule determines whether to use PerSession or PerCall?
I have a slightly heavy (I think ..) WCF service containing CRUD methods with up to about 80 tables.
I divided the WCF service into 7 contracts within 1 service (i.e. 7 endpoints within 1 service), so that each contract takes care of its own domain, for example, I have a sales contract, therefore all the tables related to sales, and its related operations are within the limited context of sales
So, my WCF service structure looks something like this:
public partial class ABCService : ISalesService { //CRUD methods of all tables related to Sales } public partial class ABCService : IMarketingService { //CRUD methods of all tables related to Marketing } public partial class ABCService : ICustomerService { //CRUD methods of all tables related to Customer } public partial class ABCService : IProductService { //CRUD methods of all tables related to Products }
My concern for PerCall is that since I have a fairly large DB / WCF service, I am afraid that the amount of resources consumed by each call is multiplied by the number of users and the speed with which they call the service would be too high.
I donβt know the small details, but I read that creating proxy channels is an expensive operation.
Oh, I use hand-encoded proxies instead of VS. Add a service link to use my WCF service.
So my question is what should I use? PerSession or PerCall?
Update:
- I do not need to maintain state between calls.
- I use NetTCP bindings
source share