开发者

Sync 2 .net applications

开发者 https://www.devze.com 2023-03-04 08:55 出处:网络
Good morning/afternoon/evening! There are 2 systems - CRM (customized SplendidCRM) и home-brewedmonster (crm+cms+backoffice).

Good morning/afternoon/evening!

There are 2 systems - CRM (customized SplendidCRM) и home-brewedmonster (crm+cms+backoffice).

  1. CRM - Asp.Net 2.0 WebSite, Sql Server 2008; implemented using Views, Stored Procedures, Triggers; for example auditing is implemented as trigger + SP; WebSite is a simple UI; Ado DataSets are used as Dtos
  2. home-brewed monster - Asp.Net 3.5 WebApplication, SqlServer 2008; implemented using ListToSql; Sql Server used as a storage only; all logic and auditing implemented in c# cod开发者_StackOverflow社区e; VS`s designer generated classes are used as Dtos.

I need to implement 'duplex' synchronization between them:

object is updated in Crm -> changes are applied in home-brewed monster
object is updated in home-brewed monster -> changes are applied in Crm

Sync should work in 'almost realtime mode' - delays are acceptable. There is not much data - around 35000 objects and 120000 audit entries for now, can be up to 100000 objects. Objects are not big too (60 columns in database).

For both systems there is an Api that allows updates: Web Service for Crm and Wcf Service for home-brewed monster. Because of monsters implementation changes can be applied only via Wcf Service (for audit to work for example). As for Crm - it can be updated by Web Service call or by direct SP call (but Web Service is preferable).

At the moment there is column in Crm that holds objects external ID and there is kind of sync but more robust and professional solution required.

Due to some reasons (administrators failure or wrong update applied) both systems can go 'offline'. This should not affect sync - all updates should be applied as soon as system is back. It is important that data from home-brewed monster is of higher priority and should override changes from Crm.

The question is which technology/library is better to use? It would be nice if sync could be taken "out of the systems" (systems would fire events that data have changed and external tool would sync changes). This is due to systems and sync rules are subjects to frequent changes - e.g the first 'version' of sync where removing objects from Crm on some condition, second version were not removing but exporting less data, in the '3rd version' more some more fields common to both systems were added. This changes will appear in future so and I would like to not touch other system (or non of them) and change just sync rules.


You might want to check out the Microsoft Sync Framework though I'm not sure I'd personally recommend it after having used it for a while. It uses a Sync Orchestrator to sit inbetween two or more systems so sounds like it could fit your requirements.


I know you are talking about syncing the applications, but it might be 'better' (IMHO) to think about just using SQL Server to sync the data. This could be done with Triggers, jobs and/or packages.

Triggers would give you the ability to 'sync' when a change occurs (IE: real time) while the others would probably be delayed.

This will all depend on your environment, where the databases are located (IE: same server, two different servers) and how comfortable you would be in creating your own 'sync' process.

EDIT:

If you are really thinking that it should be application based syncing, then you will probably be better off rolling your own solution. Given the highly customized nature of the two applications it might be difficult to find something that behaves in the manner you need.

In this case I would probably just go with plain old .net with Entity Framework and LINQ.

0

精彩评论

暂无评论...
验证码 换一张
取 消