views:

40

answers:

2

I am going to develop a WCF service that connects back-end system with two e-commerce websites. Back-end system sits behind the internet as opposed to other components. Each website has a SQL database with identical schema. The back-end system acting as inventory master will be the service consumer and will be pushing product data to each website database through this service. The question is how to determine where to store the data? Say I use entity framework as data access layer. The service data access will then have to use one or the other connection string to store data pushed by the back-end consumer. Another option would be to include a parameter to every contract operation and service code will then decide where to store the data. Last option I can think of is to deploy two instances of the service (alternatively define two service endpoints but since the transport is abstracted this may not be quite possible) and let consumer call the correct endpoint. Can you please advise which if any solution is correct and most efficient requiring to write least code and providing simplest deployment process? Also should I use http or net.tcp bindings in my scenario?

+1  A: 

I would say deploy two instances of the service and let the consumer choose which one to call. This allows you to write the service code once, and manage separate instances through configuration.

Andrew Church
A: 

Here are some practical examples of how to build a SOA using WCF.

I would suggest you read articles by Thomas Erl and Roger Sessions, this will give you a firm handle on what SOA is all about.

Building a SOA

SOA Design Pattern

Achieving integrity in a SOA

Why your SOA should be like a VW Beetle

SOA explained for your boss

MetalLemon