0

I have been exploring WSO2 CEP for last couple of days.

I am considering a scenario where a single lookup table could be used in multiple execution plans. As far as I know, only way to store data all data is event table.

My questions are:

  1. Can I load an event table once(may be by one execution plan) and share that table with other execution plans?

  2. If answer of Q1 is NO, then it will be multiple copies of same data storing in different execution plans, right ? Is there any way to reduce this space utilization ?

  3. If event table is not the correct solution what are other options ?

Thanks in Advance, -Obaid

Community
  • 1
  • 1
Obaid
  • 237
  • 2
  • 14

1 Answers1

0

Event tables would work in your scenario. However, might you need to use RDBMS EventTable or Hazelcast EventTable instead of In-memory event tables. With them, you can share single table data with multiple execution plans.

If you want your data to be preserved even after server shutdown, you should use RDBMS EventTables (with this you can also access your table data using respective DB browsers, i.e., H2 browser, MySQL Workbench, etc...). If you just want to share a single event table with multiple execution plans at runtime, you can go ahead with Hazelcast EventTable.

Grainier
  • 1,634
  • 2
  • 17
  • 30
  • Thanks for the help. – Obaid Sep 14 '16 at 03:47
  • So, if we consider hazelcast, it could be like below: 1. Load a hazelcast backed event table from one Execution plan (define + insert from stream) 2. Data will be stored on hazelcast in memory cluster 3. If we want to use same data from another execution plan, just define same as step-1, no need to load from stream as data will be already there. Please correct me if I am wrong above. Thanks, Obaid – Obaid Sep 14 '16 at 03:54
  • Exactly. However, data sharing with Hz was introduced with (CEP 4.2.0) [https://github.com/wso2/product-cep/releases/download/v4.2.0-rc2/wso2cep-4.2.0-RC2.zip] (this will release within this week) and might not work with earlier versions. If you are using < 4.2.0, you might need to go ahead with RDBMS event tables. – Grainier Sep 14 '16 at 04:07
  • Thanks Grainier, I will go for 4.2.0, as I want to reduce memory footprint. – Obaid Sep 14 '16 at 04:22