外部数据库更改->休眠->客户
现有的外部系统定期(每隔几秒)更新多个数据库表。我们希望构建一个仪表板类型的用户界面,允许用户近乎实时地查看附加记录和重要更新。用户界面还允许进行一些会导致数据库更改的事务。
我们的想法是使用 Hibernate 和 Flex 堆栈(请参阅 http://dl.dropbox。 com/u/1431390/overview.jpg),但我们愿意使用任何免费/开源技术。有几个问题我们不确定是否应该使用我们建议的堆栈:
1)如何随着数据库更改自动更新 POJO?据我了解,休眠状态无法了解其会话之外所做的任何更改。因此,必须进行某种轮询才能获取新的和更改的记录。
2) 我们计划将数据推送到 Flex UI 中的数据网格(使用 BlazeDS 或 WebORB)。这似乎依赖于识别更改并将这些更改作为更新推送到渠道中。然而,如果我们使用 Hibernate->POJO 方法来识别这些更改可能会相当复杂,因为我们刷新了数据。是否有更好的解决方案可以即时推动变革?我本以为这是一个常见的要求,但我在网上找不到太多信息。
任何有关架构或具体问题的建议将不胜感激。
非常感谢,
肯
An existing external system makes regular (every few seconds) updates to several database tables. We want to build a dashboard type user interface which allows the user to view additional records and important updates in near real-time. The user interface would also allow some transactions which would result in database changes.
Our thoughts are to use a stack with Hibernate and Flex (see http://dl.dropbox.com/u/1431390/overview.jpg) but we are open to using any free/open source technology. There are a few issues we are unsure about should we use our proposed stack:
1) How to automatically update the POJOs with database changes? As far as I understand it, there is no way of hibernate knowing about any changes made outside its own session. Therefore, some sort of polling would have to be done to pick up new and changed records.
2) We were planning to push the data to datagrids within a flex UI (using BlazeDS or WebORB). This seems to rely on identifying the changes and pushing these as updates down the channel. However, if we use the Hibernate->POJO approach identifying these changes could be fairly complex as we have refreshed the data. Is there a better solution which will push the changes on the fly? I would have thought this was a common requirement but I can't find much information online.
Any advice would be gratefully appreciated on either the architecture or the specific issues.
Many thanks,
Ken
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 1) - 使用轮询,或者如果您有足够的预算,请使用支持从触发器推送 JMS 消息的数据库(DB2、Oracle、MSSql 服务器)。
对于 2) - Adobe 构建了一个商业产品,可以更轻松地解决此问题(它具有您正在寻找的功能)。它具有陡峭的学习曲线并且针对企业。否则,您将不得不实施自己的解决方案 - 仅刷新更改的数据等。
For 1) - Use polling or if you have enough budget use a database that supports pushing JMS messages from triggers (DB2, Oracle, MSSql server).
For 2) - There is a commercial product built by Adobe which can solve this problem easier (it has this feature that you are looking for). It has a steep learning curve and is targeted for enterprise. Otherwise you will have to implement your own solution - refresh only the changed data etc.