设计思路建议:来自6个不同系统的数据,写入一个模型

发布于 2024-10-21 12:57:38 字数 77 浏览 1 评论 0原文

我需要在Java环境上构建一个中间层,将来自5-6个不同系统的数据转换为一个模型。如果我们添加新系统,这个设计应该是可扩展的。有什么建议吗?

I need to build a middle layer on Java environment to transform the data that is coming from 5-6 different systems to one model. This design should be extensible if we add new system. Any suggestions?

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

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

发布评论

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

评论(3

倾听心声的旋律 2024-10-28 12:57:38

您正在寻找普通的旧式适配器设计模式

Plain old Adapter design pattern is what you're looking for.

耳钉梦 2024-10-28 12:57:38

我本人不是 Java 人员,但从体系结构的角度来看(取决于您可以进行多少投资)企业服务总线 (ESB) 可能有助于您集成这些不同的来源。

您应该能够找到如何实现这种架构的特定于平台的示例。它旨在帮助集成不同的技术堆栈并提供消息传递实现。这可能有点矫枉过正,具体取决于数据量/来源有多大/您需要扩展的可能性等等。

您需要提供更多信息,但这也许为您指明了正确的方向?

I'm not a Java guy myself, but from an architectural point of view (and depending on how much of an investment you can make) an Enterprise Service Bus (ESB) might be helpful for you to integrate from those diverse sources.

You should be able to find platform specific examples of how to implement this kind of architecture. it's designed to help integrate from different technology stacks and provides a messaging implementation. It might be overkill, depending on how much data/how different the sources are/what the likelihood is that you'll need to expand etc etc.

You'd need to provide a bit more info but perhaps this points you in the right direction?

简单爱 2024-10-28 12:57:38

您可以在该模型之上放置一个服务(例如 Web 服务),并允许仅通过该服务写入该模型。因此,只有一处将数据写入模型,并且只有一处在模型内部发生变化时进行更新。

您可以构建从 6 个源获取数据的服务或适配器(因此将有 6 个适配器),它们都与该中央服务通信以写入模型。因此,解释 6 个源的数据的逻辑分布在 6 个适配器上,并且您可以很好地分离关注点。

You would put a service -- such as a Web service -- on top of that model, and allow writing to the model only via the service. Ergo, there is only one place where data gets written to the model, and only one place to update when the internals of the model change.

You can build services or adapters which take data from the 6 sources (so that would be 6 adapters), which all talk to that central service for writing to the model. The logic for interpreting the data from the 6 sources is thus spread over the 6 adapters, and you have a nice separation of concerns.

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