任何人都可以提出在 servlet 容器中嵌入数据库的生产使用的缺点吗?
具体来说,我的团队正在考虑将 Apache Derby 作为生产部署的一部分嵌入 Tomcat,主要动机是易于部署。谁能提出这个计划的任何重大缺点?该数据库将同时由两个或可能三个网络应用程序访问。最初,任何一个表中的最大条目数预计将在 10,000 个大关左右,尽管这个数字可能还会增加。任何建议表示赞赏。
Specifically, my team is considering embedding Apache Derby in Tomcat as part of a production deployment, with ease of deployment being the primary motivation. Can anyone suggest any significant disadvantages to this plan? The database will be accessed by two, or potentially three, web apps simultaneously. Initially, the highest number of entries in any one table is predicted to be around the 10,000 mark, though this may increase. Any advice appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说,这听起来是德比的理想用途! Derby 被设计为嵌入式且易于部署。唯一有点复杂的是使用多个网络应用程序。由于每个 Tomcat Web 应用程序都是一个单独的类加载器实例,因此它们对于 Derby 来说就像多个独立的客户端应用程序,因此在连接时您需要使用 Derby 客户端/服务器连接协议而不是 Derby 嵌入式协议。也就是说,使用 http://db.apache.org 的术语/derby/docs/10.6/devguide/cdevdvlp96597.html,每个 Tomcat Web 应用程序都是一个单独的 Derby 实例。
在您的配置中,您可能会发现使用“derby.war”(打包为 WAR 文件的 Derby 网络服务器)很有用。将该 WAR 打包到 Tomcat 实例中作为另一个 Web 应用程序,并使用它来管理 Derby 服务器代码,然后让每个客户端 Web 应用程序连接到它。
请参阅http://db.apache.org/derby/docs/10.6/管理指南/cadminservlet98430.html
Sounds like an ideal use of Derby to me! Derby is designed to be embedded, and to be easily deployed. The only thing that's a bit complex is the use of multiple web apps. Since each Tomcat web app is a separate class loader instance, they look like multiple independent client apps to Derby, so you'll need to use the Derby client/server connection protocols rather than the Derby embedded protocols when connecting. That is, to use the terminology of http://db.apache.org/derby/docs/10.6/devguide/cdevdvlp96597.html, each Tomcat web app is a separate Derby instance.
In your configuration, you might find it useful to use 'derby.war', the Derby network server packaged as a WAR file. Package that WAR into your Tomcat instance as yet another web app, and use it to manage the Derby server code, then have each of your client web apps connect to it.
See http://db.apache.org/derby/docs/10.6/adminguide/cadminservlet98430.html