Queries Process
In RioDB, queries are user-defined instructions for continuously scanning the data stream looking for conditions to be met. These instructions also include what to do when such conditions are met.
For example, if working with stock market data streams, your query may be searching for a certain market pattern. If working with network traffic surveillance, your query could be trying to detect a botnet attack. Or if dealing with telemetry sensor data, your query could be searching for sensor data patterns that indicate a problem with a machine.
RioDB supports SQL-like commands to create and manage queries.
Note, that unlike traditional databases that run the query once and return the results, RioDB is a stream-processing engine. Queries are “deployed” to run forever. Your query will run continuously, unceasingly, evaluating conditions each and every time stream messages are received. This will go on until RioDB is told to stop the query.
There is no need to query RioDB in a loop. Just give the RioDB the query once, and it will deploy your query to run continuously for you.
Queries should involve an OUTPUT plugin, which tells RioDB what actions should be taken when query conditions are met. RioDB will pass the query output to the OUTPUT plugin to carry out its task.