jruby/activerecord-jdbc/tomcat/DB2 准备好用于企业了吗?

发布于 2024-08-21 17:11:59 字数 339 浏览 9 评论 0原文

我正在尝试向我的公司引入 RoR,我想到了两种方法:

(1)rails/ibm_db2/passenger/DB2 - 这是我更喜欢的方法,但它并没有得到公司基础设施的真正支持。
(2) jruby/activerecord-jdbc/tomcat/DB2 - 可能是依赖当前基础设施和 java 库的更简单的迁移方法,如果我有证据证明这是一项企业就绪技术。

有谁知道是否有教授认为 jruby/aciverecord-jdbc-adapter/DB2/tomcat 已经足够成熟用于生产?在开发/部署/运行时有什么我应该知道的问题吗?

我的网络应用程序用于公司内部网,大约有 200~400 名活跃用户。

I am trying to introduce RoR to my company and I have two ways of doing so in my mind:

(1) rails/ibm_db2/passenger/DB2 - which is my preferable way but it is not really supported by company's infrastructure.
(2) jruby/activerecord-jdbc/tomcat/DB2 - probably easier way to migrate relying on current infrastructure and java libs IF I have a proof this is an enterprise ready technology.

Does anyone know if there is any prof that jruby/aciverecord-jdbc-adapter/DB2/tomcat is mature enough for production? Are there any problems I should know about during Development/Deployment/Runtime?

My webapp is for a company intranet, around 200~400 active users.

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

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

发布评论

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

评论(1

⊕婉儿 2024-08-28 17:11:59

我们公司在生产环境中使用 jruby on Rails 连接到使用 activerecord-jdbc 和 Tomcat 的 DB2 数据库,我们对此非常满意。我们必须解决一些小挑战,因为我们一直将它与现有的 java 应用程序一起使用,使用共享会话等。如果您在 Rails 中构建整个应用程序,而不是与 JSP 结合,等等,那么您就不太可能遇到这些问题。

DB2 通过 activerecord-jdbc-adapter 与 Rails 配合得很好。我们发现,当我们在 ActiveRecord 模型中使用“find_by_sql”时,如果模型引用的表中不存在所选的列,它只会将该列的值视为字符串(而不是正确确定类型)。这导致我们的模型中的一些代码有点愚蠢,它们只是将字符串解析为类型对象。这可能已在较新的 activerecord-jdbc-adapter 中修复。我们还在数据库中创建了一些视图来帮助改进这一点。

Our company is using jruby on rails connecting to a DB2 database using activerecord-jdbc and Tomcat in our production environment, and we are extremely happy with it. There have been some little challenges that we've had to solve because we've been using it alongside an existing java application, using a shared session, etc. If you're building the entire application in rails, and not combining with JSPs, etc., then you'll be unlikely to run into these issues.

DB2 has worked quite well with a rails through activerecord-jdbc-adapter. We have found that when we use a "find_by_sql" in an ActiveRecord model, that if the column selected does not exist in the table that the model references, it will simply treat the value for that column as a string (rather than correctly determining the type). This results in some code that is a bit silly in our models that will simply parse the string into a typed object. This may be fixed already in the newer activerecord-jdbc-adapter. We have also created a few views in our database to help make this better.

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