Frequently Asked Questions

This section provides answers to frequently asked questions about JEPC.

How can I access event streams that are registered by me?

There is a simple way to get access to every available event stream. In JEPC, user-defined event streams and the output stream of every active EPA are available. The name of the output event stream of an EPA is identical to the name to the EPA. To get access, an output processor can be added using the name of the stream encapsulated in a stream EPA:

 Show code example

How can I perform map functions on event streams?

Output processors can be used to transform all events of an event stream. For example, it is possible to remove existing attributes or add new ones and to apply arbitrary computations on attributes. In the following example, there is an event stream 'StocksFromWallStreet' that contains events consisting of stocks, their current prices in dollars and their change in percent. An output processor is used to convert the prices from dollars to euros, to remove the attribute 'change' and to add a new attribute 'Market'. All transformed events are made available in the form of a new event stream 'StocksCleaned'. Because arbitrary Java code can be used to transform events, output processors allow the implementation of arbitrary map-functions. However, for more powerful user-defined operations and for smoother integration into EPNs, we recommend the use of user-defined EPAs.

 Show code example

Different EP providers produce different results. What is the problem?

There is only one aspect of JEPC where different EP providers can produce different results according to the ordering of output events. In JEPC, event streams are partial ordered by time and within a single instant of time there is no order defined (JEPC uses the happened-before relation for the ordering of events; for details see theoretical foundations and preliminaries). Therefore, EP providers are allowed to order events with identical timestamps arbitrarily. A simple example is given by:

 Show code example

Is JEPC thread-safe?

No, JEPC is not thread-safe (even if the underlying EP provider is). Therefore, at most one thread should access an JEPC instance at a time. JEPC is considered to scale out in a distributed and federated way. That is, multiple JEPC instances (to potentially different EP providers) are distributed over multiple CPU cores, multiple machines, or both. Distributed and especially federated EP infrastructures are part of our current research. Hopefully, there will be an JEPC extension in the future. This extension will manage a federation of EP providers and distribute the workload (queries as well as events) automatically such that a federation of EP providers appears as a single EP provider to the user.

Are timestamps of events fully accessible in queries?

Yes, both timestamps of input events are accessible in queries. The start timestamp is available in form of the attribute tstart and the end timestamp is available in form of the attribute tend.