简体   繁体   English

同步Intranet和Web数据

[英]Synchronizing intranet and web data

I am just getting started breaking a .NET application and its SQL Server database into two systems - an intranet and a public website. 我刚刚开始将.NET应用程序及其SQL Server数据库分为两个系统-内部网和公共网站。

The various database tables will need to be synchronised between the two databases in different ways, for example: 各种数据库表将需要以不同的方式在两个数据库之间进行同步,例如:

  • Moving from web to intranet, with the intranet data becoming read-only 从Web到Intranet,Intranet数据变为只读
  • Moving from intranet to web, with the web data becoming read-only 从Intranet到Web,Web数据变为只读
  • Tables that need to be synchronised and are read/write on both the intranet and web databases. 需要同步并且在Intranet和Web数据库上都可读写的表。

Some of the synchronisation needs to occur relatively quickly with minimal lag, possibly with some type of transaction locking to ensure repeatable reads etc. Other times it doesn't matter if there is a delay between synchronisation. 一些同步需要以最小的延迟相对快速地发生,可能需要某种类型的事务锁定以确保可重复读取等。其他时候,同步之间是否存在延迟并不重要。

I am not quite sure where to start with all this, as there seems to be many different ways of achieving this. 我不太确定从哪里开始,因为似乎有许多不同的方法可以实现这一目标。 Which technologies and strategies should I be looking at? 我应该看哪些技术和策略?

Any tips? 有小费吗?

A system like that looks like the components are fairly tightly coupled. 像这样的系统看起来组件紧密耦合。 An upgrade across several systems all at once can turn into quite the nightmare. 一次跨多个系统进行升级可能会变成一场噩梦。

It looks like this is less of a replication problem and more of a problem of how to maintain a constant connection to a remote database without much I/O lag. 看起来这不是一个复制问题,而更多的是如何在没有太多I / O延迟的情况下保持与远程数据库的恒定连接。 While it can be done, probably isn't going to work out very well in terms of scalability and being able to troubleshoot problems. 尽管可以做到,但就可伸缩性和解决问题而言,可能效果不佳。

You might look at using some message queueing and asynchronous data processing from the remote site to the intranet. 您可能会考虑使用一些从远程站点到Intranet的消息队列和异步数据处理。 You'll probably have to adjust some expectations of the business side so that they don't assume that everything is accessible real-time all the time. 您可能必须调整一些对业务方面的期望,以使他们不会假设所有内容都可以实时访问。

Of course, its hard to give specifics without more details. 当然,没有更多细节就很难给出细节。 It might be a good idea to look into principles of SOA and messaging systems for what you're trying to do. 对于您尝试做的事情,研究SOA和消息传递系统的原理可能是一个好主意。

Out of the box you have SQL Server Replication. 开箱即用,您可以使用SQL Server复制。 Sounds like a pair of filtered transactional replication publications can do the job. 听起来像一对经过过滤的 事务复制出版物可以完成任务。 Transactional replication has a low overhead on the publisher and can ensure transactional consistency of the published changes. 事务复制对发布者的开销很低,并且可以确保发布的更改的事务一致性。

Nathan raises some very valid points about the need for a more loosely coupled solution. 内森(Nathan)对于需要更宽松的耦合解决方案提出了一些非常正确的观点。 Service Broker can fit that shoe quite well with its loosely coupled asynchronous nature, and provide a headache free upgrade future since SSB is compatible between SQL Server versions and editions . Service Broker可以通过松散耦合的异步特性很好地适应这种情况,并且由于SSB 在SQL Server版本之间兼容的 ,因此可以为将来提供无忧的升级。 But this freedom comes at the cost of letting the heavy lifting of actually detecting the changes and applying them to the tables to you, as application code, not a trivial feats. 但是,这种自由的代价是让繁重的工作来实际检测更改并将其作为应用程序代码应用到表上,而不是琐碎的壮举。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Web窗体应用程序和移动客户端之间同步存储的数据 - Synchronizing storaged data between web forms application and mobile client 在服务器和客户端之间同步数据 - Synchronizing data between server and client 使用或不使用VPN同步SQL数据 - Synchronizing SQL Data with or without a VPN 同步ETL和读取数据仓库 - Synchronizing ETL and reads on the Data Warehouse 同步来自多台机器的外部Web请求 - Synchronizing external web request from multiple machines 将SQL之间的数据转换(同步)到HBase - Transforming (Synchronizing) Data between SQL to HBase 使用SQL Server用户和角色作为Intranet Web应用程序的授权数据库? - Using SQL Server Users and Roles as an authorization database for an intranet web application? 在MVC 4 Intranet项目中使用OLAP QUBE作为数据源 - Using OLAP QUBE as a data source in a MVC 4 intranet project 将SQL数据导出为预定义的Excel打印格式并将其放在Intranet上 - Export SQL data to a predefined Excel printing format and put it on intranet 使用Apache Kafka将数据从MSSQL同步到Elasticsearch - Synchronizing data from MSSQL to Elasticsearch using Apache Kafka
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM