optimization - Switching between in-memory and WCF service? -


imagine have following, standard wcf, code :

[servicecontract] interface icustomerservice {     [operationcontract]     customer getcustomer(); }  public icustomerservice {      public customer getcustomer()       {            return mystore.whatisneeded();      } } 

this working , allows me distribute service , consuming code.

is possible (and idea) bypass wcf engine if working in single box ?

in fact, want app able run on farm servers, or on small single box servers.

to reduce wcf messaging cost, i'd have :

icustomerservice service = null; if(singlebox) {     service = new customerservice(); // direct instanciation of service class. no wcf here ... } else {     service = new customerserviceclient(); // wcf client }  var cust = service.getcustomer(); 

if wrapped properly, can technique reduce server charge ?

this surely reduce overhead of wcf runtime. i'd create factory class check if(singlebox) , new right implementation of icustomerservice.


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -