持续传输来自合作伙伴的数据

发布于 2024-09-16 08:23:35 字数 705 浏览 4 评论 0原文

我的任务是实现一个从合作伙伴那里持续接收大量数据的系统。合作伙伴的数据模式与我们不同,因此在接收数据并将其导入我们的数据库时必须进行一些转换。

解决此任务的最佳方法是什么?

我对等式的两边都有一定的控制权,即如果我们选择使用 WCF,我们的合作伙伴将实施该服务。但重要的是要尽可能限制合作伙伴方面必须进行的编程量。理想情况下,他们会使用 SQL Server 的某些功能来导出数据,然后让我们处理其余的事情。

其他相关因素:

  • 双方都使用 SQL Server(我们这边是 2008 年,合作伙伴未知)。
  • .NET 4 和/或 Microsoft 开箱即用的任何产品,无第三方产品。
  • 转让是一种方式,即仅从合作伙伴转让给我们。
  • 每天传输的数据量约为数万条更新记录/对象。
  • 数据模型相当复杂,有多个表和关系。
  • 解决方案应该能够容忍合作伙伴方面的更改(我们不知道他们何时以及如何更改模型)
  • 可维护性和可靠性比性能更重要,即我们不需要最新的数据,但服务应该易于修改并且不会失败/停止。

我问这个问题是因为我不知所措,但可以实现这一目标的方法有很多。作为一名 .NET 开发人员,我倾向于实现 WCF 甚至一些基于 XML 的自定义交换。但我知道 BizTalk 可能适合这里,而且 SQL Server 可能内置了一些我不知道的漂亮功能。

欢迎任何指点、想法和建议!

I’ve been tasked with implementing a system for continuously receiving large amounts of data from a partner. The data schema on the partners’ side is different from ours, so some transformation has to take place when the data is received and imported into our database.

What’s the best approach for solving this task?

I have some control over both sides of the equation, i.e. if we chose to use WCF, our partner will implement that service. But it’s important to limit the amount of programming that has to take place on the partners’ side as much as possible. Ideally they would use some feature of SQL Server to export their data and then let us deal with the rest.

Other relevant factors:

  • SQL Server is used on both sides (2008 at our side, unknown for the partner).
  • .NET 4 and/or anything that comes out of the box from Microsoft, no 3rd party products.
  • Transfer is one way, i.e. from the partner to us only.
  • Amount of data is around tens of thousands of updated records/objects transferred daily.
  • The data model is fairly complicated, with several tables and relations.
  • The solution should be tolerant to changes on the partner's side (we don’t know when & how they change their model)
  • Maintainability and reliability are more important than performance, i.e. we don't need the latest data, but the service should be easy to modify and it can't fail/stop.

I’m asking this question because I overwhelmed but the number of ways this can be accomplished. As a .NET developer, I’m leaning towards implementing WCF or maybe even some custom XML-based exchange. But I know BizTalk would probably fit the bill here, and SQL Server probably has some nifty features built in that I don’t know about.

Any pointers, ideas, and suggestions are most welcome!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

多彩岁月 2024-09-23 08:23:35

除了 Will 的建议之外,您还可以看看 SSIS(SQL Server Integration Services)。通过此功能,您可以导出到 FTP 站点,然后在另一端导入。

In addition to Will's suggestions, you can take a look at SSIS (SQL Server Integration Services). With this you can export to an FTP site and then import it on the other side.

傲影 2024-09-23 08:23:35

如果您想要其数据库的完整副本,请日志传送 是一个不错的选择,否则请查看复制,它可以为您提供更好的效果- 对复制内容进行精细控制。

您可以按原样复制数据并在您这边处理转换逻辑。

If you'd like a complete copy of their database, then log shipping is a good option, otherwise check out replication which gives you finer-grained control over what's copied.

You can copy across the data as-is and deal with the transformation logic on your side of the wire.

梨涡 2024-09-23 08:23:35

也许,我会这样做:

  1. 维护合作伙伴数据库的本地副本。我们将此称为暂存,因为您将在此处转换数据。使用数据比较(VS 2010 功能,您当然可以自动化)或复制来实现这一点。我不确定复制是否会触发 CDC,但数据比较肯定会触发。
  2. 在临时数据库上启用更改数据捕获。这只会为您提供更改的记录,因此您可以有选择地转换数据并更新数据库。
  3. 构建并部署一个 SSIS 作业来扫描 CDC 表、转换数据并加载到数据库中。

据我所知,当架构更改时,数据比较效果很好(它忽略架构更改)。 CDC 也运行良好,您所需要做的就是在架构发生更改时创建第二个捕获实例并删除第一个捕获实例。

Probably, here is how I'd do it:

  1. Maintain a local copy of your partner's database. Let us call this staging because you'll transform the data here. Use Data Compare (VS 2010 feature which you can ofcourse automate) or Replication to achieve this. I'm not sure if Replication triggers CDC, but Data Compare sure does.
  2. Enable Change Data Capture on the staging database. This gives you only the changed records, so you can selectively transform the data and update your database.
  3. Build and deploy an SSIS job that scans the CDC tables, transforms the data and loads into your database.

As far as I know, Data Compare works well when the schema is changed (it ignores the schema changes). CDC also works well, all you need to do is create a second capture instance if there is a schema change and remove the first one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文