我是否必须设计单独的数据库和数据库?每个不同模块的服务器运行时?

发布于 2024-08-04 14:58:09 字数 221 浏览 5 评论 0原文

当设计一个新的基于J2EE的企业框架时,我是否需要为单独的业务模块必须使用不同的数据库并且必须在不同的应用服务器实例上运行的情况做好准备?

从另一个角度来看:有没有人经历过现实生活中对不同数据库和数据库的需求?每个模块的服务器?如果有,该企业的规模有多大?

因为(据我所知)这使事情变得更加复杂,并且在该框架的先前版本(以及在较小的银行中)中,上述情况从未发生过。

感谢您的回复!

When designing a new J2EE based enterprise framework, do I have to prepare for the situation where separate business modules have to use different databases and have to run on different application server instances?

From another point of view: has anyone ever experienced a real life requirement for different databases & servers per module? If yes, what was the size of that enterprise?

Because (as far as I can see) this makes things a lot more complicated, and with the previous version of this framework (and in smaller banks), the case above never happened.

Thanks for the replies!

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

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

发布评论

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

评论(1

我不确定我是否正确理解了这个措辞

单独的业务模块必须使用不同的数据库

始终使用不同的数据库。

也许我们在这里谈论的是不同的事情。我从未见过任何组织没有至少两个数据库。其中包括我和笔记本电脑上的 CD 目录和吉他曲调数据库。

您是指不同的数据库供应商吗?数据库版本,例如 Oracle vX 和 Oracle vY?即使根据这一定义,我也认为我遇到的客户中没有一个对某一供应商或版本进行了普遍标准化。

那么,我是否期望一个不平凡的系统有一些模块查看一个数据库,一些模块查看另一个数据库。是的,绝对是。

我是否希望某些模块能够查看两个数据库,是的。一个中的参考数据存在于另一个中。历史又是另一回事。

不同服务器上的不同模块 - 是的。出于隔离和可扩展性的原因。这是应用程序服务器做得很好的一件事。

总的来说,您为什么认为这是一个问题?您的模块在 JNDI 中查找它们的 JDBC 连接,它们不需要知道它们正在使用不同的数据库。正确连接模块是一个管理问题。

一个主要问题可能是 XA 事务的使用,但通常可以避免在同一模块中或在同一事务中的同一模块中更新两个数据库。

I'm not sure I've understood this phrasing correctly

where separate business modules have to use different databases

All the time.

Perhaps we're talking about different things here. I've never met any organisation without at least two databases. That includes me and my CD catalogue and guitar tunes databases on my laptop.

Do you mean different database vendors? Database versions, like Oracle vX and Oracle vY? Even under that definition I can think of no customers I've encountered who have universally stanadardised one one vendor or version.

So, would I expect a non-trivial system to have some modules looking at one database and some looking at another. Yes abolsutely.

Would I expect some modules to look at two databases, yes. Reference data in one live in another. History in yet another.

Different modules on different servers - yes. For reasons of isolation and scalability. That's one thing App Servers do quite well.

Overall, why do you see this as a problem? Your modules look up their JDBC connections in JNDI, they don't need to know that they are using different databases. It's an admin problem to wire up the modules correctly.

One major issue could be the use of XA transactions, but it's often possible to avoid updating both databases in the same module, or if from the same module in the same transaction.

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