Query Features Overview

The query language enables you to make queries using an SQL-like language. Queries are executed in query agents. You can query cache content (requires Cache OM), and you can also query events (event stream processing).

Note: Configuration of query agents is explained in TIBCO BusinessEvents Developer’s Guide.

Query Agents

Queries can only be executed by specialized agents called query agents. One engine (node) can have multiple query agents, or a mixture of inference agents and query agents.

Query agents have channels and destinations. They can execute rule functions, but not rules. Query agents have no Rete network for inferencing.

Querying the Cache

When a query agent is deployed as part of a TIBCO BusinessEvents application that uses cache object management, you can query data in the cache.

Query features provide view-only access into the cache. You cannot use query language to do any updates to data in the cache.

It’s important to understand basic cache configuration and the part query agents play in a cache cluster. See chapters on Cache OM in TIBCO BusinessEvents Developer’s Guide.

Tip: You can load objects into the cache so you can then query them. To load objects into the cache, use the DataGrid.C_CacheLoad*() functions (and their Coherence equivalents). For details on these functions, see their tooltips, and also see TIBCO BusinessEvents Developer’s Guide.

Querying the Event Stream

Query agents can listen to an event stream. The event stream can consist of messages sent out on a Rendezvous subject, or a JMS topic or queue, or other source that a TIBCO BusinessEvents destination can listen to. Events can also be generated internally and piped straight to a query.

Event stream processing in the query agent is highly performant and can handle very large numbers of incoming messages. The query agent runs continuous (or snapshot) queries against the events.

Continuous queries against the event stream make comparisons across event streams, as if they were tables. Thus, event stream processing can be termed channel-centric computing. This approach is ideal when you need to operate on sets of events (such as for aggregations). This is traditionally associated with financial data feeds, although it might also be used in detecting patterns in streams for smart grid meter feeds, web site monitoring feeds, and so on.

Distilling Data

The query agent can assert events, such that another query (or a locally deployed inference agent) can listen to them. These internally generated events enable you to build several tiers of queries, each aggregating and abstracting the data into ever more interesting information. The distilled data can be sent out through a channel to a TIBCO BusinessEvents application or external application as needed.

See Event Stream Processing (ESP) Queries for details.

Note: You cannot use hot deployment for query-related resources.