views:

34

answers:

2

Hi,

I've an enterprise database store used by some rich applications and a website with it own database store.

Enterprise application work with local data and some of these data (like orders,prices ...) have to be "synchronized" to the web site datastore.

On the other side, internet customers are able to edit their profile which have to be "synchronized" to the enterprise datastore too.

Basically i need this architecture :

WebSite => WebSite Database <=> || Internet || <=> Enterprise Database <= Rich Applications

A: 

Pick your poisson. Merge replication is probably the easiest to deploy. Service Broker is the most performant, but requires a steep learning curve. Synch Framework is not really appropiate, unless you plan to deploy datasets on the client too (mobile devices).

Remus Rusanu
Does Merge Replication works with separate sites through internet ? Any Web Service implementation possible or only direct SQL Server to Sql Server ?
Yoann. B
Merge replication works over the internet. But since replication uses Transact-SQL statements to apply the changes, it means that the T-SQL port of the two servers has to be open on the internet, which is a serious security problem, even when properly hardened. WS services have no place in this discussion.
Remus Rusanu
A: 

You can do a pull or push from the WebSite Database (WSDB) to the Enterprise Database (EDB) and vice-versa. It depends on what type of latency you are comfortable with. If you want near real-time syncing, go with a push. Otherwise the EBD can pull from the WSDB every hour or so through web service methods or REST calls (and vice-versa).

Push Example:

  1. Customer updates profile and pushes "Submit" button.
  2. WebSite calls web service method PushCustomerInfo(params) on EDB.

Pull Exmaple: Every hour EBD calls web service method GetCustomerInfo that returns a Customer object on WSDB.

LWoodyiii
Thanks, but i need to prevent EDB from being not available (like temporary internet link fail). So maybe a "Queuing" system in addition. I can't assume EDB always available, so direct push via web services doesn't work.
Yoann. B
Got ya. You'll want to use messaging then. Not sure how to do this with .Net over the Internet. If it was Intranet, I'd say MSMQ or WCF.
LWoodyiii
Actually, check out http://msdn.microsoft.com/en-us/magazine/cc163920.aspx) and David Platt's article in the December 2003 issue of MSDN®Magazine (MSMQ and .NET: Send MSMQ Messages Securely Across the Internet with HTTP and SOAP)
LWoodyiii
This is a little bit more updated. http://www.codeproject.com/KB/WCF/WCFMSMQ.aspx
LWoodyiii