JEPC-to-JDBC Bridge

The JEPC-to-JDBC bridge allows the connectivity from JEPC to every standard database system via JDBC. To use this JEPC bridge, a running standard database system as well as the corresponding JDBC driver are required. New EP providers based on JDBC can be created by using:

EPProvider epProvider = new DatabaseEngine(String user, String password, String driver, String url);

Arguments

Argument Description
user A valid user that is allowed to connect to the database system.
password The password of the user that is specified in user.
driver The name of the driver to use.
url The JDBC URL to the database system.

Pattern Matching Modes

The JDBC bridge provides different implementations for executing pattern matching queries. In particular, there are different automatons for recognizing event patterns. The first kind of automaton is a classic in-memory implementation. The second kind of automaton is mapped completely to database tables and controlled via standard SQL. The automaton implementation can be selected via an additional parameter:

EPProvider epProvider = new DatabaseEngine(String user, String password, String driver, String url, PMMode pmMode);

Arguments

Argument Description
user A valid user that is allowed to connect to the database system.
password The password of the user that is specified in user.
driver The name of the driver to use.
url The JDBC URL to the database system.
pmMode Selects the implementation of the automaton. The in-database automaton is selected by using PMMode.DB and the in-memory automaton is selected by using PMMode.MEMORY_2. If no implementation is selected, the in-database automaton is used by default.

Hints

In general, the best performance is reached when using a Java database system (e.g. H2 Database Engine) that runs embedded with JEPC within the same JVM. There is no general statement possible which automaton performs better. It depends on the used database system and the performance tradeoff between the two automaton implementations can be 10 percent and higher.