views:

19

answers:

1

We have a multi services application. We have moved a method that involves a DB access to a separate component that is exposed by a WCF endpoint.

We have more than one service that need to use this method.

The dilemma is what to use:

  1. A WCF call to the method.

  2. Call directly to the method, resolved by our DI engine.

The system performance is a critical issue.

So what do you think is better?

  1. Using WCF to make the cal

  2. Reference the required service and call it in-process using the DI engine.

Thanks Or.

A: 

If performance is critical, referencing the service component and calling directly the DB without going through all the WCF layers and serialization processes will be faster but less robust. If you decide to change the implementation you will need to recompile the client application as well. My advice would be to measure the performance of the WCF service call and if you are happy with the results leave it that way.

Darin Dimitrov
Hi Darin. To add to Or's dilemma - Wouldn't the "RPC" style call to WCF also add a risk that something in the comm. will go wrong and data consistency might be broken? Does SOA have anything to offer to reduce this risk?
urig