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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -