General Info on Esper Object Representation and Handling

25 views Asked by At

I am working with Esper but I am not clear on few things. Can anyone please clarify me?

  1. When does an event will be removed from a stream?

  2. When does an event will be removed from a window?

  3. Is it ok to execute runtime queries like "delete from SomeWindow where key1=value1" repeteadly for every 60 sec? I am getting Concurrent ModificationException sometimes.

  4. Is there any good Paperback Textbook to learn Esper?

Need clarifications. tried to look into online documentation but it is very vague.

1

There are 1 answers

1
user3613754 On

A stream is logically a pipe and only transports the event. When the application sends a new event into the Esper runtime, the runtime determines which statements (and partitions) should see the event. For example, if none of the statements need to see the event, that means that the runtime maintains no reference to that event, and the JVM garbage collection can garbage collect that event immediately.

A windows, such as for instance a time window, instructs the runtime to keep an event in memory. The runtime keeps the event in memory exactly as defined by the window as the window was declared in the EPL. For a time window of 1 minute, the runtime keeps an event exactly one minute in the time window. If there are no windows in a statement, the runtime retains no events. There is a another concept, other than time window, that defines how long to analyze data, and that is the EPL contexts. I'm just using a time window as an example.

You can use prepared fire-and-forget queries so that there is no compilation step and the prepared fire-and-forget query is already loaded. You can check the query planning to see which index is used if any. Depending on index used and size of named window or table the execution can be fast. If you see any exceptions you must make sure you use the most recent version and that you report that exception in detail in a Github issue.

The documentation (PDF, HTML) and online material and JavaDoc are available. There is an online training hosted by EsperTech at https://www.eventseriesanalysis.org/. There is no paper textbook that I'm aware of.