0

I was wondering if in addition to process and display data on dashboard in wso2cep, can I store it somewhere for a long period of time to get further information later? I have studied there are two types of tables used in wso2cep, in-memory and rdbms tables.

  • Which one should I choose?
  • There is one more option that is to switch to wso2das. Is it a good approach?
  • Is default database is fine for that purpose or I should move towards other supported databases like sql, orcale etc?
Community
  • 1
  • 1
aneela
  • 1,457
  • 3
  • 24
  • 45

1 Answers1

0

In-memory or RDBMS?

In-memory tables will internally use java collections structures, so it'll get destroyed once the JVM is terminated (after server restart, data won't be available). On the other hand, RDBMS tables will persist data permanently. For your scenario, I think you should proceed with RDBMS tables.

CEP or DAS?

CEP will only provide real-time analytics, where DAS provides batch analytics (with Spark SQL) in addition to real-time analytics. If you have a scenario which require batch processing, incremental processing, etc ... You can go ahead with DAS. Note that, migration form CEP to DAS is quite simple (since the artifacts are identical).

Default (H2) DB or other DB?

By default WSO2 products use embedded H2 DB as data source. However, it's recommended to use MySQL or Oracle in production environments.

Grainier
  • 1,634
  • 2
  • 17
  • 30
  • Thankyou for your response. For the timebeing I have used RDBMS table and created a query @from(eventtable = 'rdbms' , datasource.name = 'WSO2_CARBON_DB' , table.name ='ftp_log_table') define table ftp_log_table (ts string, uid string, id_orig_h string, id_orig_p int, id_resp_h string, id_resp_p int, user string, password string,command string, arg string, mime_type string, file_size string, reply_code int, reply_msg string); from FTPInStream select * insert into ftp_log_table; – aneela Aug 20 '16 at 09:27
  • But I haven't created this table in wso2_carbon_db (dont know how) and it didn't give me any runtime error regarding table existance. Moreover how can I view data in this table in standalone way? – aneela Aug 20 '16 at 09:33
  • 1
    You don't need to create ftp_log_table table explicitly in wso2_carbon_db, it'll get created automatically when the execution plan get deployed. Since you are using WSO2_CARBON_DB default data source, you can view it using H2 browser. [Link](http://www.vitharana.org/2012/04/how-to-browse-h2-database-of-wso2.html) – Grainier Aug 20 '16 at 10:30
  • Thankyou can you tell me how to shift from cep to das? I didn't find any good link unluckily. – aneela Aug 20 '16 at 16:50
  • 1
    To migrate from cep to das; [1] copy `carbonapps`, `eventpublishers`, `eventreceivers`, `eventstreams`, `executionplans` of `/repository/deployment/server/` to `/repository/deployment/server/` 2. copy all `.jar` files of `/repository/components/lib/` to `/repository/components/lib/` (only if there's any) 3. if you created any gadgets, copy them from `/repository/deployment/server/jaggeryapps/portal/store/carbon.super/gadget/` to respective das dir. – Grainier Aug 21 '16 at 04:40
  • okay it worked fine, I have downloaded wso2 das 3.0.1 release but problem is I have used some of the latest functions of wso2cep 4.2.0 which I guess are not integrated in it yet as I am receiving compilation error for execution plans. Any suggestions? – aneela Aug 21 '16 at 09:29
  • As for now, you can go ahead with [das 3.1.0 RC1] (https://github.com/wso2/product-das/releases/download/v3.1.0-RC1/wso2das-3.1.0-RC1.zip). This time CEP and DAS will get released at the same time. So you'll have all the new functionalities of CEP built into DAS. – Grainier Aug 21 '16 at 09:41