简体   繁体   English

从Oracle表加载和更新Gemfire缓存

[英]Loading and updating Gemfire cache from Oracle table

I am new to Pivotal Gemfire and configuring Gemfire to store Oracle table data for low-latency and high throughput application. 我是Pivotal Gemfire的新手,他将Gemfire配置为存储Oracle表数据以实现低延迟和高吞吐量的应用程序。

Via there are ways by which we can load the data in to Gemfire cache. 通过一些方法,我们可以将数据加载到Gemfire缓存中。

Does anyone know how can I update the data if any update happens in Oracle post Gemfire cache loading? 有谁知道在Oracle Gemfire缓存加载后发生任何更新时如何更新数据?

Any help, directions, references would be of great help. 任何帮助,指示,参考资料都会有很大帮助。

Typically, you would want to design your application such that all updates are flowing from your application through GemFire and then to Oracle. 通常,您需要设计应用程序,以使所有更新都从您的应用程序通过GemFire流向Oracle。 You could use a GemFire CacheWriter to update the Oracle database synchronously and even wrap this in a (JTA) transaction so that the Oracle database is only updated if GemFire was successfully updated. 您可以使用GemFire CacheWriter同步更新Oracle数据库,甚至将其包装在(JTA)事务中,以便仅在GemFire成功更新后才更新Oracle数据库。 See more details here . 在这里查看更多详细信息。 You can even perform the update asynchronously (write-behind) using AsyncEventQueues and Listeners, see here and more generally here . 你甚至可以异步执行更新(后写)使用AsyncEventQueues和听众,看到这里一般多在这里

It is possible that you have other non-GemFire based applications that access your Oracle database directly. 您可能还有其他非基于GemFire的应用程序可以直接访问Oracle数据库。 In this case, you are going to have to rely on external means to detect the database updates and feed them into GemFire. 在这种情况下,您将不得不依靠外部手段来检测数据库更新并将其提供给GemFire。 There are many ways to do this, of course, such as from a scheduled service that periodically checks for database updates and pulls them into GemFire. 当然,有许多方法可以执行此操作,例如从计划服务中定期检查数据库更新并将其拉入GemFire。 A combination of the core Spring Frameworks' Task Scheduling infrastructure combined with Spring Data JPA (or even just Spring's JDBC Abstraction ) would greatly simplify this effort. 核心Spring框架的任务计划基础结构与Spring Data JPA (甚至只是Spring的JDBC Abstraction )的结合将大大简化此工作。

Or, if it were me, I would probably opt for Spring XD , and setup a " stream " having a Oracle Database (JDBC) " source " mixed with some transformations/filters/etc as necessary, and then a GemFire " sink ". 或者,如果是我,我可能会选择Spring XD ,并设置一个“ ”,将“ Oracle数据库(JDBC)”“ ”与必要的一些转换/过滤器​​/等混合在一起,然后设置GemFire“接收 ”。

Hope this helps and good luck. 希望这会有所帮助,并祝你好运。

Cheers! 干杯!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM